:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --line: #1e293b;
    --line-soft: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #06b6d4;
    --cyan-strong: #22d3ee;
    --green: #22c55e;
    --orange: #f97316;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 18px;
    --radius-sm: 12px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

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(6, 182, 212, 0.15), transparent 34rem),
        radial-gradient(circle at 80% 12%, rgba(59, 130, 246, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    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 rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: #ffffff;
    box-shadow: 0 0 28px rgba(6, 182, 212, 0.35);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 10px 15px;
    border-radius: 12px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(51, 65, 85, 0.74);
    transform: translateY(-1px);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(6, 182, 212, 0.9);
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.24);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.82);
    color: #ffffff;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.58) 44%, rgba(2, 6, 23, 0.15) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 58%, rgba(2, 6, 23, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: flex;
    align-items: flex-end;
    padding: 96px 0 74px;
}

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

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

.hero h1,
.page-hero h1,
.detail-title {
    margin: 18px 0 16px;
    font-size: clamp(36px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 670px;
    margin: 0 0 28px;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 22px);
}

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

.primary-button,
.outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: #ffffff;
    box-shadow: 0 16px 38px rgba(6, 182, 212, 0.28);
}

.primary-button:hover,
.outline-button:hover {
    transform: translateY(-2px) scale(1.01);
}

.outline-button {
    border: 1px solid rgba(148, 163, 184, 0.32);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
}

.outline-button:hover {
    border-color: rgba(34, 211, 238, 0.6);
    background: rgba(8, 145, 178, 0.18);
}

.outline-button.small {
    min-height: 36px;
    padding: 8px 15px;
    font-size: 14px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--cyan);
}

.section {
    padding: 68px 0;
}

.section.alt {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.56), rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.56));
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.12;
}

.section-desc {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.94));
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

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

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.03));
    opacity: 0.82;
}

.play-chip {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.92);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(6, 182, 212, 0.25);
}

.year-chip {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3.1em;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-title:hover {
    color: var(--cyan-strong);
}

.movie-line {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3.1em;
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.movie-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.movie-meta span:not(:last-child)::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-left: 2px;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.7);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.tag {
    padding: 5px 9px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.09);
    color: #a5f3fc;
    font-size: 12px;
}

.category-card {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(37, 99, 235, 0.12) 45%, rgba(15, 23, 42, 0.84));
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.45);
}

.category-icon {
    display: inline-grid;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    font-size: 22px;
    box-shadow: 0 0 26px rgba(6, 182, 212, 0.22);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

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

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 350px);
    gap: 22px;
    overflow-x: auto;
    padding: 2px 0 18px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

.page-hero {
    padding: 76px 0 36px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 26px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.search-box {
    flex: 1 1 280px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.68);
}

.search-box span {
    color: var(--cyan-strong);
    font-size: 20px;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
}

.search-box input::placeholder {
    color: #64748b;
}

.catalog-toolbar select {
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--muted-strong);
    padding: 0 14px;
    outline: 0;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 136px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.42);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--orange), #ef4444);
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.rank-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

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

.rank-title {
    color: #ffffff;
    font-size: 19px;
    font-weight: 850;
}

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

.detail-shell {
    padding: 52px 0 76px;
}

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

.breadcrumb a {
    color: #a5f3fc;
}

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

.player-card,
.detail-card,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: #020617;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

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

.play-button {
    position: relative;
    z-index: 2;
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: #ffffff;
    font-size: 32px;
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.42);
    transition: transform 0.2s ease;
}

.play-button:hover {
    transform: scale(1.08);
}

.player-caption {
    padding: 18px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.player-caption h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
}

.player-caption p {
    margin: 0;
    color: var(--muted-strong);
}

.detail-card {
    margin-top: 24px;
    padding: 26px;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 18px;
    color: var(--muted-strong);
}

.detail-card p:last-child {
    margin-bottom: 0;
}

.side-card {
    padding: 22px;
}

.detail-poster {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 18px;
    aspect-ratio: 4 / 3;
    background: #0f172a;
}

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

.info-list {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--muted-strong);
    font-size: 15px;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
}

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

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

.related-item {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
    border-color: rgba(34, 211, 238, 0.38);
    transform: translateX(3px);
}

.related-item img {
    width: 86px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
}

.related-title {
    display: -webkit-box;
    overflow: hidden;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.86);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 28px;
    padding: 44px 0;
}

.footer-brand {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.site-footer h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.site-footer p,
.site-footer a {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.site-footer a:hover {
    color: var(--cyan-strong);
}

.footer-bottom {
    padding: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: #64748b;
    text-align: center;
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

.empty-state.show {
    display: block;
}

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

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

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

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

    .brand-text {
        font-size: 18px;
    }

    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        padding: 13px 14px;
    }

    .hero,
    .hero-content {
        min-height: 76vh;
    }

    .hero-content {
        padding: 86px 0 76px;
    }

    .hero-mask {
        background:
            linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.6) 55%, rgba(2, 6, 23, 0.35) 100%);
    }

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

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

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

    .movie-title {
        font-size: 16px;
    }

    .rank-row {
        grid-template-columns: 46px 96px 1fr;
    }

    .rank-row .outline-button {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .rank-num {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

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

    .info-list div {
        grid-template-columns: 64px 1fr;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .catalog-toolbar {
        padding: 10px;
    }

    .catalog-toolbar select {
        width: 100%;
    }

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

    .rank-thumb {
        display: none;
    }

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

    .related-item img {
        width: 72px;
        height: 52px;
    }
}
