:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.74);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(226, 232, 240, 0.24);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #e2e8f0;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    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", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(51, 65, 85, 0.5), transparent 34rem),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

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: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 70%);
}

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

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

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #0f172a;
    background: linear-gradient(135deg, #f8fafc, #94a3b8);
    box-shadow: 0 12px 34px rgba(226, 232, 240, 0.18);
}

.brand-copy {
    display: grid;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 19px;
    letter-spacing: -0.03em;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.desktop-nav a,
.mobile-nav a {
    color: var(--soft);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #ffffff;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.8);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    gap: 4px;
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
}

.mobile-nav a:hover {
    background: rgba(51, 65, 85, 0.55);
}

.hero-slider {
    position: relative;
    height: 86vh;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.75s ease, transform 1.2s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-slide > img,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide > img.image-unavailable,
.detail-bg.image-unavailable,
.poster-frame img.image-unavailable,
.wide-card img.image-unavailable {
    display: none;
}

.hero-shade,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.92) 22%, rgba(2, 6, 23, 0.48) 58%, rgba(2, 6, 23, 0.72) 100%),
        radial-gradient(circle at 25% 32%, rgba(148, 163, 184, 0.18), transparent 32rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 92px;
}

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-kicker span,
.card-tags span,
.eyebrow {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-kicker span {
    padding: 7px 12px;
    backdrop-filter: blur(12px);
}

.hero-content h1 {
    width: min(860px, 100%);
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-content h2 {
    margin: 0 0 14px;
    color: #e2e8f0;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-content p {
    width: min(720px, 100%);
    margin: 0 0 30px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.primary-btn {
    color: #020617;
    background: #f8fafc;
    box-shadow: 0 16px 40px rgba(226, 232, 240, 0.18);
}

.ghost-btn {
    color: #e2e8f0;
    border: 1px solid var(--line-strong);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
}

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

.ghost-btn:hover {
    border-color: rgba(248, 250, 252, 0.56);
    background: rgba(30, 41, 59, 0.86);
}

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

.hero-dot {
    width: 30px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.28);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 56px;
    background: #f8fafc;
}

.search-panel {
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: 1fr minmax(260px, 390px);
    gap: 24px;
    align-items: center;
    margin-top: -38px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-title h2,
.story-panel h2,
.info-panel h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.search-panel p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.search-box {
    display: grid;
    gap: 8px;
}

.search-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.68);
    color: var(--text);
    outline: 0;
    padding: 0 16px;
    font: inherit;
}

.search-box input:focus {
    border-color: rgba(248, 250, 252, 0.72);
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.1);
}

.section-block {
    padding: 76px 0 0;
}

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

.section-title h2 {
    position: relative;
}

.section-title h2::after {
    content: "";
    display: block;
    width: 76px;
    height: 4px;
    margin-top: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f8fafc, rgba(148, 163, 184, 0));
}

.section-title a {
    color: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 800;
}

.section-title a:hover {
    color: #fff;
    border-color: var(--line-strong);
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(226, 232, 240, 0.42);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.poster-frame {
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(71, 85, 105, 0.86), rgba(2, 6, 23, 0.94)),
        radial-gradient(circle at 30% 25%, rgba(226, 232, 240, 0.2), transparent 12rem);
}

.movie-card .poster-frame {
    aspect-ratio: 3 / 4;
    border-radius: 22px 22px 0 0;
}

.poster-frame img,
.wide-card img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.poster-meta,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.76);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.poster-meta {
    right: 12px;
    padding: 7px 10px;
}

.rank-badge {
    left: 12px;
    min-width: 32px;
    height: 32px;
}

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

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.card-tags span {
    padding: 5px 8px;
    font-size: 11px;
}

.movie-card h3 {
    margin: 0 0 9px;
    color: #f8fafc;
    font-size: 18px;
    line-height: 1.28;
    letter-spacing: -0.03em;
}

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

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--soft);
    font-size: 12px;
    font-weight: 800;
}

.soft-band {
    margin-top: 76px;
    padding-bottom: 76px;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.58), transparent);
}

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

