:root {
    --night-950: #090d12;
    --night-900: #0d1117;
    --night-850: #111820;
    --night-800: #161b22;
    --night-700: #21262d;
    --night-600: #30363d;
    --night-300: #8b949e;
    --night-200: #b1bac4;
    --night-100: #d0d7de;
    --moss-500: #628f5c;
    --moss-400: #7aaa73;
    --moss-300: #96c48f;
    --moss-200: #b5dcaf;
    --swamp-900: #121a16;
    --swamp-800: #1a2620;
    --swamp-700: #243329;
    --swamp-600: #2d4033;
    --white: #ffffff;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    --shadow-soft: 0 10px 40px rgba(45, 64, 51, 0.38);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--night-900);
    color: var(--night-100);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--swamp-700);
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(12px);
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--swamp-800), var(--moss-500));
    color: var(--white);
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.brand-text strong,
.brand-text em {
    display: block;
}

.brand-text strong {
    color: var(--moss-300);
    font-size: 20px;
    line-height: 1.1;
}

.brand-text em {
    color: var(--night-300);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: var(--night-300);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--moss-300);
}

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

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: var(--night-100);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--swamp-700);
    background: var(--night-800);
    padding: 10px 16px 16px;
}

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

.mobile-nav-link {
    padding: 10px 0;
    color: var(--night-200);
    font-weight: 600;
}

.hero {
    position: relative;
    min-height: 620px;
    height: 72vh;
    max-height: 820px;
    overflow: hidden;
    background: var(--night-950);
}

.hero-slides,
.hero-slide,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    display: grid;
    align-items: end;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.75s ease;
    pointer-events: none;
}

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

.hero-shade {
    background: linear-gradient(90deg, rgba(9, 13, 18, 0.96) 0%, rgba(13, 17, 23, 0.72) 45%, rgba(13, 17, 23, 0.12) 100%),
        linear-gradient(0deg, var(--night-900) 0%, transparent 44%);
}

.hero-content {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 142px;
    max-width: 760px;
    justify-self: start;
}

.hero-tags,
.tag-row,
.detail-meta,
.card-meta,
.inline-links,
.filter-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.inline-links a,
.filter-chip,
.detail-meta span,
.detail-meta a {
    border: 1px solid rgba(150, 196, 143, 0.28);
    border-radius: 999px;
    background: rgba(26, 38, 32, 0.78);
    color: var(--moss-200);
    padding: 6px 12px;
    font-size: 13px;
}

.hero h1 {
    margin: 18px 0 16px;
    color: var(--white);
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 28px;
    max-width: 720px;
    color: var(--night-200);
    font-size: 18px;
}

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

.primary-button,
.ghost-button,
.section-more,
.ranking-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 26px;
    background: var(--moss-500);
    color: var(--white);
    box-shadow: var(--shadow-soft);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.ranking-go:hover {
    transform: translateY(-2px);
}

.primary-button:hover {
    background: var(--moss-400);
}

.ghost-button {
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: var(--night-100);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 82px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

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

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
    width: 30px;
    border-radius: 999px;
    background: var(--moss-300);
}

.hero-strip {
    position: absolute;
    right: max(16px, calc((100vw - 1280px) / 2));
    bottom: 34px;
    z-index: 6;
    display: flex;
    gap: 12px;
    max-width: min(620px, calc(100vw - 32px));
    overflow-x: auto;
    padding-bottom: 4px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 64px 132px;
    align-items: center;
    gap: 10px;
    min-width: 218px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(13, 17, 23, 0.76);
    padding: 8px;
    color: var(--night-100);
    backdrop-filter: blur(10px);
}

.hero-thumb img {
    width: 64px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.hero-thumb span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 14px;
    font-weight: 700;
}

.section {
    padding: 72px 0;
}

.block-night {
    background: var(--night-900);
}

.block-deep {
    background: var(--night-800);
}

