* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-light: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.16), transparent 28%), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.35);
}

.nav-shell,
.section-inner,
.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: transparent;
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #2563eb);
    box-shadow: 0 0 32px rgba(56, 189, 248, 0.4);
    font-size: 14px;
}

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

.desktop-nav a,
.mobile-nav a {
    position: relative;
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--accent);
    transition: transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fff;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    transform: scaleX(1);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.72);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    gap: 8px;
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 1%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.2) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.58), transparent);
}

.hero-content {
    position: absolute;
    left: max(16px, calc((100vw - 1180px) / 2));
    bottom: 64px;
    width: min(760px, calc(100% - 32px));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.eyebrow::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.8);
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(44px, 7vw, 78px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.75;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 30px;
    color: #dbeafe;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
}

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

.primary-button,
.ghost-button,
.section-title a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 44px rgba(14, 165, 233, 0.3);
}

.ghost-button {
    color: #e0f2fe;
    border: 1px solid rgba(56, 189, 248, 0.32);
    background: rgba(15, 23, 42, 0.56);
}

.primary-button:hover,
.ghost-button:hover,
.section-title a:hover,
.movie-card:hover,
.category-tile:hover,
.wide-card:hover {
    transform: translateY(-3px);
}

.hero-dots {
    position: absolute;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    display: flex;
    gap: 9px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #64748b;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
    width: 34px;
    background: var(--accent);
}

.search-band,
.category-section {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.92));
    border-block: 1px solid var(--line);
}

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

.search-shell strong {
    display: block;
    font-size: 24px;
}

.search-shell span {
    color: var(--muted);
}

.search-box {
    display: block;
    width: min(430px, 100%);
}

.search-box input {
    width: 100%;
    height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 14px;
    color: #fff;
    outline: 0;
    background: rgba(2, 6, 23, 0.56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.content-section,
.category-section {
    padding: 64px 0;
}

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

.section-title h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.section-title a {
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(15, 23, 42, 0.7);
}

.movie-grid,
.compact-grid,
.category-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-card {
    position: relative;
    display: grid;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 12px 36px rgba(2, 6, 23, 0.25);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 28px 60px rgba(2, 6, 23, 0.42);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

.movie-card:hover img,
.category-tile:hover img {
    transform: scale(1.08);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent);
}

.play-float,
.big-play {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(14, 165, 233, 0.88);
    box-shadow: 0 0 32px rgba(56, 189, 248, 0.46);
}

.play-float {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-float {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #eab308);
}

.card-content {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.card-content strong {
    font-size: 18px;
    line-height: 1.25;
}

.card-content small,
.card-content em,
.wide-card small,
.wide-card em,
.category-copy small {
    color: var(--muted);
    font-style: normal;
    line-height: 1.6;
}

.movie-card:hover strong {
    color: var(--accent);
}

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

.category-tile {
    position: relative;
    min-height: 280px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.4), transparent);
}

.category-copy {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    display: grid;
    gap: 8px;
}

.category-copy strong {
    font-size: 25px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 34px;
    align-items: start;
}

.rank-panel,
.story-card,
.player-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow);
}

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

.small-title {
    margin-bottom: 18px;
}

.small-title h2 {
    font-size: 24px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: rgba(30, 41, 59, 0.62);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.wide-card:hover {
    border-color: rgba(56, 189, 248, 0.42);
    background: rgba(30, 41, 59, 0.9);
}

.wide-card img {
    width: 74px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.wide-card span {
    display: grid;
    gap: 4px;
}

.wide-card strong {
    color: #fff;
}

.page-hero {
    padding: 68px 0 54px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72)), radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.16), transparent 25%);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    max-width: 920px;
    margin: 0 0 18px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 820px;
}

.page-search {
    margin-top: 26px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: end;
    padding: 86px 0 54px;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px);
    opacity: 0.45;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.42) 100%), linear-gradient(90deg, #020617, rgba(2, 6, 23, 0.5));
}

.detail-layout {
    position: relative;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster img {
    width: 260px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--muted);
}

.breadcrumb a:hover,
.tag-row a:hover {
    color: var(--accent);
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 5vw, 70px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

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

.tag-row a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.24);
    background: rgba(15, 23, 42, 0.58);
}

.player-section {
    padding-top: 54px;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-player,
.player-cover,
.player-cover img,
.player-gradient {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    z-index: 1;
    background: #000;
}

.player-cover {
    z-index: 2;
    border: 0;
    padding: 0;
    color: #fff;
    cursor: pointer;
    background: #000;
}

.player-cover.is-hidden {
    display: none;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.74;
}

.player-gradient {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.22));
}

.big-play {
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    transform: translate(-50%, -50%);
    font-size: 30px;
}

.player-cover strong {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 28px;
    font-size: clamp(24px, 4vw, 44px);
    text-align: left;
}

.detail-text {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 32px;
}

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.story-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 40px;
    padding: 44px 0 30px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.9);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 32px;
    align-items: start;
}

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

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

.footer-links a {
    padding: 9px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.7);
}

.footer-links a:hover {
    color: #fff;
    background: rgba(14, 165, 233, 0.28);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 22px;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

@media (max-width: 1080px) {
    .desktop-nav {
        gap: 16px;
    }

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

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

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

    .menu-button {
        display: grid;
        place-items: center;
    }

    .hero-slider {
        height: 78vh;
        min-height: 560px;
    }

    .hero-content {
        bottom: 86px;
    }

    .search-shell,
    .footer-inner,
    .detail-layout,
    .detail-text {
        grid-template-columns: 1fr;
        display: grid;
    }

    .detail-layout {
        gap: 24px;
        align-items: start;
    }

    .detail-poster img {
        width: min(220px, 70vw);
    }

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

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

@media (max-width: 560px) {
    .nav-shell,
    .section-inner,
    .footer-inner,
    .copyright {
        width: min(100% - 24px, 1180px);
    }

    .hero-slider {
        min-height: 620px;
    }

    .hero-actions {
        display: grid;
    }

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

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

    .page-hero,
    .content-section,
    .category-section {
        padding: 44px 0;
    }

    .player-cover strong {
        left: 18px;
        right: 18px;
    }
}
