:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #020617;
    --dark-2: #0f172a;
    --emerald: #10b981;
    --emerald-2: #34d399;
    --blue: #2563eb;
    --amber: #f59e0b;
    --radius: 22px;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, #020617, #0f172a 52%, #111827);
    color: #fff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--emerald), var(--blue));
    color: #fff;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 500;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(16, 185, 129, 0.18);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    background: #020617;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.hero-slider {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    background: #020617;
    color: #fff;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.72s ease;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.28)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 28%, rgba(16, 185, 129, 0.32), transparent 34%), linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 46%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: center;
    gap: 56px;
    min-height: 660px;
    padding-top: 28px;
    padding-bottom: 56px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--emerald-2);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 680px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: 19px;
}

.hero-chips,
.detail-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-chips {
    margin-top: 26px;
}

.hero-chips span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--emerald), var(--blue));
    color: #fff;
    box-shadow: 0 14px 32px rgba(16, 185, 129, 0.28);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: inherit;
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 38px;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(16px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 4;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--emerald-2);
}

.page-section {
    padding: 72px 0;
}

.section-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 28px;
}

.section-heading span {
    color: var(--emerald);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.03em;
}

.section-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.home-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.36s ease, opacity 0.36s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.05);
    opacity: 0.86;
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.92);
    color: #fff;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.35);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #111827;
    font-weight: 900;
}

.movie-card-body {
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3,
.ranking-card h2 {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card p,
.ranking-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-card.mini {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
}

.movie-card.mini .poster-link img {
    height: 130px;
    aspect-ratio: auto;
}

.movie-card.mini .poster-play {
    display: none;
}

.tag-row span {
    background: #ecfdf5;
    color: #047857;
}

.tag-row.large span {
    background: rgba(16, 185, 129, 0.14);
    color: #d1fae5;
}

.category-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.category-card,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 24px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #115e59 52%, #2563eb);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:nth-child(3n + 1),
.category-overview-card:nth-child(3n + 1) {
    background: linear-gradient(135deg, #0f172a, #1d4ed8 52%, #10b981);
}

.category-card:nth-child(3n + 2),
.category-overview-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, #111827, #7c3aed 52%, #db2777);
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.25);
}

.category-card span,
.category-overview-card span {
    display: inline-flex;
    margin-bottom: 12px;
    color: #a7f3d0;
    font-size: 13px;
    font-weight: 900;
}

.category-card h3,
.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card p,
.category-overview-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.split-section {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 36px;
}

.ranking-list {
    display: grid;
    gap: 12px;
}

.ranking-list a {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ranking-list span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 900;
}

.ranking-list em {
    color: #f97316;
    font-style: normal;
    font-weight: 900;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.soft-page {
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.page-hero {
    padding: 72px 0;
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 34%), linear-gradient(135deg, #020617, #0f172a);
    color: #fff;
}

.page-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #a7f3d0;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(140px, 0.45fr));
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.empty-state {
    display: none;
    padding: 36px;
    border: 1px dashed #94a3b8;
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: #fff;
}

.empty-state.is-visible {
    display: block;
}

.ranking-card-list {
    display: grid;
    gap: 18px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

.ranking-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.ranking-poster span {
    position: absolute;
    top: 8px;
    left: 8px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(250, 204, 21, 0.95);
    color: #111827;
    font-weight: 900;
}

.detail-page {
    background: #f8fafc;
}

.detail-hero {
    padding: 56px 0 46px;
    background: radial-gradient(circle at 74% 28%, rgba(37, 99, 235, 0.26), transparent 32%), linear-gradient(135deg, #020617, #0f172a 62%, #111827);
    color: #fff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.detail-intro {
    max-width: 780px;
    margin: 22px 0;
    color: #cbd5e1;
    font-size: 19px;
}

.detail-meta {
    margin-bottom: 18px;
}

.player-section {
    padding: 54px 0 20px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.player-box video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.68));
    color: #fff;
    cursor: pointer;
}

.play-button span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald), var(--blue));
    box-shadow: 0 18px 48px rgba(16, 185, 129, 0.34);
    font-size: 34px;
}

.play-button strong {
    font-size: 20px;
}

.player-box.is-playing .play-button {
    opacity: 0;
    pointer-events: none;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 34px 0 12px;
}

.content-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-card p {
    margin: 0;
    color: #334155;
    font-size: 16px;
}

.site-footer {
    background: linear-gradient(180deg, #0f172a, #020617);
    color: #cbd5e1;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 52px 0;
}

.footer-brand {
    color: #fff;
    margin-bottom: 14px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a:hover {
    color: var(--emerald-2);
}

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 1100px) {
    .home-grid,
    .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .desktop-nav {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero-slider,
    .hero-content {
        min-height: 640px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        align-content: center;
    }

    .hero-poster {
        display: none;
    }

    .hero-arrow {
        display: none;
    }

    .split-section,
    .detail-layout,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 260px;
    }

    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .brand-text small {
        display: none;
    }

    .hero-slider,
    .hero-content {
        min-height: 560px;
    }

    .hero-copy h1,
    .detail-info h1,
    .page-hero h1 {
        letter-spacing: -0.035em;
    }

    .hero-copy p,
    .detail-intro,
    .page-hero p {
        font-size: 16px;
    }

    .page-section {
        padding: 48px 0;
    }

    .home-grid,
    .movie-grid,
    .mini-grid,
    .category-grid,
    .category-overview-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        grid-template-columns: 92px 1fr;
        gap: 14px;
    }

    .content-card {
        padding: 22px;
    }
}
