:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft: #cbd5e1;
    --accent: #10b981;
    --accent-2: #34d399;
    --accent-dark: #047857;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 18px;
    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;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 30rem),
        var(--bg);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    background: rgba(2, 6, 23, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand {
    font-size: 20px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    font-size: 13px;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.28);
}

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

.nav-link {
    color: var(--soft);
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--accent-2);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
}

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

.mobile-nav-link {
    display: block;
    padding: 14px 24px;
    color: var(--soft);
    border-bottom: 1px solid rgba(148, 163, 184, 0.09);
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

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

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.24)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.30) 46%, rgba(2, 6, 23, 0.10) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 88px;
    padding-top: 120px;
}

.hero-copy {
    max-width: 690px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 13px;
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.13);
    color: var(--accent-2);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-line {
    margin: 0;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.15);
    color: #d1fae5;
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.24);
}

.btn-ghost,
.btn-wide {
    background: rgba(15, 23, 42, 0.70);
    border-color: var(--line);
    color: var(--soft);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
    color: white;
    font-size: 35px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 32px;
    border-color: var(--accent-2);
    background: var(--accent-2);
}

.page-top {
    padding-top: 66px;
}

.page-section {
    padding: 36px 0;
}

.search-panel {
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr minmax(260px, 420px);
    gap: 24px;
    align-items: center;
    margin-top: -34px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel.small {
    margin-top: 20px;
}

.search-panel h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.search-panel p {
    margin: 0;
    color: var(--muted);
}

.search-input {
    width: 100%;
    height: 50px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: white;
    outline: none;
    padding: 0 16px;
}

.search-input:focus {
    border-color: rgba(52, 211, 153, 0.70);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

.section-heading.slim {
    display: block;
}

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: -0.03em;
}

.section-heading h2 span {
    color: var(--accent-2);
}

.section-heading p {
    max-width: 560px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

.category-card,
.category-overview-card,
.content-card,
.rank-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.category-card {
    display: grid;
    min-height: 166px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.54);
}

.category-card strong,
.category-overview-card strong {
    font-size: 20px;
}

.category-card span,
.category-overview-card em,
.category-card em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.7;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.64);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.30);
}

.poster-box {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 62%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.year-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.88);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: white;
    font-size: 38px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.movie-card-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.movie-card-body strong {
    overflow: hidden;
    color: white;
    font-size: 17px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.movie-card-body small,
.movie-card-body em {
    color: var(--muted);
    font-style: normal;
}

.movie-card-body em {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.rank-panel {
    align-self: start;
    padding: 22px;
    position: sticky;
    top: 90px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.46);
}

.rank-row span {
    color: var(--accent-2);
    font-weight: 900;
}

.rank-row strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em {
    grid-column: 2;
    overflow: hidden;
    margin-top: -6px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.page-hero {
    display: flex;
    align-items: center;
    min-height: 310px;
}

.compact-hero {
    padding-top: 42px;
}

.breadcrumb,
.breadcrumbs a {
    color: var(--accent-2);
}

.category-overview-card {
    display: grid;
    gap: 14px;
    padding: 16px;
}

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

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

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

.ranking-card {
    display: grid;
    grid-template-columns: 64px 150px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.14);
    color: var(--accent-2);
    font-weight: 900;
}

.ranking-card img {
    width: 150px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-card strong,
.ranking-card em,
.ranking-card small {
    display: block;
}

.ranking-card strong {
    font-size: 20px;
}

.ranking-card em {
    margin: 5px 0;
    color: var(--accent-2);
    font-style: normal;
}

.ranking-card small {
    color: var(--muted);
    line-height: 1.6;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    padding-top: 48px;
    padding-bottom: 34px;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
    color: var(--soft);
}

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

.player-section {
    padding: 20px 0 36px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: 24px;
    background: black;
    box-shadow: var(--shadow);
}

.player-video {
    width: 100%;
    height: 100%;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.34));
    color: white;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button-large {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 24px 60px rgba(16, 185, 129, 0.34);
    font-size: 32px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.content-card {
    padding: 24px;
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: var(--soft);
    line-height: 1.85;
}

.site-footer {
    margin-top: 54px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.84);
}

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

.footer-grid p,
.footer-grid a {
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid a {
    display: block;
}

.footer-grid a:hover {
    color: var(--accent-2);
}

.footer-grid h3 {
    margin: 0 0 12px;
}

.footer-bottom {
    padding: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

[data-card].is-hidden {
    display: none;
}

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

    .two-column-section,
    .detail-content-grid,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 360px;
    }

    .rank-panel {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .hero {
        min-height: 82vh;
    }

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

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .footer-grid,
    .ranking-card {
        grid-template-columns: 1fr;
    }

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

    .ranking-card img {
        width: 100%;
    }
}

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

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

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }
}
