:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(148, 163, 184, 0.34);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --orange: #f97316;
    --rose: #e11d48;
    --green: #10b981;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 12%, rgba(225, 29, 72, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(2, 6, 23, 0.84);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
    font-size: 16px;
}

.brand-copy {
    display: grid;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.brand-copy em {
    font-style: normal;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.desktop-nav > a,
.nav-dropdown > button {
    color: var(--muted-2);
    background: transparent;
    border: 0;
    padding: 9px 4px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.is-active,
.nav-dropdown:hover > button {
    color: var(--text);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    width: 280px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.22s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    color: var(--muted-2);
    padding: 9px 10px;
    border-radius: 12px;
}

.dropdown-panel a:hover {
    background: rgba(51, 65, 85, 0.7);
    color: var(--text);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(340px, 32vw);
}

.header-search input,
.mobile-nav input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 15px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(6, 182, 212, 0.65);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.header-search button,
.mobile-nav button {
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    padding: 11px 18px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    gap: 10px;
}

.mobile-nav a,
.mobile-nav form {
    display: flex;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.74);
}

.mobile-nav a.is-active {
    color: var(--text);
    background: rgba(37, 99, 235, 0.22);
}

main {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    padding: 34px 0 28px;
}

.hero-heading {
    margin: 0 0 22px;
}

.hero-heading span,
.section-head span,
.hero-kicker {
    display: inline-flex;
    color: #67e8f9;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 13px;
    text-transform: uppercase;
}

.hero-heading h1 {
    margin: 8px 0 0;
    font-size: clamp(34px, 6vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-stage {
    position: relative;
    min-height: clamp(560px, 66vw, 720px);
    border-radius: 36px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.45fr);
    align-items: center;
    gap: 40px;
    padding: clamp(28px, 5vw, 72px);
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

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

.hero-copy h2 {
    margin: 14px 0 16px;
    font-size: clamp(36px, 6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 780px;
    margin: 0;
    color: var(--muted-2);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.detail-meta,
.rank-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin: 24px 0 0;
}

.hero-meta span,
.detail-meta span,
.rank-meta span,
.rank-meta a,
.movie-meta-line span,
.movie-meta-line a {
    color: var(--muted-2);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
}

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

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

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 18px 38px rgba(225, 29, 72, 0.24);
}

.ghost-button {
    color: var(--text);
    border: 1px solid var(--line-strong);
    background: rgba(15, 23, 42, 0.56);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    justify-self: end;
    width: min(360px, 100%);
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 28px 76px rgba(0, 0, 0, 0.46);
    transform: rotate(2deg);
}

.hero-poster img,
.poster-link img,
.rank-thumb img,
.detail-poster img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.hero-dots {
    position: absolute;
    left: 42px;
    bottom: 58px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero-dots button {
    width: 28px;
    height: 7px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 54px;
    background: white;
}

.category-strip,
.content-section,
.detail-content,
.player-section {
    margin: 28px 0 64px;
}

.page-block {
    margin-top: -28px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 24px;
}

.section-head.slim {
    align-items: center;
}

.section-head h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

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

.text-link {
    color: #67e8f9;
    font-weight: 700;
}

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

.category-tile {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 10% 12%, rgba(6, 182, 212, 0.22), transparent 12rem),
        linear-gradient(145deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(103, 232, 249, 0.45);
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

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

.movie-card {
    min-width: 0;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #1e293b, #020617);
    border: 1px solid var(--line);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.poster-link img {
    transition: transform 0.32s ease, filter 0.32s ease;
}

.poster-link:hover img {
    transform: scale(1.06);
    filter: saturate(1.15) brightness(1.08);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.year-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    color: white;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
}

.play-mark {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 12px 28px rgba(225, 29, 72, 0.35);
}

.movie-card-body {
    padding: 13px 3px 0;
}

.movie-meta-line {
    gap: 6px;
    margin-bottom: 8px;
}

.movie-meta-line span,
.movie-meta-line a {
    padding: 3px 8px;
    font-size: 12px;
    background: rgba(30, 41, 59, 0.64);
}

.movie-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-copy h3 a:hover {
    color: #67e8f9;
}

.movie-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
}

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

.rank-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-row {
    display: grid;
    grid-template-columns: 56px 74px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.rank-thumb {
    width: 74px;
    height: 104px;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

.rank-copy h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-copy p {
    margin: 0 0 9px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero,
.detail-hero {
    margin: 34px 0 42px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.24), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
    padding: clamp(28px, 5vw, 62px);
    overflow: hidden;
}

.page-hero h1 {
    margin: 12px 0 14px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 800px;
    margin: 0;
    color: var(--muted-2);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: #67e8f9;
}

.breadcrumb a::after {
    content: "/";
    color: var(--muted);
    margin-left: 8px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
}

.filter-panel label {
    display: grid;
    gap: 8px;
}

.filter-panel label span {
    color: var(--muted-2);
    font-weight: 800;
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 38px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.5);
}

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

.detail-hero {
    background-size: cover;
    background-position: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 58px);
    align-items: center;
}

.detail-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-poster span {
    position: absolute;
    inset: auto 18px 18px auto;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.detail-copy h1 {
    margin: 10px 0 16px;
    font-size: clamp(34px, 5.5vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.lead {
    color: var(--muted-2);
    max-width: 880px;
    font-size: 18px;
}

.detail-meta {
    margin: 20px 0;
}

.detail-tags {
    margin-top: 0;
}

.player-section {
    scroll-margin-top: 100px;
}

.player-wrap {
    position: relative;
    width: min(1120px, 100%);
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    overflow: hidden;
    background: black;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.movie-player,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    background: black;
}

.player-cover {
    z-index: 2;
    cursor: pointer;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 23, 0.75);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(225, 29, 72, 0.2), rgba(2, 6, 23, 0.68));
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.big-play {
    position: relative;
    z-index: 3;
    width: clamp(72px, 9vw, 108px);
    height: clamp(72px, 9vw, 108px);
    border: 0;
    border-radius: 50%;
    color: white;
    font-size: 38px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 24px 58px rgba(225, 29, 72, 0.35);
    cursor: pointer;
}

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

.story-card {
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
}

.story-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.story-card p {
    margin: 0;
    color: var(--muted-2);
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.76);
}

.footer-grid {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1.4fr 0.8fr;
    gap: 36px;
    padding: 44px 0;
}

.footer-brand {
    font-size: 24px;
    font-weight: 900;
}

.site-footer p,
.site-footer a,
.footer-bottom {
    color: var(--muted);
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--line);
}

.footer-links a:hover {
    color: var(--text);
    border-color: rgba(103, 232, 249, 0.4);
}

.footer-bottom {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
}

.is-hidden-card {
    display: none !important;
}

@media (max-width: 1180px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

    .rank-list.compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .header-inner,
    main,
    .mobile-nav,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 24px, 1440px);
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .hero-stage {
        min-height: 620px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 26px;
    }

    .hero-dots {
        left: 28px;
        bottom: 34px;
    }

    .section-head,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-grid,
    .movie-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-row {
        grid-template-columns: 42px 64px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .rank-thumb {
        width: 64px;
        height: 92px;
    }
}

@media (max-width: 520px) {
    .category-grid,
    .movie-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-stage {
        min-height: 580px;
    }

    .page-hero,
    .detail-hero {
        border-radius: 24px;
    }

    .rank-copy p,
    .rank-meta span:nth-child(n+3) {
        display: none;
    }
}
