:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-solid: #0f172a;
    --muted-panel: rgba(30, 41, 59, 0.84);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --blue: #38bdf8;
    --cyan: #22d3ee;
    --green: #34d399;
    --orange: #fb923c;
    --yellow: #facc15;
    --red: #fb7185;
    --shadow: 0 28px 80px rgba(2, 8, 23, 0.48);
    --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", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.13), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 38%, #020617 100%);
}

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

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

button, input, select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(2, 8, 23, 0.28);
    backdrop-filter: blur(18px);
}

.nav-inner {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 32px rgba(56, 189, 248, 0.32);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 15px;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-menu a,
.site-footer a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover,
.site-footer a:hover {
    color: var(--blue);
}

.top-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.top-search input {
    width: 100%;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.9);
    padding: 0 16px;
    outline: none;
}

.top-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.top-search button,
.primary-btn,
.ghost-btn,
.play-trigger {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.top-search button {
    height: 42px;
    padding: 0 18px;
    color: #082f49;
    background: white;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: white;
    background: rgba(15, 23, 42, 0.7);
}

.mobile-menu {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0 18px;
    display: grid;
    gap: 12px;
    color: var(--muted);
}

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

.hero {
    position: relative;
    min-height: 520px;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(8, 145, 178, 0.92), rgba(20, 184, 166, 0.9));
    box-shadow: var(--shadow);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.22), transparent 13rem),
        radial-gradient(circle at 75% 25%, rgba(103, 232, 249, 0.22), transparent 16rem),
        linear-gradient(90deg, rgba(2, 8, 23, 0.26), rgba(2, 8, 23, 0.04));
}

.hero-slider {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 48px;
    padding: 48px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-kicker {
    display: inline-flex;
    padding: 8px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero h1 span {
    color: #e0f2fe;
}

.hero p {
    max-width: 620px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-list span,
.detail-tags span {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.42);
    padding: 6px 10px;
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #075985;
    background: white;
    box-shadow: 0 18px 40px rgba(255, 255, 255, 0.18);
}

.ghost-btn {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-poster {
    position: relative;
    z-index: 2;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.42);
    box-shadow: 0 28px 80px rgba(2, 8, 23, 0.42);
    transform: rotate(2deg);
}

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

.hero-poster span,
.score,
.rank-badge,
.mini-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.hero-poster span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    min-width: 56px;
    height: 40px;
    border-radius: 999px;
    color: #0f172a;
    background: var(--yellow);
}

.hero-controls {
    position: absolute;
    left: 48px;
    right: 48px;
    bottom: 28px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.42);
    font-size: 30px;
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: white;
}

.section-heading,
.page-hero {
    margin: 56px 0 24px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.section-kicker {
    font-size: 34px;
}

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.card-content p,
.site-footer p,
.detail-summary p,
.detail-review p,
.category-intro {
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.46);
    box-shadow: 0 26px 70px rgba(8, 145, 178, 0.24);
}

.movie-card.featured {
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr);
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
}

.poster-link {
    display: block;
    height: 100%;
}

.poster-frame {
    position: relative;
    display: block;
    height: 100%;
    min-height: 300px;
    background: rgba(15, 23, 42, 0.7);
    overflow: hidden;
}

.movie-card.horizontal .poster-frame,
.movie-card.featured .poster-frame {
    min-height: 238px;
}

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

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

.score {
    position: absolute;
    right: 12px;
    bottom: 12px;
    min-width: 46px;
    height: 32px;
    border-radius: 999px;
    color: #0f172a;
    background: var(--yellow);
    box-shadow: 0 10px 26px rgba(2, 8, 23, 0.34);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 38px;
    height: 38px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-content {
    padding: 18px;
}

.movie-title {
    display: block;
    margin-bottom: 10px;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.35;
}

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

.movie-meta,
.detail-meta,
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--soft);
    font-size: 14px;
}

.movie-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 12px;
    color: rgba(148, 163, 184, 0.45);
}

.tag-list {
    margin-top: 14px;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(8, 145, 178, 0.7));
    box-shadow: 0 18px 46px rgba(2, 8, 23, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.88), rgba(20, 184, 166, 0.74));
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.86), rgba(244, 63, 94, 0.7));
}

.category-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 24px 60px rgba(8, 145, 178, 0.28);
}

.category-card b {
    display: block;
    margin-bottom: 12px;
    font-size: 34px;
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 116px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--muted-panel);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.44);
}

.compact-card img {
    width: 86px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card strong,
.compact-card em {
    display: block;
}

.compact-card strong {
    margin-bottom: 8px;
    font-style: normal;
    line-height: 1.4;
}

.compact-card em {
    color: var(--soft);
    font-size: 13px;
    font-style: normal;
}

.mini-rank {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border-radius: 9px;
    color: white;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.filter-panel {
    margin: 26px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 14px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--soft);
    font-size: 14px;
}

.filter-panel input,
.filter-panel select {
    height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    color: white;
    background: rgba(2, 6, 23, 0.74);
    padding: 0 14px;
    outline: none;
}

.no-results {
    display: none;
    margin: 28px 0;
    padding: 28px;
    text-align: center;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.76);
}

.no-results.is-visible {
    display: block;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.breadcrumb {
    margin: 14px 0 22px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: black;
    box-shadow: var(--shadow);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: white;
    background: linear-gradient(180deg, rgba(2, 8, 23, 0.08), rgba(2, 8, 23, 0.62));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-trigger span:first-child {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    color: #0f172a;
    background: white;
    font-size: 34px;
    box-shadow: 0 18px 50px rgba(2, 8, 23, 0.42);
}

.detail-title {
    margin: 28px 0 20px;
}

.detail-meta {
    margin-top: 14px;
}

.detail-section,
.side-panel {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    padding: 22px;
    box-shadow: 0 18px 50px rgba(2, 8, 23, 0.18);
}

.detail-section + .detail-section {
    margin-top: 20px;
}

.detail-section h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-poster {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.74);
}

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

.side-panel {
    position: sticky;
    top: 96px;
}

.side-panel .compact-list {
    grid-template-columns: 1fr;
}

.page-hero {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 18rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.78));
    box-shadow: 0 18px 50px rgba(2, 8, 23, 0.22);
}

.page-hero p {
    max-width: 820px;
    margin: 14px 0 0;
}

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

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 14px;
}

.site-footer a {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
}

.copyright {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 32px;
    color: var(--soft);
    font-size: 14px;
}

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

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

    .top-search {
        min-width: 220px;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 300px;
        padding: 36px;
    }

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

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

    .side-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .nav-inner {
        height: auto;
        min-height: 68px;
        gap: 12px;
    }

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

    .top-search {
        order: 3;
        flex: 1 0 100%;
        min-width: 0;
        padding-bottom: 12px;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding: 26px;
    }

    .hero-poster {
        max-width: 260px;
        justify-self: center;
    }

    .hero-controls {
        left: 26px;
        right: 26px;
    }

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

    .movie-card.featured,
    .movie-card.horizontal {
        grid-template-columns: 1fr;
    }

    .poster-frame,
    .movie-card.horizontal .poster-frame,
    .movie-card.featured .poster-frame {
        min-height: 360px;
    }

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

@media (max-width: 460px) {
    main,
    .nav-inner,
    .mobile-menu,
    .footer-grid,
    .copyright {
        width: min(100% - 22px, 1280px);
    }

    .hero h1 {
        font-size: 38px;
    }

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

    .hero-actions {
        display: grid;
    }
}
