:root {
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.82);
    --panel-soft: rgba(30, 41, 59, 0.68);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f8fafc;
    --accent-dark: #0f172a;
    --glow: rgba(56, 189, 248, 0.22);
    --warm: rgba(244, 114, 182, 0.18);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 32rem),
        radial-gradient(circle at 85% 8%, rgba(244, 114, 182, 0.12), transparent 28rem),
        var(--page-bg);
}

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

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

button,
input {
    font: inherit;
}

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

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #0f172a;
    background: linear-gradient(135deg, #ffffff, #bae6fd 54%, #fbcfe8);
    box-shadow: 0 18px 42px rgba(125, 211, 252, 0.2);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--soft);
    font-size: 15px;
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-search input,
.mobile-nav input,
.search-box input {
    width: 230px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    outline: none;
    background: rgba(15, 23, 42, 0.72);
    padding: 10px 16px;
}

.search-box input {
    width: min(100%, 520px);
    padding: 14px 18px;
}

.top-search input:focus,
.mobile-nav input:focus,
.search-box input:focus {
    border-color: rgba(226, 232, 240, 0.54);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.76);
    padding: 9px 14px;
}

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

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px 70px;
}

.main-visual {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

.visual-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.8s ease, transform 1.1s ease;
}

.visual-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.visual-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.04);
}

.visual-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.84) 18%, rgba(2, 6, 23, 0.36) 56%, rgba(2, 6, 23, 0.18) 100%),
        radial-gradient(circle at 22% 54%, rgba(56, 189, 248, 0.3), transparent 28rem);
}

.visual-content {
    position: absolute;
    z-index: 2;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: clamp(50px, 10vh, 120px);
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e0f2fe;
    border: 1px solid rgba(186, 230, 253, 0.26);
    background: rgba(14, 165, 233, 0.14);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 14px;
    margin-bottom: 18px;
}

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

.visual-content p {
    margin: 0 0 26px;
    max-width: 680px;
    color: var(--soft);
    font-size: clamp(16px, 2.2vw, 21px);
    line-height: 1.75;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    padding: 13px 20px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
    color: #0f172a;
    background: #ffffff;
}

.btn.ghost {
    color: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.28);
    background: rgba(15, 23, 42, 0.56);
}

.slide-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.58);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.slide-arrow:hover {
    background: rgba(15, 23, 42, 0.85);
    transform: translateY(-50%) scale(1.04);
}

.slide-arrow.prev {
    left: 22px;
}

.slide-arrow.next {
    right: 22px;
}

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

.slide-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.2s ease, background 0.2s ease;
}

.slide-dots button.is-active {
    width: 32px;
    background: #ffffff;
}

.quick-panel {
    position: absolute;
    z-index: 3;
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: clamp(46px, 9vh, 110px);
    width: min(360px, 30vw);
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(18px);
    padding: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.quick-panel h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

.quick-list a {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 12px;
    align-items: center;
}

.quick-list img {
    width: 52px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--panel-soft);
}

.quick-list strong,
.rank-item strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
}

.quick-list span,
.rank-item em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 4px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.section-head a {
    color: #e0f2fe;
    font-weight: 800;
}

.section-block {
    margin-bottom: 60px;
}

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

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

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

.movie-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.78));
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.26);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(226, 232, 240, 0.38);
    box-shadow: 0 30px 84px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(56, 189, 248, 0.1);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.88));
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.88), transparent);
}

.poster-year {
    position: absolute;
    right: 12px;
    top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.card-info {
    display: grid;
    gap: 9px;
    padding: 15px;
}

.card-info strong {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.28;
}

.card-meta,
.card-text {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #cbd5e1;
    padding: 5px 9px;
    font-size: 12px;
}

.horizontal-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
    width: 300px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.feature-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.feature-large {
    min-height: 100%;
}

.feature-large .poster-frame {
    aspect-ratio: 16 / 9;
}

.side-stack {
    display: grid;
    gap: 16px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    border-radius: 18px;
    padding: 10px;
}

.rank-item img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--panel-soft);
}

.page-hero {
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.15), transparent 48%),
        linear-gradient(145deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.82));
    padding: clamp(28px, 5vw, 56px);
    margin-bottom: 34px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.24);
}

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

.page-hero p {
    max-width: 780px;
    color: var(--soft);
    line-height: 1.8;
    margin: 0 0 20px;
}

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

.category-tile {
    min-height: 190px;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 16rem),
        linear-gradient(180deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.8));
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile strong {
    display: block;
    font-size: 22px;
    margin-bottom: 12px;
}

.category-tile span {
    display: block;
    color: var(--muted);
    line-height: 1.7;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.filter-bar button {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
    padding: 9px 15px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-bar button:hover,
.filter-bar button.is-active {
    color: #0f172a;
    border-color: #ffffff;
    background: #ffffff;
}

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

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

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

.player-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000000;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.35);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #0f172a;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.18), rgba(2, 6, 23, 0.54));
    transition: opacity 0.22s ease;
}

.play-cover span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #0f172a;
    background: #ffffff;
    font-size: 30px;
    padding-left: 5px;
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.18);
}

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

.detail-article {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.72);
    padding: clamp(24px, 4vw, 36px);
    margin-top: 24px;
}

.detail-article h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 56px);
    letter-spacing: -0.05em;
    line-height: 1.06;
}

.detail-article h2,
.side-panel h2 {
    margin: 30px 0 12px;
    font-size: 24px;
}

.detail-article p {
    color: var(--soft);
    line-height: 1.95;
    margin: 0 0 16px;
    font-size: 16px;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 20px;
}

.side-panel {
    position: sticky;
    top: 92px;
    align-self: start;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    padding: 18px;
}

.side-panel h2 {
    margin-top: 0;
}

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

.no-results.show {
    display: block;
}

.site-footer {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 52px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 22px;
}

.site-footer strong {
    color: #ffffff;
    font-size: 20px;
}

.site-footer p {
    margin: 8px 0 0;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.site-footer a:hover {
    color: #ffffff;
}

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

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

    .quick-panel {
        display: none;
    }

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

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

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

    .side-panel {
        position: static;
    }

    .site-footer {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .site-footer nav {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .nav-wrap {
        padding: 0 16px;
        min-height: 62px;
    }

    .brand {
        font-size: 19px;
    }

    .container {
        padding: 30px 16px 52px;
    }

    .main-visual {
        min-height: 74vh;
    }

    .visual-content {
        left: 18px;
        right: 18px;
        bottom: 72px;
    }

    .visual-content h1 {
        font-size: clamp(34px, 12vw, 48px);
    }

    .slide-arrow {
        display: none;
    }

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

    .card-info {
        padding: 12px;
    }

    .card-info strong {
        font-size: 15px;
    }

    .card-text,
    .tag-row {
        display: none;
    }

    .page-hero,
    .detail-article,
    .side-panel {
        border-radius: 22px;
    }

    .rank-item {
        grid-template-columns: 48px 1fr;
    }

    .rank-item img {
        width: 48px;
        height: 64px;
    }
}
