:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --primary: #a855f7;
    --primary-2: #06b6d4;
    --accent: #f59e0b;
    --radius: 24px;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(168, 85, 247, 0.25), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.18), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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: 56px 56px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    width: min(1240px, calc(100% - 28px));
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.35);
}

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

.site-nav a,
.footer-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--soft);
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.footer-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    width: min(340px, 32vw);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
}

.header-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
}

.header-search input {
    padding: 8px 8px 8px 12px;
}

.header-search button,
.primary-btn,
.ghost-btn {
    border: 0;
    white-space: nowrap;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-btn {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 14px 32px rgba(6, 182, 212, 0.22);
}

.header-search button {
    padding: 8px 14px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    font-weight: 800;
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.hero-slider {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    display: none;
    min-height: 76vh;
    padding: 86px max(24px, calc((100vw - 1200px) / 2)) 92px;
    position: relative;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.55fr);
    align-items: center;
    gap: 56px;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.42) 100%), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    display: grid;
    animation: heroFade 0.65s ease both;
}

.hero-shade,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 74% 46%, rgba(168, 85, 247, 0.35), transparent 26rem), linear-gradient(to top, var(--bg) 0%, transparent 40%);
    pointer-events: none;
}

.hero-copy,
.hero-poster,
.detail-hero-inner {
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 10px;
    color: #67e8f9;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-weight: 950;
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy h1 {
    max-width: 780px;
    font-size: clamp(3rem, 7vw, 6.8rem);
}

.hero-desc {
    max-width: 760px;
    margin: 24px 0 0;
    color: var(--soft);
    font-size: clamp(1rem, 1.45vw, 1.2rem);
    line-height: 1.9;
}

.hero-tags,
.movie-tags,
.large-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin: 26px 0;
}

.hero-tags span,
.movie-tags span,
.large-tags span {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.7);
}

.hero-tags span,
.large-tags span {
    padding: 8px 12px;
}

.movie-tags span {
    padding: 6px 9px;
    font-size: 0.78rem;
}

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

.inline-actions {
    margin-top: 26px;
}