.category-tile {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.66)),
        radial-gradient(circle at 85% 15%, rgba(226, 232, 240, 0.18), transparent 12rem);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(226, 232, 240, 0.45);
}

.category-tile span {
    color: #f8fafc;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.category-tile strong {
    color: var(--soft);
    line-height: 1.6;
}

.category-tile em {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    font-style: normal;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.wide-card:hover {
    transform: translateY(-4px);
    border-color: rgba(226, 232, 240, 0.42);
}

.wide-card img {
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.9);
}

.wide-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.wide-card h3 {
    margin: 10px 0;
    font-size: 20px;
    letter-spacing: -0.04em;
}

.wide-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

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

.page-hero {
    position: relative;
    min-height: 330px;
    display: grid;
    align-items: end;
    overflow: hidden;
    margin-top: 24px;
    padding: 48px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.68)),
        radial-gradient(circle at 72% 14%, rgba(226, 232, 240, 0.18), transparent 20rem);
    box-shadow: var(--shadow);
}

.slim-hero {
    min-height: 270px;
}

.eyebrow {
    width: fit-content;
    margin-bottom: 18px;
    padding: 7px 12px;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.page-hero p {
    width: min(720px, 100%);
    margin: 0;
    color: var(--soft);
    font-size: 17px;
    line-height: 1.8;
}

.small-actions {
    margin-top: 24px;
}

.page-search {
    margin-top: 30px;
}

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

.empty-state {
    display: none;
    margin-top: 28px;
    padding: 24px;
    border: 1px dashed var(--line-strong);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.detail-main {
    padding-top: 0;
}

.detail-hero {
    position: relative;
    min-height: 720px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding-top: 130px;
    padding-bottom: 70px;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 38px;
    align-items: end;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow);
}

.detail-info {
    max-width: 800px;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: #fff;
}

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

.detail-info p {
    margin: 0 0 20px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    padding-top: 76px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.68)),
        linear-gradient(to top, rgba(2, 6, 23, 0.62), transparent);
    cursor: pointer;
}

.play-layer.is-hidden {
    display: none;
}

.play-circle {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    justify-self: center;
    border-radius: 999px;
    color: #020617;
    background: #f8fafc;
    font-size: 28px;
    box-shadow: 0 18px 48px rgba(248, 250, 252, 0.22);
}

.play-layer strong {
    font-size: 16px;
    letter-spacing: 0.04em;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr 360px;
    gap: 20px;
    padding-top: 44px;
}

.story-panel,
.info-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    padding: 26px;
}

.story-panel p {
    margin: 16px 0 0;
    color: var(--soft);
    line-height: 1.9;
}

.info-panel dl {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
}

.info-panel div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.info-panel div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.info-panel dt {
    color: var(--muted);
    font-weight: 800;
}

.info-panel dd {
    margin: 0;
    color: var(--soft);
}

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

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0;
}

.site-footer strong {
    font-size: 18px;
}

.site-footer p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 18px;
    color: var(--soft);
    font-size: 14px;
    font-weight: 800;
}

.footer-links a:hover {
    color: #fff;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-slider {
        min-height: 650px;
    }

    .hero-content {
        padding-bottom: 80px;
    }

    .search-panel {
        grid-template-columns: 1fr;
        margin-top: 24px;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .ranking-grid,
    .category-movie-grid,
    .category-grid,
    .all-categories,
    .wide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wide-card {
        grid-template-columns: 104px 1fr;
    }

    .page-hero {
        padding: 32px;
    }

    .detail-hero {
        min-height: auto;
        padding-top: 108px;
    }

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

    .detail-poster {
        width: min(230px, 72vw);
    }

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

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

    .brand-copy small {
        display: none;
    }

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

    .hero-content h2 {
        font-size: 32px;
    }

    .hero-actions,
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .ranking-grid,
    .category-movie-grid,
    .category-grid,
    .all-categories,
    .wide-grid {
        grid-template-columns: 1fr;
    }

    .search-panel,
    .page-hero,
    .story-panel,
    .info-panel {
        padding: 22px;
    }

    .detail-info h1 {
        font-size: 42px;
    }
}
