* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-soft: rgba(30, 41, 59, 0.68);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #22d3ee;
    --accent-strong: #06b6d4;
    --green: #4ade80;
    --orange: #fb923c;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

.brand-mark {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(34, 211, 238, 0.4);
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.24);
}

.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    border-radius: 999px;
}

.brand-mark::before {
    inset: 12px;
    border: 2px solid var(--accent);
}

.brand-mark::after {
    top: 15px;
    left: 17px;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 12px solid var(--accent);
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.04em;
}

.brand-text em {
    color: rgba(103, 232, 249, 0.78);
    font-size: 12px;
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
}

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

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

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--text);
}

.mobile-menu-button span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 99px;
}

.hero-carousel {
    position: relative;
    min-height: clamp(560px, 82vh, 780px);
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 36%, rgba(2, 6, 23, 0.34) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
}

.eyebrow {
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
    margin: 12px 0 16px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.lead-text {
    max-width: 720px;
    color: var(--soft);
    font-size: 18px;
}

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

.primary-button,
.ghost-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button {
    background: var(--accent-strong);
    color: #001018;
    box-shadow: 0 18px 36px rgba(6, 182, 212, 0.28);
}

.ghost-button,
.small-button {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover {
    transform: translateY(-2px);
}

.ghost-button:hover,
.small-button:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(30, 41, 59, 0.78);
}

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

.hero-dot {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

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

.section {
    padding: 68px 0;
}

.surface-section {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.92));
}

.dark-section {
    background: rgba(2, 6, 23, 0.9);
}

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

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

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

.section-icon {
    color: var(--accent);
}

.section-link {
    color: var(--accent);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 24px 70px rgba(6, 182, 212, 0.12);
}

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

.movie-card-compact .poster {
    aspect-ratio: 16 / 11;
}

.poster img,
.rank-cover img,
.category-tile img,
.category-panel-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.36s ease, opacity 0.2s ease;
}

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 54%);
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.9);
    color: #001018;
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 1;
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(251, 146, 60, 0.95);
    color: #110700;
    font-size: 13px;
}

.movie-card-body {
    padding: 18px;
}

.movie-card-body h3 {
    margin: 8px 0;
    font-size: 20px;
    line-height: 1.25;
}

.movie-card-compact .movie-card-body h3 {
    font-size: 17px;
}

.movie-card-body p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.meta-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.meta-row span,
.detail-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: rgba(103, 232, 249, 0.92);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.16));
}

.category-tile span,
.category-tile small {
    position: absolute;
    z-index: 1;
    left: 18px;
    right: 18px;
}

.category-tile span {
    bottom: 48px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile small {
    bottom: 20px;
    color: var(--soft);
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    position: relative;
    padding: 118px 0 82px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 30rem), rgba(2, 6, 23, 0.84);
}

.category-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.compact-hero h1,
.category-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 200px 200px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.68);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.55);
}

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

.category-panel {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
}

.category-panel-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.category-panel-images img {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
}

.category-panel-body h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-panel-body p {
    margin: 0 0 18px;
    color: var(--muted);
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 96px 42px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.68);
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
}

.rank-index {
    color: var(--orange);
    font-size: 26px;
    font-weight: 900;
    text-align: center;
}

.rank-content h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-content p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 52px 0 76px;
    background: rgba(2, 6, 23, 0.88);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    filter: blur(10px);
    transform: scale(1.04);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.detail-hero-inner {
    position: relative;
    z-index: 1;
}

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

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

.detail-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.8);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-meta {
    margin: 18px 0;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

.main-column,
.side-column {
    display: grid;
    gap: 22px;
    align-content: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.16), rgba(2, 6, 23, 0.74) 58%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.12));
    color: var(--text);
    cursor: pointer;
}

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

.play-large {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.95);
    color: #001018;
    font-size: 30px;
    box-shadow: 0 0 54px rgba(34, 211, 238, 0.46);
}

.player-cover strong {
    font-size: 22px;
}

.content-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.74);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

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

.info-list {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 14px;
    margin: 0;
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: var(--text);
}

.small-button.full {
    width: 100%;
    margin-top: 10px;
}

.site-footer {
    padding: 46px 0;
    border-top: 1px solid var(--line);
    background: #020617;
}

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

.site-footer p {
    max-width: 480px;
    color: var(--muted);
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
    color: var(--muted);
}

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

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

.is-filter-hidden {
    display: none !important;
}

@media (max-width: 980px) {
    .main-nav {
        position: absolute;
        top: 76px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
        white-space: normal;
    }

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

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

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

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

    .detail-poster {
        max-width: 300px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }
}

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

    .hero-carousel {
        min-height: 660px;
    }

    .hero-content {
        padding-top: 32px;
    }

    .hero-content h1,
    .detail-intro h1 {
        font-size: 40px;
    }

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

    .category-panel {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 78px 36px 1fr;
    }

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

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