:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --red: #fb7185;
    --amber: #f59e0b;
    --green: #34d399;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.13), transparent 30%),
        radial-gradient(circle at 90% 8%, rgba(37, 99, 235, 0.16), transparent 34%),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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: 100;
    background: rgba(2, 6, 23, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    color: white;
    font-size: 18px;
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.28);
}

.brand-text strong,
.brand-text small {
    display: block;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
    margin-top: -2px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    color: var(--muted-strong);
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--cyan);
}

.search-wrap {
    position: relative;
    width: min(280px, 26vw);
    flex: 0 1 280px;
}

.site-search,
.catalog-tools input,
.catalog-tools select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--text);
    outline: none;
    padding: 0 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search:focus,
.catalog-tools input:focus,
.catalog-tools select:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

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

.search-item {
    display: block;
    padding: 12px;
    border-radius: 14px;
    color: var(--muted-strong);
}

.search-item:hover {
    background: rgba(34, 211, 238, 0.1);
    color: var(--text);
}

.search-item strong {
    display: block;
    color: var(--text);
    font-size: 15px;
}

.search-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.92);
    color: var(--text);
    cursor: pointer;
}

.mobile-nav {
    padding: 0 18px 18px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
}

.mobile-link {
    display: block;
    padding: 14px 8px;
    border-bottom: 1px solid var(--line);
}

.hero-section {
    position: relative;
    min-height: 640px;
    overflow: hidden;
}

.hero-gallery,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.hero-photo {
    position: relative;
    overflow: hidden;
    opacity: 0.64;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
}

.hero-photo.active {
    opacity: 1;
    transform: scale(1.06);
    filter: saturate(1.14);
}

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

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

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.70), rgba(2, 6, 23, 0.86)),
        radial-gradient(circle at 28% 42%, rgba(34, 211, 238, 0.22), transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
    align-items: center;
    gap: 42px;
    padding: 72px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.hero-copy h1 {
    margin: 18px 0 18px;
    max-width: 820px;
    font-size: clamp(44px, 8vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy h1 span {
    display: block;
    margin-top: 16px;
    color: var(--cyan);
    font-size: clamp(26px, 4.3vw, 44px);
    letter-spacing: -0.03em;
}

.hero-copy p {
    max-width: 660px;
    margin: 0 0 28px;
    color: var(--muted-strong);
    font-size: 20px;
}

.hero-actions,
.hero-stats,
.detail-meta,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

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

.primary-btn {
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    color: white;
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
    border: 1px solid rgba(203, 213, 225, 0.26);
    background: rgba(15, 23, 42, 0.58);
    color: var(--text);
}

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

.hero-stats {
    margin-top: 26px;
    color: var(--muted);
}

.hero-stats span {
    display: inline-flex;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.5);
}

.hero-panel {
    display: grid;
    gap: 14px;
}

.hero-feature {
    display: block;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(14px);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.hero-feature.active,
.hero-feature:hover {
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(8, 47, 73, 0.72);
    transform: translateX(-4px);
}

.hero-feature span,
.hero-feature em {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.hero-feature strong {
    display: block;
    margin: 8px 0 4px;
    color: var(--text);
    font-size: 20px;
}

.content-section {
    padding: 62px 0 0;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.section-heading > span {
    width: 5px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section-heading.red > span {
    background: linear-gradient(180deg, var(--red), #f97316);
}

.section-heading.blue > span {
    background: linear-gradient(180deg, #60a5fa, var(--blue));
}

.section-heading.amber > span {
    background: linear-gradient(180deg, #fbbf24, var(--amber));
}

.section-heading.green > span {
    background: linear-gradient(180deg, var(--green), #059669);
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.1;
}

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

.featured-grid,
.card-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.38);
}

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

.compact-card .poster-link {
    aspect-ratio: 3 / 4.2;
}

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

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

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

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.score-badge {
    top: 12px;
    right: 12px;
    min-width: 44px;
    height: 30px;
    padding: 0 10px;
    background: rgba(15, 23, 42, 0.78);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.28);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    background: linear-gradient(135deg, #fb7185, #f97316);
    color: white;
}

.card-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.86);
    color: white;
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 18px;
}

.card-meta {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-body h3 {
    margin: 8px 0 8px;
    font-size: 19px;
    line-height: 1.3;
}

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

.card-body h3 a:hover {
    color: var(--cyan);
}

.card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted-strong);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.58);
    font-size: 12px;
}

.panel-section {
    padding: 34px;
    margin-top: 62px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.34);
}

.gradient-panel {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.62), rgba(30, 41, 59, 0.36));
}

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

.category-tile {
    position: relative;
    min-height: 150px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.46);
}

.category-number {
    color: rgba(248, 250, 252, 0.18);
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
}

.category-tile strong,
.category-tile em {
    display: block;
}

.category-tile strong {
    margin-top: 18px;
    font-size: 22px;
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
}

.page-main {
    padding-top: 34px;
}

.page-hero {
    position: relative;
    padding: 54px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.20), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.06;
}

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

.catalog-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    max-width: 680px;
    margin-top: 26px;
}

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

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

.detail-main {
    padding-bottom: 20px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 610px;
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.42;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.54), #020617 96%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.90), rgba(2, 6, 23, 0.42));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 34px 0 72px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.25);
    border-radius: 30px;
    background: var(--bg-soft);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-poster span {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    min-width: 54px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #facc15;
    font-weight: 900;
}

.detail-copy h1 {
    margin: 16px 0 18px;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.70);
    border: 1px solid var(--line);
    color: var(--muted-strong);
}

.detail-one-line {
    max-width: 780px;
    margin: 24px 0;
    color: var(--muted-strong);
    font-size: 20px;
}

.detail-copy .primary-btn {
    margin-top: 28px;
}

.player-section {
    margin-top: -52px;
    position: relative;
    z-index: 3;
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.78));
    color: white;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    font-size: 34px;
    box-shadow: 0 22px 50px rgba(34, 211, 238, 0.34);
}

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

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--muted-strong);
    text-align: center;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding-top: 42px;
}

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

.story-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.story-card p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 16px;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
}

.site-footer h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
    color: var(--muted);
}

.site-footer p {
    margin: 0;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .search-wrap {
        width: min(360px, 42vw);
        margin-left: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
    }

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

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

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

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

@media (max-width: 780px) {
    .header-inner {
        height: auto;
        min-height: 68px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .search-wrap {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }

    .hero-section,
    .hero-content {
        min-height: 720px;
    }

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

    .hero-photo:not(.active) {
        display: none;
    }

    .hero-copy h1 {
        font-size: 46px;
    }

    .hero-panel,
    .featured-grid,
    .three-col,
    .four-col,
    .detail-layout,
    .detail-content,
    .catalog-tools,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .panel-section,
    .page-hero {
        padding: 24px;
        border-radius: 26px;
    }

    .detail-layout {
        gap: 26px;
    }

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

    .player-section {
        margin-top: -34px;
    }

    .movie-player {
        border-radius: 18px;
    }

    .play-layer span {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }

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