.hero-poster {
    display: block;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster img {
    transition: transform 0.35s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dots button {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: white;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 26px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 999px;
}

.hero-dots button.active {
    width: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.quick-panel,
.section-block,
.page-hero,
.filter-bar,
.story-panel,
.related-panel,
.category-card,
.panel-block {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.quick-panel {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: center;
    margin-top: -36px;
    padding: 26px;
    position: relative;
    z-index: 10;
}

.quick-panel h2,
.section-title h2,
.story-panel h2,
.related-panel h2,
.category-card h2,
.ranking-info h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.85rem);
    font-weight: 900;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chips a {
    padding: 12px 16px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.category-chips a:hover {
    color: white;
    background: rgba(168, 85, 247, 0.22);
}

.section-block {
    margin-top: 36px;
    padding: 28px;
}

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

.section-title a {
    color: #67e8f9;
    font-weight: 800;
}

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

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

.catalog-grid {
    margin-top: 24px;
}

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(103, 232, 249, 0.42);
    background: rgba(15, 23, 42, 0.96);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

.movie-cover img {
    transition: transform 0.3s ease;
}

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

.movie-score,
.movie-play {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
}

.movie-score {
    top: 10px;
    left: 10px;
    padding: 6px 9px;
    font-size: 0.78rem;
    font-weight: 900;
    background: rgba(245, 158, 11, 0.92);
}

.movie-play {
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    background: rgba(168, 85, 247, 0.92);
    box-shadow: 0 12px 28px rgba(168, 85, 247, 0.35);
}

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

.movie-title {
    display: block;
    overflow: hidden;
    color: white;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-title:hover,
.ranking-info a:hover,
.category-card h2 a:hover {
    color: #67e8f9;
}

.movie-meta,
.movie-line,
.ranking-info p,
.category-card p,
.page-hero p,
.detail-one-line,
.story-panel p,
.footer-inner p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-meta {
    margin: 7px 0;
    font-size: 0.84rem;
}

.movie-line {
    min-height: 3.35em;
    margin: 0 0 12px;
    font-size: 0.88rem;
}

.split-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    margin-top: 36px;
}

.panel-block {
    margin: 0;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.rank-item span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.rank-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-item em {
    color: var(--muted);
    font-style: normal;
}

.compact-grid,
.related-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.compact-card {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.compact-card img {
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.compact-card span {
    overflow: hidden;
    color: var(--soft);
    font-size: 0.9rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-main {
    padding: 42px 0 64px;
}

.page-hero {
    padding: clamp(28px, 5vw, 52px);
    background:
        radial-gradient(circle at 88% 10%, rgba(168, 85, 247, 0.34), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.62));
}

.page-hero h1 {
    font-size: clamp(2.3rem, 5vw, 4.8rem);
}

.page-hero p {
    max-width: 790px;
    margin: 18px 0 0;
    font-size: 1.05rem;
}

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

.category-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 18px;
}

.category-collage {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    min-height: 210px;
}

.category-collage img {
    min-height: 0;
    border-radius: 14px;
}

.category-mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-mini-links a {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.06);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 210px;
    gap: 12px;
    margin-top: 24px;
    padding: 14px;
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.45);
}

.filter-bar select option {
    color: #0f172a;
}

.ranking-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 74px 92px 1fr 76px;
    gap: 18px;
    align-items: center;
    padding: 12px;
}

.ranking-index {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    font-size: 1.1rem;
    font-weight: 950;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.ranking-cover {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
}

.ranking-info p {
    margin: 6px 0 10px;
}

.ranking-score {
    justify-self: center;
    color: #fde68a;
    font-size: 1.2rem;
}

.detail-main {
    padding: 0 0 64px;
}

.detail-hero {
    position: relative;
    padding: 42px 0 58px;
    overflow: hidden;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.breadcrumb,
.breadcrumb-split {
    color: var(--soft);
    font-size: 0.92rem;
}

.breadcrumb:hover {
    color: #67e8f9;
}

.breadcrumb-split {
    margin: 0 8px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    align-items: center;
    margin-top: 30px;
}

.detail-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    font-size: clamp(2.4rem, 5vw, 5.2rem);
}

.detail-one-line {
    max-width: 820px;
    margin: 18px 0 22px;
    font-size: 1.1rem;
}

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

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

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover span {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 18px 48px rgba(6, 182, 212, 0.36);
}

.play-cover strong {
    font-size: 1.2rem;
}

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

.story-panel,
.related-panel {
    margin-top: 24px;
    padding: 26px;
}

.story-panel h2 + p {
    margin-top: 12px;
}

.story-panel p + h2 {
    margin-top: 24px;
}

.related-panel {
    margin-top: 0;
    align-self: start;
}

.related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

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

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-inner p {
    margin: 0;
}

.footer-links {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

[hidden] {
    display: none !important;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: scale(1.015);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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

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

    .nav-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .site-nav {
        display: none;
        width: 100%;
        order: 4;
        padding: 10px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.92);
    }

    .site-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header-search {
        width: 100%;
        order: 3;
        margin-left: 0;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-top: 54px;
    }

    .hero-poster {
        width: min(260px, 76vw);
        justify-self: center;
        transform: none;
    }

    .quick-panel,
    .split-layout,
    .category-card,
    .detail-layout,
    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .ranking-card {
        grid-template-columns: 52px 74px 1fr;
    }

    .ranking-score {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        margin-left: 0;
        flex-wrap: wrap;
    }
}

@media (max-width: 620px) {
    .container,
    .footer-inner {
        width: min(100% - 22px, 1200px);
    }

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

    .section-block,
    .page-hero,
    .story-panel,
    .related-panel {
        padding: 18px;
        border-radius: 20px;
    }

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

    .movie-line {
        display: none;
    }

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

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