.block-swamp {
    background: var(--swamp-900);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.section-heading h2,
.intro-heading h2,
.panel-title h2,
.content-card h2,
.side-card h2,
.player-title h2 {
    margin: 0;
    color: var(--moss-300);
    font-size: 30px;
    line-height: 1.2;
}

.section-heading span {
    height: 3px;
    flex: 1;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--moss-500), transparent);
}

.section-more {
    padding: 9px 15px;
    background: var(--night-800);
    color: var(--moss-200);
    font-size: 14px;
}

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

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

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

.movie-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(36, 51, 41, 0.92);
    border-radius: 18px;
    background: var(--night-800);
    box-shadow: 0 4px 20px rgba(45, 64, 51, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(150, 196, 143, 0.45);
    background: var(--night-700);
    box-shadow: var(--shadow-soft);
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--night-700);
}

.poster-vertical {
    aspect-ratio: 3 / 4;
}

.poster-wide {
    aspect-ratio: 16 / 9;
}

.poster img,
.detail-poster img,
.category-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.card-year {
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    color: var(--white);
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

.play-mark,
.big-play {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--moss-500);
    color: var(--white);
    box-shadow: var(--shadow-soft);
}

.play-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
    display: grid;
    gap: 9px;
    padding: 14px;
}

.movie-card-body strong,
.rank-card strong,
.ranking-info strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--night-100);
    font-size: 16px;
    line-height: 1.35;
}

.movie-card-body em,
.rank-card em,
.ranking-info em {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--night-300);
    font-size: 13px;
    font-style: normal;
}

.card-meta span {
    color: var(--night-300);
    font-size: 12px;
}

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

.intro-heading {
    margin-bottom: 30px;
    text-align: center;
}

.intro-heading p {
    margin: 10px auto 0;
    max-width: 720px;
    color: var(--night-300);
}

.category-pill,
.category-overview-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--swamp-700);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--swamp-800), var(--night-800));
    padding: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-pill:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(150, 196, 143, 0.42);
}

.category-pill strong,
.category-overview-card strong {
    color: var(--moss-300);
    font-size: 20px;
}

.category-pill em,
.category-overview-card em {
    color: var(--night-300);
    font-size: 14px;
    font-style: normal;
}

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

.category-covers img {
    aspect-ratio: 3 / 4;
    border-radius: 10px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.rank-panel,
.content-card,
.side-card,
.player-card {
    border: 1px solid var(--swamp-700);
    border-radius: 22px;
    background: var(--night-800);
    box-shadow: var(--shadow);
}

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

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-title a {
    color: var(--moss-300);
    font-size: 14px;
    font-weight: 700;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 30px 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border-radius: 14px;
    padding: 8px;
    background: var(--night-700);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-card:hover {
    transform: translateX(3px);
    background: var(--swamp-800);
}

.rank-card img {
    width: 58px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-number,
.ranking-index {
    color: var(--moss-300);
    font-weight: 900;
    text-align: center;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
}

.small-hero {
    padding: 58px 0 46px;
    background: radial-gradient(circle at top left, rgba(98, 143, 92, 0.18), transparent 36%), var(--night-850);
    border-bottom: 1px solid var(--swamp-700);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--night-300);
    font-size: 14px;
}

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

.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.12;
}

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

.inline-links {
    margin-top: 22px;
}

.filter-bar {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
}

.search-wide {
    gap: 18px;
}

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

.search-box span {
    color: var(--moss-300);
    font-weight: 800;
}

.search-box input {
    width: min(640px, 100%);
    border: 1px solid var(--swamp-700);
    border-radius: 18px;
    outline: 0;
    background: var(--night-800);
    color: var(--night-100);
    padding: 14px 16px;
}

.search-box input:focus {
    border-color: var(--moss-500);
    box-shadow: 0 0 0 3px rgba(98, 143, 92, 0.18);
}

.filter-chip {
    border: 1px solid var(--swamp-700);
    background: var(--night-800);
}

.filter-chip.active {
    background: var(--moss-500);
    color: var(--white);
}

.empty-state {
    border: 1px solid var(--swamp-700);
    border-radius: 18px;
    background: var(--night-800);
    padding: 24px;
    color: var(--night-300);
    text-align: center;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 58px 82px minmax(0, 1fr) 82px;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--swamp-700);
    border-radius: 18px;
    background: var(--night-800);
    padding: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-2px);
    border-color: rgba(150, 196, 143, 0.42);
    background: var(--night-700);
}

