:root {
    color-scheme: dark;
    --page-bg: #0f172a;
    --panel-bg: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --panel-soft: rgba(51, 65, 85, 0.46);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.18);
    --blue: #3b82f6;
    --pink: #f472b6;
    --yellow: #facc15;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.14), transparent 32rem),
        radial-gradient(circle at 86% 4%, rgba(244, 114, 182, 0.10), transparent 28rem),
        linear-gradient(180deg, #0f172a 0%, #111827 42%, #0f172a 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.90), rgba(15, 23, 42, 0.92));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.header-inner,
.footer-inner,
.content-section,
.search-band,
.page-hero,
.detail-hero,
.player-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #06111f;
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.22);
}

.brand-text {
    font-size: 1.28rem;
}

.desktop-nav,
.mobile-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: var(--text);
    background: var(--cyan-soft);
    transform: translateY(-1px);
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-section {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 640px;
    margin: 32px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 36px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 380px;
    align-items: center;
    gap: 42px;
    padding: 64px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-backdrop,
.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.12);
}

.hero-backdrop::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 64% 28%, rgba(34, 211, 238, 0.18), transparent 22rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.92));
}

.hero-copy,
.hero-poster,
.hero-controls,
.hero-orb,
.detail-inner,
.breadcrumb {
    position: relative;
    z-index: 2;
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.36);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.50);
    color: #67e8f9;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.4rem, 6vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-one-line,
.detail-one-line,
.page-hero p {
    max-width: 760px;
    color: var(--muted-strong);
    font-size: clamp(1rem, 2vw, 1.26rem);
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.56);
    color: #dbeafe;
    font-size: 0.82rem;
}

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

.primary-button,
.ghost-button,
.wide-search button,
.filter-actions button,
.player-button,
.panel-more,
.section-link,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button,
.wide-search button,
.player-button {
    border: 0;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #06111f;
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.22);
    cursor: pointer;
}

.ghost-button,
.section-link,
.text-link,
.panel-more {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.52);
    color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.wide-search button:hover,
.filter-actions button:hover,
.player-button:hover,
.panel-more:hover,
.section-link:hover,
.text-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.16);
}

.hero-poster {
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 64px;
    bottom: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 0;
    background: rgba(203, 213, 225, 0.42);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--cyan);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.70);
    color: var(--text);
    font-size: 1.7rem;
    cursor: pointer;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0.55;
}

.hero-orb-one {
    right: 10%;
    top: 12%;
    width: 180px;
    height: 180px;
    background: rgba(34, 211, 238, 0.20);
}

.hero-orb-two {
    left: 18%;
    bottom: 10%;
    width: 140px;
    height: 140px;
    background: rgba(244, 114, 182, 0.16);
}

.search-band {
    margin-top: 24px;
}

.wide-search,
.filter-panel {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(14px);
}

.wide-search input,
.filter-panel input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    padding: 0 12px;
}

.wide-search input::placeholder,
.filter-panel input::placeholder {
    color: var(--muted);
}

.content-section {
    padding: 56px 0 0;
}

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

.section-heading h2,
.panel-heading h2,
.prose-card h2 {
    margin: 12px 0 8px;
    font-size: clamp(1.7rem, 3.2vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.panel-heading p,
.prose-card p,
.category-overview-card p,
.movie-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.category-grid,
.movie-grid,
.category-overview-grid {
    display: grid;
    gap: 18px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
}

.category-card span,
.category-card small {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 1.15rem;
    font-weight: 900;
}

.category-card small {
    margin-top: 8px;
    color: var(--muted-strong);
    line-height: 1.6;
}

.category-card:hover img {
    transform: scale(1.08);
    opacity: 0.42;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.88));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 22px 60px rgba(34, 211, 238, 0.10);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.07);
    filter: brightness(1.08);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
}

.poster-play,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.poster-play {
    left: 12px;
    bottom: 12px;
    padding: 7px 12px;
    background: rgba(34, 211, 238, 0.90);
    color: #06111f;
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: rgba(250, 204, 21, 0.92);
    color: #171717;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.78rem;
}

