:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --orange: #fb923c;
    --green: #34d399;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(251, 146, 60, 0.15), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 70%);
}

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

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

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

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.site-logo span,
.footer-logo {
    background: linear-gradient(90deg, var(--cyan), var(--orange));
    -webkit-background-clip: text;
    color: transparent;
}

.site-logo::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--orange));
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-nav a,
.footer-links a,
.chip-link {
    border: 1px solid transparent;
    color: #cbd5e1;
    transition: 0.22s ease;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
}

.site-nav a:hover,
.footer-links a:hover,
.chip-link:hover {
    color: #fff;
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
}

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

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

.hero {
    position: relative;
    height: min(72vh, 640px);
    min-height: 520px;
    margin: 28px auto 48px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.94));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    filter: saturate(1.08) contrast(1.06);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.75), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(720px, 88%);
    padding: clamp(34px, 7vw, 76px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 12px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.1);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.13);
    border: 1px solid rgba(125, 211, 252, 0.15);
    font-size: 13px;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.category-card,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.22s ease;
}

.primary-button {
    padding: 13px 22px;
    color: #04111f;
    background: linear-gradient(90deg, var(--cyan), var(--orange));
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.24);
}

.ghost-button,
.filter-button {
    padding: 12px 18px;
    color: #e2e8f0;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
}

.primary-button:hover,
.ghost-button:hover,
.filter-button:hover,
.movie-card:hover,
.category-card:hover,
.rank-item:hover {
    transform: translateY(-3px);
}

.hero-dots {
    position: absolute;
    right: 34px;
    bottom: 30px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 34px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.35);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: linear-gradient(90deg, var(--cyan), var(--orange));
}

.section {
    margin: 54px 0;
}

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

.section-head h2,
.page-title,
.detail-copy h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-head p,
.page-intro,
.category-card p,
.movie-card p,
.detail-copy p,
.footer-inner p {
    color: var(--muted);
    line-height: 1.72;
}

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

.category-card {
    min-height: 154px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(251, 146, 60, 0.08)),
        rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.category-card strong {
    font-size: 22px;
}

.category-card p {
    margin: 0;
    font-size: 14px;
}

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

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.3), transparent 42%),
        linear-gradient(135deg, #0f172a, #020617);
}

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.88) 100%);
}

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

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

.movie-year {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-weight: 800;
    font-size: 13px;
}

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

.movie-title {
    display: block;
    min-height: 52px;
    color: #fff;
    font-size: 20px;
    line-height: 1.28;
    font-weight: 900;
}

.movie-card p {
    min-height: 74px;
    margin: 12px 0 14px;
    font-size: 14px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #cbd5e1;
    font-size: 13px;
}

.movie-meta a,
.breadcrumb a {
    color: #67e8f9;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 92px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    transition: 0.22s ease;
}

.rank-number {
    font-size: 26px;
    font-weight: 1000;
    color: #67e8f9;
    text-align: center;
}

.rank-cover {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a, #020617);
}

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

.rank-title {
    display: block;
    font-size: 20px;
    font-weight: 900;
}

.rank-text p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.page-hero {
    margin: 32px 0;
    padding: clamp(28px, 6vw, 58px);
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 32px;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 38%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
    box-shadow: var(--shadow);
}

.page-title {
    margin-top: 14px;
}

.page-intro {
    max-width: 820px;
    margin: 18px 0 0;
    font-size: 17px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 190px 190px;
    gap: 12px;
    margin: 24px 0;
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: #fff;
    outline: none;
    background: rgba(15, 23, 42, 0.88);
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 28px;
    align-items: stretch;
    margin-bottom: 34px;
}

.detail-poster,
.detail-info,
.detail-copy,
.player-shell {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #020617);
}

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

.detail-info {
    padding: clamp(26px, 5vw, 46px);
}

.detail-info h1 {
    margin: 20px 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
    color: #cbd5e1;
}

.detail-meta span,
.detail-meta a {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.42);
}

.detail-lead {
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.82;
}

.player-shell {
    margin: 34px 0;
    padding: 14px;
}

.video-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-box video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.video-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.video-box::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 38%), rgba(0, 0, 0, 0.24);
}

.video-box.is-playing img,
.video-box.is-playing::after,
.video-box.is-playing .video-start {
    opacity: 0;
    pointer-events: none;
}

.video-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

.video-start span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    color: #04111f;
    background: linear-gradient(90deg, var(--cyan), var(--orange));
    box-shadow: 0 18px 45px rgba(34, 211, 238, 0.35);
    font-size: 30px;
    padding-left: 5px;
}

.detail-copy {
    margin: 28px 0;
    padding: clamp(24px, 4vw, 38px);
}

.detail-copy p {
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 17px;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
}

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

.footer-links a,
.chip-link {
    padding: 9px 12px;
    border-radius: 999px;
}

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

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

    .detail-poster img {
        max-height: 520px;
    }

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

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

    .rank-item .ghost-button {
        grid-column: 2 / 4;
        width: fit-content;
    }
}

@media (max-width: 760px) {
    .site-header-inner {
        min-height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

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

    .hero {
        min-height: 600px;
        border-radius: 26px;
    }

    .hero-content {
        width: 100%;
        padding: 28px;
    }

    .hero h1,
    .hero h2 {
        font-size: 42px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-dots {
        left: 28px;
        right: auto;
    }

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

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

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

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