* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --night-950: #0d0d10;
    --night-900: #1a1a1f;
    --night-850: #22222a;
    --night-800: #2c2c34;
    --night-700: #4a4a52;
    --night-500: #6f6f7d;
    --night-400: #888893;
    --night-300: #b8b8c2;
    --night-200: #d2d2dc;
    --gold-500: #eab308;
    --gold-400: #facc15;
    --ember-500: #ef4444;
    --ember-600: #dc2626;
    --white: #ffffff;
    --radius-lg: 18px;
    --radius-md: 12px;
    --max-width: 1180px;
    --glow: 0 0 30px rgba(234, 179, 8, 0.35);
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--night-200);
    background: linear-gradient(135deg, var(--night-900), var(--night-800));
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(26, 26, 31, 0.95);
    border-bottom: 1px solid rgba(113, 63, 18, 0.25);
    backdrop-filter: blur(8px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 800;
    font-size: 20px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--night-950);
    background: linear-gradient(135deg, var(--gold-500), var(--ember-500));
    box-shadow: var(--glow);
}

.brand-text {
    color: transparent;
    background: linear-gradient(90deg, var(--gold-400), #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 10px;
    color: #f3f3f6;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--gold-400);
    background: rgba(44, 44, 52, 0.75);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.filter-row input,
.filter-row select {
    width: 240px;
    min-height: 40px;
    border: 1px solid var(--night-700);
    border-radius: 12px;
    color: #f8f8fb;
    background: var(--night-800);
    outline: none;
    padding: 0 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.14);
}

.header-search button,
.small-button {
    min-height: 40px;
    border: 0;
    border-radius: 12px;
    color: var(--night-950);
    background: linear-gradient(90deg, var(--gold-500), var(--ember-500));
    font-weight: 700;
    padding: 0 14px;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--night-100);
    background: var(--night-800);
}

.mobile-menu {
    display: none;
    border-top: 1px solid var(--night-800);
    background: var(--night-900);
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 14px 16px;
    color: var(--night-200);
    border-bottom: 1px solid rgba(74, 74, 82, 0.35);
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--night-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
}

.hero-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(26, 26, 31, 0.50), rgba(26, 26, 31, 0.72), var(--night-900));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(660px, 100%);
    display: grid;
    gap: 22px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 5px 14px;
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: 999px;
    color: var(--gold-400);
    background: rgba(234, 179, 8, 0.16);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 0;
    color: var(--white);
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0;
    max-width: 620px;
    color: var(--night-200);
    font-size: 18px;
    line-height: 1.8;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: var(--night-300);
}

.meta-line span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

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

.primary-cta {
    color: var(--night-950);
    background: linear-gradient(90deg, var(--gold-500), var(--ember-500));
}

.secondary-cta {
    color: var(--night-100);
    background: rgba(44, 44, 52, 0.72);
    border: 1px solid rgba(234, 179, 8, 0.24);
}

.primary-cta:hover,
.secondary-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 54px;
    background: linear-gradient(90deg, var(--gold-500), var(--ember-500));
}

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

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

.section-title {
    margin: 0;
    color: var(--white);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    font-weight: 900;
}

.section-rule {
    flex: 1;
    height: 4px;
    min-width: 80px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.55), transparent);
}

.section-more {
    color: var(--gold-400);
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    display: grid;
    gap: 12px;
    min-width: 0;
}

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

.movie-card:hover h3 {
    color: var(--gold-400);
}

.poster {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--night-800);
    border: 1px solid rgba(74, 74, 82, 0.55);
    aspect-ratio: 2 / 3;
}

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 25%, rgba(13, 13, 16, 0.92));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .poster::after {
    opacity: 1;
}

.card-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 5px 8px;
    border-radius: 8px;
    color: var(--white);
    background: rgba(13, 13, 16, 0.82);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(4px);
}

.rank-badge {
    left: 12px;
    right: auto;
    color: var(--night-950);
    background: linear-gradient(90deg, var(--gold-500), var(--ember-500));
}

.card-hover-text {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
    color: var(--white);
    font-size: 14px;
    line-height: 1.55;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.movie-card:hover .card-hover-text {
    transform: translateY(0);
}

.movie-card h3 {
    margin: 0;
    color: #f5f5f7;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
    transition: color 0.2s ease;
}

.movie-card p {
    margin: 0;
    color: var(--night-400);
    font-size: 14px;
    line-height: 1.55;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--night-400);
    font-size: 13px;
}

.wide-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    overflow: hidden;
    border: 1px solid rgba(74, 74, 82, 0.65);
    border-radius: var(--radius-lg);
    background: rgba(44, 44, 52, 0.48);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.wide-card:hover {
    border-color: rgba(234, 179, 8, 0.35);
    background: rgba(44, 44, 52, 0.78);
    transform: translateY(-2px);
}

.wide-card .wide-cover {
    position: relative;
    min-height: 130px;
    background: var(--night-800);
}

