:root {
    color-scheme: dark;
    --stone-950: #0c0a09;
    --stone-900: #1c1917;
    --stone-850: #221f1c;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-400: #a8a29e;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --amber-300: #fcd34d;
    --white: #ffffff;
    --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.38);
    --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.24);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #fafaf9 0%, #e7e5e4 42%, #fafaf9 100%);
    color: var(--stone-900);
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(41, 37, 36, 0.98), rgba(68, 64, 60, 0.98), rgba(41, 37, 36, 0.98));
    color: var(--white);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    color: #1c1917;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

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

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

.brand-text small {
    color: var(--stone-200);
    font-size: 12px;
    font-weight: 500;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    padding: 10px 16px;
    border-radius: 12px;
    color: var(--stone-200);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    background: var(--amber-600);
    color: var(--white);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

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

.hero {
    position: relative;
    min-height: 70vh;
    background: var(--stone-900);
    overflow: hidden;
}

.hero-track,
.hero-slide {
    min-height: 70vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.88), rgba(28, 25, 23, 0.52), rgba(28, 25, 23, 0.72)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 25%, rgba(245, 158, 11, 0.22), transparent 32%), linear-gradient(0deg, rgba(28, 25, 23, 1), transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
    align-items: end;
    gap: 48px;
    min-height: 70vh;
    padding: 86px 0 72px;
}

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

.eyebrow,
.section-label {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--amber-600);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.hero-copy h1 {
    margin: 20px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 700px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button.primary {
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    color: #1c1917;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.32);
}

.button.ghost {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.26);
    color: var(--white);
    backdrop-filter: blur(14px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-soft);
    transform: perspective(900px) rotateY(-7deg);
}

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

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

.hero-controls {
    position: absolute;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 24px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(28, 25, 23, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
}

.hero-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 25px;
    line-height: 1;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 28px;
    background: var(--amber-400);
}

.section {
    padding: 72px 0;
}

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

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

.section-heading p {
    max-width: 680px;
    margin: 0;
    color: var(--stone-600);
}

.section-more {
    flex: 0 0 auto;
    color: var(--amber-600);
    font-weight: 800;
}

.search-band {
    padding: 40px 0;
    background: var(--stone-900);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(68, 64, 60, 0.92), rgba(28, 25, 23, 0.98));
    color: var(--white);
    box-shadow: var(--shadow-card);
}

.search-panel p {
    color: var(--stone-200);
}

.home-search,
.filter-search {
    display: flex;
    gap: 10px;
}

.home-search input,
.filter-search input {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(68, 64, 60, 0.18);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--stone-900);
    background: var(--white);
    outline: none;
}

.home-search button,
.filter-buttons button {
    min-height: 50px;
    border: 0;
    border-radius: 14px;
    padding: 0 18px;
    background: var(--amber-600);
    color: var(--white);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 35px rgba(28, 25, 23, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--stone-800);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    color: #1c1917;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

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

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

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

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

.movie-card .tag-row span {
    background: #f5f5f4;
    color: var(--stone-700);
}

.dark-section {
    background: linear-gradient(180deg, var(--stone-900), var(--stone-800));
    color: var(--white);
}

.dark-section .section-heading p {
    color: var(--stone-400);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 34px;
    align-items: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(245, 158, 11, 0.18);
    transform: translateX(4px);
}

.rank-no {
    color: var(--amber-400);
    font-weight: 900;
    font-size: 20px;
}

.rank-title {
    overflow: hidden;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-year {
    color: var(--stone-400);
}

.feature-panel {
    position: sticky;
    top: 96px;
    padding: 34px;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.32), transparent 36%), rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-card);
}

.feature-panel h2 {
    margin: 16px 0 12px;
    font-size: 34px;
    line-height: 1.1;
}

.feature-panel p {
    margin-bottom: 24px;
    color: var(--stone-200);
}

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

