:root {
    color-scheme: light;
    --stone-950: #1c1917;
    --stone-900: #292524;
    --stone-800: #44403c;
    --stone-700: #57534e;
    --stone-600: #78716c;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --stone-50: #fafaf9;
    --amber-900: #78350f;
    --amber-800: #92400e;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --white: #ffffff;
    --shadow: 0 24px 80px rgba(41, 37, 36, 0.14);
    --soft-shadow: 0 12px 30px rgba(41, 37, 36, 0.1);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--stone-50), var(--stone-100));
    color: var(--stone-800);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 250, 249, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.8);
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--stone-950);
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--amber-600), #ea580c);
    color: white;
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--stone-700);
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
    background: var(--amber-100);
    color: var(--amber-900);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--stone-200);
    border-radius: 999px;
    padding: 6px;
    box-shadow: 0 8px 20px rgba(41, 37, 36, 0.05);
}

.header-search input {
    width: 220px;
    border: 0;
    outline: 0;
    padding: 8px 8px 8px 14px;
    background: transparent;
    color: var(--stone-900);
}

.header-search button,
.big-search button,
.filter-bar button {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    color: white;
    background: linear-gradient(135deg, var(--amber-700), #ea580c);
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    border: 0;
    background: var(--stone-900);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 14px;
}

.page-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.top-gap {
    padding-top: 42px;
}

.hero {
    position: relative;
    overflow: hidden;
    background: var(--stone-950);
}

.hero-stage {
    position: relative;
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-cover,
.detail-hero > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.hero-shade,
.detail-hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.78) 40%, rgba(28, 25, 23, 0.22) 100%),
        radial-gradient(circle at 72% 24%, rgba(245, 158, 11, 0.28), transparent 34%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 90px 0 110px;
    max-width: 1180px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--amber-600);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0;
    max-width: 850px;
    color: white;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    margin: 18px 0 12px;
    color: var(--amber-100);
    font-size: clamp(24px, 4vw, 42px);
}

.hero-text,
.hero-content > p,
.detail-hero-content > p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.9;
}

.hero-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
    color: var(--amber-100);
    border: 1px solid rgba(251, 191, 36, 0.32);
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 700;
}

.card-tags {
    margin-top: auto;
}

.card-tags span {
    color: var(--amber-800);
    background: #fffbeb;
    border-color: #fde68a;
}

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

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

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

.btn.primary {
    color: white;
    background: linear-gradient(135deg, var(--amber-600), #ea580c);
    box-shadow: 0 18px 38px rgba(217, 119, 6, 0.28);
}

.btn.ghost {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn.subtle {
    color: var(--amber-100);
    background: rgba(120, 53, 15, 0.42);
}

.btn.wide {
    width: 100%;
    margin-top: 18px;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

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

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

.quick-panel {
    margin-top: -44px;
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 22px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: 28px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.quick-search h2,
.section-title h2,
.rank-panel h2,
.detail-copy h2,
.detail-info h2 {
    margin: 0;
    color: var(--stone-950);
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.quick-search p {
    margin: 8px 0 18px;
    color: var(--stone-600);
    line-height: 1.8;
}

.big-search {
    display: flex;
    gap: 10px;
    background: var(--stone-100);
    border: 1px solid var(--stone-200);
    border-radius: 20px;
    padding: 8px;
}

.big-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 12px 14px;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    gap: 10px;
}

.category-chips a {
    padding: 10px 14px;
    border-radius: 999px;
    background: #fffbeb;
    color: var(--amber-900);
    border: 1px solid #fde68a;
    font-weight: 700;
}

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

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

.section-title > a {
    color: var(--amber-800);
    font-weight: 800;
}

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

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

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

.movie-card {
    min-width: 0;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(231, 229, 228, 0.82);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background:
        radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.34), transparent 30%),
        linear-gradient(135deg, var(--stone-900), var(--amber-900));
    overflow: hidden;
}

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

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

.cover-fallback img,
img.cover-hidden {
    display: none;
}

.poster-badge,
.poster-year {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(28, 25, 23, 0.72);
    color: white;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 12px;
}

.poster-year {
    right: 12px;
}

.card-body {
    padding: 17px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.card-body h3 {
    margin: 0;
    color: var(--stone-950);
    font-size: 18px;
    line-height: 1.35;
}

.card-body p {
    margin: 0;
    color: var(--stone-600);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card.compact .card-body p {
    -webkit-line-clamp: 2;
}

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

.rank-panel,
.page-hero,
.filter-bar,
.detail-info,
.detail-copy article,
.player-card {
    background: white;
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: 28px;
    box-shadow: var(--soft-shadow);
}

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

.rank-list,
.rank-table {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rank-list li {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--stone-200);
}

.rank-list li:last-child {
    border-bottom: 0;
}

.rank-list span,
.rank-number {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--amber-100);
    color: var(--amber-900);
    font-weight: 900;
}

.rank-list a,
.rank-title {
    color: var(--stone-950);
    font-weight: 800;
}

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

.page-hero {
    padding: 42px;
    background:
        radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.25), transparent 30%),
        linear-gradient(135deg, var(--stone-950), var(--amber-900));
    color: white;
    overflow: hidden;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.9;
}

.small-hero h1,
.category-hero h1 {
    color: white;
    font-size: clamp(30px, 5vw, 52px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 18px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--amber-100);
    font-weight: 700;
}

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

.category-card {
    background: white;
    border: 1px solid var(--stone-200);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--soft-shadow);
}

