* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(100, 116, 139, 0.34);
    --line-strong: rgba(6, 182, 212, 0.35);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --accent: #22d3ee;
    --accent-strong: #06b6d4;
    --blue: #2563eb;
    --gold: #facc15;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 12% 6%, rgba(34, 211, 238, 0.13), transparent 32rem),
        radial-gradient(circle at 88% 18%, rgba(37, 99, 235, 0.16), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-strong), var(--blue));
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.25);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--accent);
}

.header-search {
    position: relative;
    width: 220px;
    flex-shrink: 0;
}

.header-search input,
.section-search input {
    width: 100%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.section-search input:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.09);
}

.search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, 88vw);
    max-height: 420px;
    overflow: auto;
    background: rgba(2, 6, 23, 0.96);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 10px;
    display: none;
}

.search-panel.is-open {
    display: block;
}

.search-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    color: var(--muted);
}

.search-item:hover {
    background: rgba(30, 41, 59, 0.82);
}

.search-item img {
    width: 54px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: #0f172a;
}

.search-item strong {
    display: block;
    color: #fff;
    margin-bottom: 4px;
}

.mobile-menu-button {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #e2e8f0;
    border-radius: 2px;
}

.hero {
    position: relative;
    height: min(680px, calc(100vh - 72px));
    min-height: 560px;
    overflow: hidden;
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
}

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

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 44%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, #020617 0%, transparent 36%);
}

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

.hero-copy {
    max-width: 720px;
    padding-top: 30px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.16);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 20px 0 18px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.045em;
}

.hero p {
    color: var(--muted);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.75;
    max-width: 690px;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--subtle);
    font-size: 14px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
    border-radius: 999px;
    padding: 6px 10px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-strong), var(--blue));
    box-shadow: 0 18px 45px rgba(6, 182, 212, 0.24);
}

.button.secondary {
    color: var(--muted);
    background: rgba(15, 23, 42, 0.68);
    border-color: var(--line);
}

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

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.hero-dots {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 54px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
}

.hero-dot.is-active {
    background: var(--accent);
}

.section {
    padding: 58px 0;
}

.section.compact {
    padding: 36px 0;
}

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

.section-kicker {
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section h2,
.page-hero h1,
.detail-section h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.section-head p,
.page-hero p,
.detail-section p,
.category-card p {
    color: var(--subtle);
    line-height: 1.75;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.78));
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: 0 24px 70px rgba(6, 182, 212, 0.14);
}

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

.large-card .poster-link {
    aspect-ratio: 16 / 10;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.25s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.78) 100%);
}

.play-badge {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-strong), var(--blue));
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.35);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body p {
    color: var(--subtle);
    font-size: 14px;
    line-height: 1.6;
    min-height: 44px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    color: #a5f3fc;
    font-size: 12px;
    border-radius: 999px;
    padding: 5px 8px;
    background: rgba(6, 182, 212, 0.12);
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.62));
    box-shadow: var(--shadow);
}

.page-hero {
    padding: 72px 0 34px;
}

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

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

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

.category-card {
    padding: 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.11), rgba(30, 41, 59, 0.72));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--line-strong);
}

.category-card h2 {
    margin: 0 0 10px;
}

.category-card .button {
    margin-top: 18px;
}

.section-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 24px;
}

.section-search {
    max-width: 420px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 92px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.66);
}

.rank-number {
    color: var(--gold);
    font-size: 30px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 92px;
    height: 124px;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.rank-item h2,
.rank-item h3 {
    margin: 0 0 10px;
}

.rank-item p {
    color: var(--subtle);
    line-height: 1.65;
    margin: 0;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.38);
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.22), rgba(2, 6, 23, 0.78));
}

.player-button {
    position: relative;
    z-index: 3;
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 28px;
    background: linear-gradient(135deg, var(--accent-strong), var(--blue));
    box-shadow: 0 22px 70px rgba(6, 182, 212, 0.35);
    cursor: pointer;
}

.player-shell.is-playing .player-cover {
    display: none;
}

.detail-title {
    padding: 26px 0 20px;
}

.detail-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-side {
    position: sticky;
    top: 96px;
    padding: 18px;
}

.detail-side img {
    width: 100%;
    border-radius: 20px;
    margin-bottom: 16px;
    background: #0f172a;
}

.info-list {
    display: grid;
    gap: 12px;
    color: var(--muted);
}

.info-list div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.info-list strong {
    color: #fff;
}

.detail-section {
    padding: 24px;
    margin-bottom: 22px;
}

.detail-section p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer p,
.footer-bottom {
    color: var(--subtle);
    line-height: 1.75;
}

.site-footer h3 {
    margin: 0 0 14px;
}

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

.footer-links a {
    color: var(--subtle);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--line);
    margin-top: 30px;
    padding-top: 18px;
    font-size: 14px;
}

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

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

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        overflow: visible;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.94);
    }

    .main-nav.is-open {
        display: flex;
    }

    .header-search {
        width: 100%;
        order: 4;
    }

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

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

    .hero-controls {
        right: 20px;
        bottom: 24px;
    }

    .hero-dots {
        left: 20px;
        bottom: 40px;
    }

    .section-head,
    .section-toolbar,
    .footer-bottom {
        display: block;
    }

    .section-search {
        max-width: none;
        margin-top: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .movie-grid,
    .movie-grid.dense,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .card-body p {
        min-height: 0;
        font-size: 13px;
    }

    .rank-item {
        grid-template-columns: 44px 72px 1fr;
    }

    .rank-item .button {
        grid-column: 1 / -1;
    }

    .rank-item img {
        width: 72px;
        height: 96px;
    }
}