.card-body h3 {
    margin: 10px 0 8px;
    min-height: 2.8em;
    font-size: 1.04rem;
    line-height: 1.4;
}

.card-body h3 a:hover {
    color: var(--cyan);
}

.card-body p {
    min-height: 5em;
    margin: 0;
    font-size: 0.9rem;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.ranking-panel,
.prose-card,
.filter-panel,
.ranking-table,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.ranking-list,
.ranking-table {
    display: grid;
    gap: 10px;
}

.ranking-row,
.ranking-table-row {
    display: grid;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.58);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ranking-row {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 12px;
}

.ranking-row span,
.ranking-table-row span {
    color: var(--cyan);
    font-weight: 900;
}

.ranking-row strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-row em,
.ranking-table-row em,
.ranking-table-row small {
    color: var(--muted);
    font-style: normal;
}

.ranking-row:hover,
.ranking-table-row:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.36);
    background: rgba(8, 47, 73, 0.46);
}

.panel-more {
    width: 100%;
    margin-top: 16px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    margin-top: 32px;
    border: 1px solid var(--line);
    border-radius: 36px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.page-hero {
    padding: 54px;
}

.compact-hero h1 {
    max-width: 880px;
}

.filter-panel {
    width: min(1240px, calc(100% - 32px));
    margin: 24px auto 0;
    border-radius: var(--radius-xl);
    align-items: center;
    flex-wrap: wrap;
}

.filter-panel input {
    min-height: 48px;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-actions button {
    min-height: 40px;
    border: 1px solid var(--line);
    background: rgba(30, 41, 59, 0.68);
    color: var(--text);
    cursor: pointer;
}

.filter-actions button.is-active {
    background: var(--cyan-soft);
    border-color: rgba(34, 211, 238, 0.42);
    color: #67e8f9;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
}

.category-cover-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-cover-row img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-table-section {
    padding-top: 32px;
}

.ranking-table {
    padding: 16px;
}

.ranking-table-row {
    grid-template-columns: 50px minmax(0, 1fr) 80px 110px minmax(120px, 220px);
    padding: 14px 16px;
}

.detail-hero {
    min-height: 560px;
    padding: 28px 42px 54px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted-strong);
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: var(--cyan);
}

.detail-inner {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: end;
    margin-top: 84px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

.player-section {
    padding-top: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-button {
    position: absolute;
    left: 24px;
    bottom: 24px;
    z-index: 3;
}

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

.detail-content {
    padding-top: 34px;
}

.prose-card {
    padding: 30px;
}

.prose-card h2 {
    font-size: clamp(1.4rem, 2.8vw, 2.2rem);
}

.prose-card p {
    font-size: 1.02rem;
}

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

.info-grid div {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.58);
    padding: 16px;
}

.info-grid span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.info-grid strong {
    color: var(--text);
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 24px;
    padding: 34px 0;
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 900;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    color: var(--muted-strong);
}

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

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

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

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 280px;
        padding: 48px;
    }

    .split-section {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-section {
        min-height: 760px;
        border-radius: 28px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 34px 24px 92px;
    }

    .hero-poster {
        width: min(260px, 62vw);
        margin: 0 auto;
        order: -1;
        transform: rotate(0deg);
    }

    .hero-controls {
        left: 24px;
        bottom: 28px;
    }

    .category-grid,
    .category-overview-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .section-heading,
    .panel-heading {
        align-items: start;
        flex-direction: column;
    }

    .wide-search {
        border-radius: 24px;
        flex-direction: column;
    }

    .filter-panel {
        align-items: stretch;
    }

    .detail-inner,
    .category-overview-card,
    .ranking-table-row {
        grid-template-columns: 1fr;
    }

    .detail-inner {
        margin-top: 42px;
    }

    .detail-poster {
        width: min(280px, 70vw);
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .footer-inner,
    .content-section,
    .search-band,
    .page-hero,
    .detail-hero,
    .player-section,
    .hero-section,
    .filter-panel {
        width: min(100% - 20px, 1240px);
    }

    .brand-text {
        font-size: 1.05rem;
    }

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

    .movie-grid {
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body p,
    .tag-row {
        display: none;
    }

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