:root {
    color-scheme: light;
    --stone-950: #0c0a09;
    --stone-900: #1c1917;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-500: #78716c;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --stone-50: #fafaf9;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --white: #ffffff;
    --shadow-md: 0 8px 24px rgba(28, 25, 23, 0.12);
    --shadow-lg: 0 20px 45px rgba(28, 25, 23, 0.18);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--stone-50);
    color: var(--stone-900);
}

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

img,
video {
    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: 50;
    background: rgba(28, 25, 23, 0.96);
    color: var(--stone-100);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.nav-shell {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--amber-500);
    color: var(--stone-950);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.34);
}

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

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

.nav-link,
.mobile-link {
    color: rgba(245, 245, 244, 0.78);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--amber-400);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 250px;
}

.nav-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    padding: 10px 14px;
    outline: none;
}

.filter-bar select option {
    color: var(--stone-900);
}

.nav-search input::placeholder,
.mobile-search input::placeholder,
.filter-bar input::placeholder {
    color: rgba(245, 245, 244, 0.58);
}

.nav-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    background: var(--amber-500);
    color: var(--stone-950);
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--white);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.hero {
    position: relative;
    height: 90vh;
    min-height: 640px;
    overflow: hidden;
    background: var(--stone-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(12, 10, 9, 0.98), rgba(12, 10, 9, 0.62) 44%, rgba(12, 10, 9, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 96px;
}

.hero-copy {
    max-width: 760px;
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--amber-500);
    color: var(--stone-950);
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero h1,
.page-hero h1,
.detail-head h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-head p {
    margin: 0;
    max-width: 720px;
    color: rgba(245, 245, 244, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-meta,
.detail-meta {
    margin: 22px 0 14px;
}

.hero-meta span,
.detail-meta span,
.tag-row span,
.hero-tags span,
.tag-cloud span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(245, 245, 244, 0.88);
    padding: 7px 12px;
    font-size: 13px;
}

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

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

.primary-button {
    background: var(--amber-500);
    color: var(--stone-950);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.32);
}

.primary-button:hover,
.section-link:hover {
    transform: translateY(-2px);
    background: var(--amber-600);
}

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

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 36px;
    z-index: 4;
    transform: translateX(-50%);
}

.hero-dots {
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

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

.hero-rail-section {
    margin-top: -68px;
    position: relative;
    z-index: 6;
}

.hero-rail {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

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

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

.section-head h2,
.rank-panel h2,
.detail-card h2,
.side-card h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 36px);
    color: var(--stone-900);
}

.section-head p {
    margin: 0;
    color: var(--stone-600);
    line-height: 1.7;
}

.centered-head {
    justify-content: center;
    text-align: center;
}

.section-link {
    background: var(--stone-900);
    color: var(--white);
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--stone-900);
}

.compact-card .poster-link,
.library-grid .poster-link,
.ranking-grid .poster-link {
    aspect-ratio: 2 / 3;
}

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

.movie-card:hover img,
.category-tile:hover img {
    transform: scale(1.08);
}

.poster-shade,
.category-tile span {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 10, 9, 0), rgba(12, 10, 9, 0.64));
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    background: rgba(12, 10, 9, 0.82);
    color: var(--white);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    right: auto;
    left: 12px;
    background: var(--amber-500);
    color: var(--stone-950);
}

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

.tag-row span {
    background: var(--stone-100);
    color: var(--stone-700);
    padding: 5px 9px;
}

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

.movie-card h3 a:hover {
    color: var(--amber-700);
}

.movie-card p {
    margin: 0;
    color: var(--stone-600);
    line-height: 1.65;
    font-size: 14px;
}

.category-band {
    background: var(--stone-900);
    color: var(--white);
    padding: 72px 0;
}

.category-band .section-head h2,
.category-band .section-head p {
    color: var(--white);
}

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

.category-tile {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    box-shadow: var(--shadow-lg);
}

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

.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 2;
}

.category-tile strong {
    color: var(--white);
    font-size: 24px;
    margin-bottom: 8px;
}

.category-tile em {
    color: rgba(245, 245, 244, 0.82);
    font-style: normal;
    line-height: 1.55;
}

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