.category-card,
.category-overview-card {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #ffffff, #f5f5f4);
    box-shadow: 0 12px 34px rgba(28, 25, 23, 0.09);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.category-card span,
.category-overview-card span {
    color: var(--amber-600);
    font-weight: 900;
}

.category-card p,
.category-overview-card p {
    margin: 10px 0;
    color: var(--stone-600);
    font-size: 14px;
}

.category-card div {
    display: grid;
    gap: 4px;
    color: var(--stone-700);
    font-size: 13px;
}

.page-hero,
.detail-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 96px 0 78px;
    background: var(--stone-900);
    color: var(--white);
}

.page-hero::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.96), rgba(28, 25, 23, 0.72), rgba(28, 25, 23, 0.92)), var(--page-hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
}

.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.24), transparent 34%);
}

.compact-hero {
    padding: 82px 0 66px;
}

.page-hero h1,
.detail-info h1 {
    max-width: 900px;
    margin: 18px 0 14px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--stone-200);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--stone-200);
    font-size: 14px;
}

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

.toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 18px;
    align-items: end;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 34px rgba(28, 25, 23, 0.08);
}

.sticky-toolbar {
    position: sticky;
    top: 88px;
    z-index: 20;
}

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

.filter-search span {
    color: var(--stone-700);
    font-size: 14px;
    font-weight: 800;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-buttons button {
    min-height: 44px;
    background: var(--stone-800);
}

.filter-buttons button.is-active {
    background: var(--amber-600);
}

.category-overview-card {
    min-height: 260px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
}

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

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

.detail-hero {
    padding: 60px 0 70px;
}

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

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

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

.detail-info .lead {
    max-width: 820px;
    margin: 0 0 18px;
    color: var(--stone-200);
    font-size: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    font-weight: 700;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    padding-top: 54px;
    background: var(--stone-950);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: var(--shadow-soft);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.54));
    color: var(--white);
}

.play-cover span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    color: #1c1917;
    font-size: 34px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
}

.player-wrap.is-playing .play-cover {
    display: none;
}

.detail-content-section {
    background: #ffffff;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 34px;
    align-items: start;
}

.detail-article,
.detail-side-card {
    padding: 28px;
    border-radius: var(--radius-md);
    background: #fafaf9;
    box-shadow: 0 12px 34px rgba(28, 25, 23, 0.08);
}

.detail-article h2,
.detail-side-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
    letter-spacing: -0.02em;
}

.detail-article p {
    margin: 0 0 18px;
    color: var(--stone-700);
    font-size: 17px;
}

.detail-side-card dl {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0;
}

.detail-side-card dt {
    color: var(--stone-600);
    font-weight: 800;
}

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

.detail-side-card a {
    color: var(--amber-600);
    font-weight: 800;
}

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

.site-footer {
    background: linear-gradient(180deg, var(--stone-900), var(--stone-950));
    color: var(--stone-200);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
    gap: 36px;
    padding: 54px 0;
}

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

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    max-width: 560px;
    margin: 0;
    color: var(--stone-400);
}

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

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

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--stone-400);
    text-align: center;
}

.movie-card.is-hidden {
    display: none;
}

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

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

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

    .site-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(41, 37, 36, 0.98);
        box-shadow: var(--shadow-card);
    }

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

    .hero-content,
    .search-panel,
    .two-column,
    .toolbar,
    .detail-layout,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        align-items: center;
        padding-top: 72px;
    }

    .hero-poster {
        display: none;
    }

    .feature-panel {
        position: static;
    }

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

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

    .brand-text strong {
        font-size: 16px;
    }

    .brand-text small {
        font-size: 11px;
    }

    .hero,
    .hero-track,
    .hero-slide {
        min-height: 620px;
    }

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

    .section {
        padding: 52px 0;
    }

    .section-heading {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 14px;
    }

    .home-search {
        display: grid;
    }

    .movie-grid,
    .ranking-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card h3 {
        font-size: 16px;
    }

    .movie-card p {
        min-height: auto;
        font-size: 13px;
    }

    .hero-controls {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

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

    .play-cover span {
        width: 68px;
        height: 68px;
    }
}