.category-card-main {
    display: block;
}

.category-card-main span {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--amber-100);
    color: var(--amber-900);
    font-weight: 800;
    margin-bottom: 14px;
}

.category-card-main strong {
    display: block;
    color: var(--stone-950);
    line-height: 1.75;
}

.category-preview {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--stone-200);
}

.category-preview a {
    color: var(--stone-600);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.filter-bar {
    margin: 24px 0;
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
}

.filter-bar.strong {
    padding: 20px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--stone-200);
    border-radius: 16px;
    padding: 12px 14px;
    background: var(--stone-50);
    color: var(--stone-800);
    outline: 0;
}

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

.rank-table {
    background: white;
    border: 1px solid var(--stone-200);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    margin-bottom: 70px;
}

.rank-row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 120px 140px 90px;
    gap: 12px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--stone-200);
}

.rank-row:last-child {
    border-bottom: 0;
}

.detail-page {
    background: linear-gradient(180deg, var(--stone-950) 0, var(--stone-950) 520px, var(--stone-100) 520px);
}

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 90px 0 70px;
}

.watch-layout {
    position: relative;
    z-index: 4;
    margin-top: -56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.player-card {
    padding: 14px;
    background: rgba(255, 255, 255, 0.95);
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    overflow: hidden;
    background: #000;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
    position: relative;
    z-index: 1;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: rgba(28, 25, 23, 0.32);
    cursor: pointer;
}

.play-overlay span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-600), #ea580c);
    box-shadow: 0 20px 50px rgba(217, 119, 6, 0.4);
    font-size: 34px;
    padding-left: 5px;
}

.player-wrap.playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-info {
    padding: 24px;
}

.detail-info dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px 16px;
    margin: 18px 0 0;
}

.detail-info dt {
    color: var(--stone-600);
    font-weight: 700;
}

.detail-info dd {
    margin: 0;
    color: var(--stone-950);
    font-weight: 800;
}

.detail-copy {
    padding-top: 34px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-copy article {
    padding: 28px;
}

.detail-copy p {
    color: var(--stone-700);
    line-height: 2;
    font-size: 16px;
}

.site-footer {
    margin-top: 70px;
    background: var(--stone-950);
    color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
}

.footer-inner strong {
    color: white;
    font-size: 20px;
}

.footer-inner p {
    max-width: 620px;
    line-height: 1.8;
}

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

.footer-links a {
    color: var(--amber-100);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 8px 12px;
}

.copyright {
    grid-column: 1 / -1;
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .mobile-nav.open {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

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

    .split-layout,
    .watch-layout,
    .quick-panel {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

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

@media (max-width: 760px) {
    .page-shell,
    .hero-content,
    .footer-inner {
        width: min(100% - 28px, 1180px);
    }

    .hero-stage,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding-top: 70px;
    }

    .quick-panel {
        margin-top: -24px;
        padding: 18px;
        border-radius: 22px;
    }

    .big-search,
    .hero-actions,
    .section-title,
    .footer-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .detail-copy {
        grid-template-columns: 1fr;
    }

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

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

    .rank-row span:not(.rank-number) {
        display: none;
    }

    .page-hero {
        padding: 28px;
        border-radius: 22px;
    }

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

    .watch-layout {
        margin-top: -28px;
    }

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

@media (max-width: 520px) {
    .movie-grid,
    .compact-grid {
        gap: 16px;
    }

    .hero-content h1 {
        font-size: 34px;
    }

    .hero-content h2 {
        font-size: 26px;
    }

    .brand span:last-child {
        font-size: 18px;
    }
}