.rank-panel,
.detail-card,
.side-card,
.player-card,
.overview-card {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.rank-panel {
    position: sticky;
    top: 88px;
    padding: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--stone-50);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: #fff7ed;
    transform: translateX(4px);
}

.rank-number {
    color: var(--amber-700);
    font-weight: 900;
    font-size: 18px;
}

.rank-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 9px;
}

.rank-copy strong,
.rank-copy em {
    display: block;
}

.rank-copy strong {
    line-height: 1.35;
}

.rank-copy em {
    color: var(--stone-600);
    font-size: 13px;
    font-style: normal;
    margin-top: 4px;
}

.search-panel {
    padding-top: 0;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
    border-color: var(--stone-200);
    background: var(--white);
    color: var(--stone-900);
    box-shadow: var(--shadow-md);
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.38), transparent 35%), linear-gradient(135deg, var(--amber-700), var(--stone-950));
    color: var(--white);
    padding: 92px 0;
}

.category-hero,
.ranking-hero,
.search-hero {
    padding-bottom: 72px;
}

.hero-filter {
    margin: 28px 0 0;
    max-width: 780px;
}

.wide-filter {
    max-width: 920px;
}

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

.overview-card {
    padding: 24px;
}

.overview-card h2 {
    margin: 0 0 10px;
}

.overview-card p {
    margin: 0 0 18px;
    color: var(--stone-600);
    line-height: 1.7;
}

.mini-posters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.mini-posters img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    object-fit: cover;
}

.small-button {
    padding: 10px 16px;
}

.ranking-page {
    padding-top: 52px;
}

.detail-hero {
    background-size: cover;
    background-position: center;
    padding: 110px 0 82px;
}

.detail-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 10, 9, 0.94), rgba(12, 10, 9, 0.6), rgba(12, 10, 9, 0.18));
}

.detail-head {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(245, 245, 244, 0.76);
    margin-bottom: 18px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 56px 0 0;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card {
    overflow: hidden;
    background: var(--stone-950);
}

.player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--stone-950);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--stone-950);
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42));
    cursor: pointer;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--amber-500);
    color: var(--stone-950);
    font-size: 32px;
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.38);
    padding-left: 6px;
}

.player-wrap.is-ready .player-overlay {
    display: none;
}

.detail-card,
.side-card {
    padding: 28px;
}

.detail-card p {
    margin: 0;
    color: var(--stone-700);
    line-height: 1.9;
    font-size: 16px;
}

.detail-side {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 18px;
}

.side-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

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

.side-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 14px;
    margin: 0 0 20px;
}

.side-card dt {
    color: var(--stone-500);
}

.side-card dd {
    margin: 0;
    color: var(--stone-900);
    font-weight: 700;
}

.tag-cloud span {
    background: var(--stone-100);
    color: var(--stone-700);
}

.site-footer {
    margin-top: 72px;
    background: var(--stone-950);
    color: rgba(245, 245, 244, 0.74);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-brand {
    color: var(--white);
    margin-bottom: 14px;
}

.footer-main p {
    max-width: 520px;
    line-height: 1.8;
}

.site-footer h3 {
    color: var(--white);
    margin: 0 0 14px;
}

.site-footer a {
    display: block;
    margin: 9px 0;
}

.site-footer a:hover {
    color: var(--amber-400);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    padding: 18px;
    color: rgba(245, 245, 244, 0.55);
}

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

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

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

    .card-grid,
    .compact-grid,
    .library-grid,
    .ranking-grid,
    .overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-rail,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .rank-panel,
    .detail-side {
        position: static;
    }
}

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

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 72px;
    }

    .hero h1,
    .page-hero h1,
    .detail-head h1 {
        font-size: 40px;
    }

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

    .hero-actions,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-rail,
    .category-grid,
    .card-grid,
    .compact-grid,
    .library-grid,
    .ranking-grid,
    .overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-rail-section {
        margin-top: 24px;
    }

    .section-block,
    .category-band {
        padding: 46px 0;
    }

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

    .page-hero,
    .detail-hero {
        padding: 70px 0 58px;
    }

    .player-overlay span {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }

    .detail-layout {
        padding-top: 32px;
    }
}