.wide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wide-card-body {
    display: grid;
    align-content: center;
    gap: 10px;
    padding: 18px;
}

.wide-card h3 {
    margin: 0;
    color: var(--white);
    font-size: 20px;
    font-weight: 900;
}

.wide-card p {
    margin: 0;
    color: var(--night-300);
    line-height: 1.65;
}

.category-card {
    display: grid;
    gap: 16px;
    min-height: 220px;
    padding: 26px;
    border: 1px solid rgba(74, 74, 82, 0.65);
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at top right, rgba(234, 179, 8, 0.14), transparent 36%), rgba(44, 44, 52, 0.50);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(234, 179, 8, 0.35);
}

.category-card h2,
.category-card h3 {
    margin: 0;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: var(--night-300);
    line-height: 1.7;
}

.category-count {
    width: max-content;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--gold-400);
    background: rgba(234, 179, 8, 0.14);
    border: 1px solid rgba(234, 179, 8, 0.25);
    font-weight: 800;
}

.page-hero {
    padding: 54px 0;
    background: radial-gradient(circle at top left, rgba(234, 179, 8, 0.16), transparent 30%), rgba(13, 13, 16, 0.35);
    border-bottom: 1px solid rgba(113, 63, 18, 0.22);
}

.page-hero h1 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.1;
    font-weight: 900;
}

.page-hero p {
    margin: 0;
    max-width: 760px;
    color: var(--night-300);
    font-size: 18px;
    line-height: 1.75;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(74, 74, 82, 0.65);
    border-radius: var(--radius-lg);
    background: rgba(44, 44, 52, 0.48);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-row input {
    flex: 1 1 260px;
    width: auto;
}

.filter-row select {
    width: 180px;
}

.empty-state {
    display: none;
    padding: 34px;
    text-align: center;
    border-radius: var(--radius-lg);
    color: var(--night-300);
    background: rgba(44, 44, 52, 0.50);
}

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

.ranking-list {
    display: grid;
    gap: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: 72px 96px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(74, 74, 82, 0.62);
    background: rgba(44, 44, 52, 0.48);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    border-color: rgba(234, 179, 8, 0.34);
}

.rank-number {
    color: transparent;
    background: linear-gradient(135deg, var(--gold-400), var(--ember-500));
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-thumb {
    width: 96px;
    height: 126px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--night-800);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-copy {
    display: grid;
    gap: 8px;
}

.rank-copy h2,
.rank-copy h3 {
    margin: 0;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
}

.rank-copy p {
    margin: 0;
    color: var(--night-300);
    line-height: 1.65;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    padding: 38px 0 64px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(13, 13, 16, 0.48);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button-core {
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--night-950);
    background: linear-gradient(135deg, var(--gold-500), var(--ember-500));
    box-shadow: var(--glow);
    font-size: 34px;
    transform: translateZ(0);
    transition: transform 0.2s ease;
}

.player-overlay:hover .play-button-core {
    transform: scale(1.08);
}

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

.detail-title {
    margin: 0;
    color: var(--white);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 900;
}

.info-card {
    padding: 24px;
    border: 1px solid rgba(74, 74, 82, 0.65);
    border-radius: var(--radius-lg);
    background: rgba(44, 44, 52, 0.50);
}

.info-card h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
}

.info-card p {
    margin: 0;
    color: var(--night-300);
    line-height: 1.85;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 12px;
    color: var(--night-300);
    background: rgba(44, 44, 52, 0.88);
    border: 1px solid rgba(74, 74, 82, 0.58);
    font-size: 13px;
}

.sidebar-card {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(74, 74, 82, 0.65);
    background: rgba(44, 44, 52, 0.50);
}

.sidebar-card h2,
.sidebar-card h3 {
    margin: 0;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
}

.related-link {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.related-link:hover {
    background: rgba(74, 74, 82, 0.35);
}

.related-link img {
    width: 78px;
    height: 104px;
    border-radius: 10px;
    object-fit: cover;
}

.related-copy {
    min-width: 0;
}

.related-copy h3 {
    margin: 0 0 8px;
    color: #f5f5f7;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 800;
}

.related-copy p {
    margin: 0;
    color: var(--night-400);
    font-size: 13px;
    line-height: 1.55;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--night-400);
    font-size: 14px;
}

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

.site-footer {
    border-top: 1px solid var(--night-800);
    background: var(--night-950);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding: 34px 0;
    color: var(--night-400);
    font-size: 14px;
}

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

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

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

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

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

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

    .sidebar-card {
        position: static;
    }
}

@media (max-width: 700px) {
    .hero {
        height: 640px;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 76px;
    }

    .hero p {
        font-size: 16px;
    }

    .section-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-rule {
        width: 100%;
        flex: none;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 48px 74px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        font-size: 22px;
    }

    .rank-thumb {
        width: 74px;
        height: 98px;
    }

    .rank-copy h2,
    .rank-copy h3 {
        font-size: 18px;
    }

    .filter-row select {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
    }
}