.ranking-row img {
    width: 82px;
    height: 108px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-info {
    display: grid;
    gap: 6px;
}

.ranking-info small {
    color: var(--night-300);
}

.ranking-go {
    padding: 9px 14px;
    background: var(--swamp-800);
    color: var(--moss-200);
}

.detail-hero {
    min-height: 560px;
    background: var(--night-950);
}

.detail-bg,
.detail-shade {
    position: absolute;
    inset: 0;
}

.detail-bg {
    background-position: center;
    background-size: cover;
    filter: blur(8px) saturate(1.1);
    transform: scale(1.04);
    opacity: 0.42;
}

.detail-shade {
    background: linear-gradient(90deg, rgba(13, 17, 23, 0.98), rgba(13, 17, 23, 0.72), rgba(13, 17, 23, 0.94)),
        linear-gradient(0deg, var(--night-900), transparent 44%);
}

.detail-hero-inner {
    position: relative;
    padding: 48px 0 64px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(150, 196, 143, 0.25);
    border-radius: 24px;
    background: var(--night-700);
    box-shadow: var(--shadow);
}

.detail-info {
    display: grid;
    gap: 18px;
    max-width: 820px;
}

.detail-one-line {
    margin: 0;
    color: var(--night-200);
    font-size: 18px;
}

.player-card {
    overflow: hidden;
}

.player-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--swamp-700);
}

.player-title span {
    color: var(--night-300);
    font-size: 14px;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.video-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(0, 0, 0, 0.34);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-cover.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.big-play {
    width: 82px;
    height: 82px;
    font-size: 30px;
}

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

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

.content-card h2,
.side-card h2 {
    margin-bottom: 14px;
    font-size: 24px;
}

.content-card h2:not(:first-child) {
    margin-top: 28px;
}

.content-card p {
    margin: 0;
    color: var(--night-200);
    font-size: 17px;
}

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

.side-card dt {
    color: var(--night-300);
}

.side-card dd {
    margin: 0;
    color: var(--night-100);
}

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

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 36px;
    padding: 42px 0;
}

.footer-brand strong {
    color: var(--moss-300);
    font-size: 22px;
}

.footer-brand p {
    margin: 10px 0 0;
    color: var(--night-300);
}

.footer-links {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links span {
    width: 100%;
    color: var(--night-200);
    font-weight: 800;
}

.footer-links a {
    color: var(--night-300);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--swamp-700);
    padding: 18px;
    color: var(--night-300);
    text-align: center;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1180px) {
    .compact-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

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

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

    .rank-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 680px;
        height: auto;
    }

    .hero-content {
        padding: 120px 0 190px;
    }

    .hero-strip {
        left: 16px;
        right: 16px;
        bottom: 24px;
    }

    .hero-controls {
        bottom: 126px;
    }

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

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

    .detail-poster {
        width: min(260px, 78vw);
    }

    .ranking-row {
        grid-template-columns: 44px 64px minmax(0, 1fr);
    }

    .ranking-row img {
        width: 64px;
        height: 86px;
    }

    .ranking-go {
        display: none;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .container,
    .footer-inner {
        width: min(100% - 24px, 1280px);
    }

    .brand-text em {
        display: none;
    }

    .section {
        padding: 46px 0;
    }

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

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

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

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

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

    .content-card,
    .side-card {
        padding: 20px;
    }
}
