:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #1e293b;
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.2);
    --text: #f8fafc;
    --muted: #94a3b8;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --yellow: #facc15;
    --green: #34d399;
    --red: #fb7185;
    --shadow: 0 25px 80px rgba(15, 23, 42, 0.45);
    --radius: 20px;
    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 20% 5%, rgba(59, 130, 246, 0.18), transparent 30rem),
        radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.12), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand {
    min-width: max-content;
    font-size: 1.55rem;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
    font-size: 0.85rem;
}

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

.desktop-nav a {
    color: #cbd5e1;
    font-size: 0.95rem;
    padding: 10px 0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: #67e8f9;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
}

.header-search input,
.mobile-panel input,
.search-control input,
.local-search input {
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
}

.header-search input {
    width: 190px;
    padding: 8px 10px 8px 14px;
}

.header-search input::placeholder,
.mobile-panel input::placeholder,
.search-control input::placeholder,
.local-search input::placeholder {
    color: #64748b;
}

.header-search button,
.mobile-panel button,
.search-control button,
.hero-cta,
.btn-secondary {
    border: 0;
    color: #ffffff;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-panel button,
.search-control button,
.hero-cta {
    background: linear-gradient(135deg, var(--blue), #2563eb);
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.28);
}

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

.header-search button:hover,
.mobile-panel button:hover,
.search-control button:hover,
.hero-cta:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    color: white;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.86);
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 20px;
    border-top: 1px solid var(--line);
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.mobile-panel a {
    padding: 12px 14px;
    color: #cbd5e1;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
}

.mobile-panel form,
.search-control,
.local-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.mobile-panel input,
.search-control input,
.local-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
}

.mobile-panel button,
.search-control button {
    padding: 10px 18px;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-slide::before,
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
}

.hero-slide::before {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-slide::after {
    background: radial-gradient(circle at 18% 72%, rgba(37, 99, 235, 0.4), transparent 24rem);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    z-index: 2;
    pointer-events: none;
}

.hero-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 78px;
    pointer-events: auto;
}

.hero-kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 13px;
    margin-bottom: 18px;
    color: #a5f3fc;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(14px);
}

.hero h1,
.hero h2 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(2.6rem, 8vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 700px;
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.movie-meta span,
.detail-meta span,
.category-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(30, 64, 175, 0.42);
    border: 1px solid rgba(96, 165, 250, 0.16);
}

.hero-tags span {
    padding: 9px 14px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.hero-cta,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 24px;
    font-weight: 800;
}

.btn-secondary {
    color: #e0f2fe;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
}

.hero-nav {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: white;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(10px);
    cursor: pointer;
    pointer-events: auto;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(37, 99, 235, 0.86);
    transform: translateY(-50%) scale(1.04);
}

.hero-arrow.prev {
    left: max(18px, calc((100vw - 1180px) / 2));
}

.hero-arrow.next {
    right: max(18px, calc((100vw - 1180px) / 2));
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
    pointer-events: auto;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.content-stack {
    display: grid;
    gap: 76px;
    padding: 72px 0;
}

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

.section-heading > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    border-radius: 14px;
    color: #0f172a;
    background: linear-gradient(135deg, var(--yellow), var(--cyan));
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    letter-spacing: -0.04em;
}

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

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

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

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 260px;
    gap: 22px;
    overflow-x: auto;
    padding: 6px 2px 18px;
    scroll-snap-type: x proximity;
}

.movie-rail .movie-card {
    scroll-snap-align: start;
}

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 55px rgba(2, 6, 23, 0.18);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow: 0 26px 70px rgba(37, 99, 235, 0.2);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 68%);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 999px;
    opacity: 0;
    background: rgba(59, 130, 246, 0.9);
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rating-mark,
.duration-mark,
.rank-number {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
}

.rating-mark {
    top: 12px;
    right: 12px;
    padding: 6px 9px;
    color: #111827;
    font-size: 0.78rem;
    background: var(--yellow);
}

.duration-mark {
    left: 12px;
    bottom: 12px;
    padding: 6px 9px;
    color: white;
    font-size: 0.74rem;
    background: rgba(2, 6, 23, 0.72);
}

.rank-number {
    left: 12px;
    top: 12px;
    min-width: 40px;
    height: 40px;
    color: #111827;
    background: linear-gradient(135deg, var(--yellow), #fb923c);
    box-shadow: 0 14px 32px rgba(250, 204, 21, 0.24);
}

.movie-info {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-title {
    color: white;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
    color: #60a5fa;
}

.movie-desc {
    min-height: 44px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-meta span,
.detail-meta span,
.category-chip {
    padding: 6px 10px;
    font-size: 0.78rem;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 44% 1fr;
}

.movie-card-wide .movie-poster {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card-wide .movie-info {
    align-content: center;
    padding: 26px;
}

.movie-card-wide .movie-title {
    font-size: 1.35rem;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-card:hover img {
    opacity: 0.42;
    transform: scale(1.08);
}

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

.category-card-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
}

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 1.55rem;
}

.category-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.7;
}

.page-hero,
.detail-top {
    padding: 64px 0 30px;
}

.page-hero-panel {
    overflow: hidden;
    position: relative;
    padding: clamp(28px, 5vw, 56px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 30px;
    background:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.34), transparent 22rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(2, 6, 23, 0.95));
    box-shadow: var(--shadow);
}

.page-hero-panel h1,
.detail-copy h1 {
    max-width: 920px;
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.page-hero-panel p,
.detail-copy p {
    max-width: 760px;
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 1.05rem;
}

.local-search {
    margin: 26px 0 0;
    max-width: 620px;
}

.local-search button {
    color: white;
    border: 0;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.95);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-chips button {
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    cursor: pointer;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-chips button.active {
    color: white;
    background: rgba(37, 99, 235, 0.92);
}

.ranking-list {
    display: grid;
    gap: 18px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 68px 190px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 18px;
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.38);
}

.ranking-badge {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--yellow);
    text-align: center;
}

.ranking-item img {
    width: 190px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-copy h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.ranking-copy p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.65;
}

.ranking-score {
    min-width: 92px;
    text-align: right;
    color: var(--yellow);
    font-size: 1.2rem;
    font-weight: 900;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
    gap: 32px;
    padding: 36px 0 76px;
}

.watch-panel {
    overflow: hidden;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: black;
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: white;
    background: rgba(0, 0, 0, 0.35);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 22px 60px rgba(37, 99, 235, 0.42);
}

.detail-copy {
    display: grid;
    gap: 18px;
    padding: 26px;
}

.detail-copy h1 {
    font-size: clamp(2rem, 4vw, 3.8rem);
}

.detail-meta {
    margin: 4px 0;
}

.article-panel,
.side-panel {
    padding: 26px;
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.article-panel + .article-panel {
    margin-top: 22px;
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 1.4rem;
}

.article-panel p,
.side-panel p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
}

.side-panel {
    position: sticky;
    top: 94px;
    display: grid;
    gap: 16px;
}

.side-panel .movie-card {
    border-radius: 18px;
}

.side-panel .movie-info {
    padding: 12px;
}

.side-panel .movie-desc {
    display: none;
}

.empty-state {
    display: none;
    padding: 30px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 18px;
}

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

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.9), rgba(15, 23, 42, 0.96));
}

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

.footer-brand {
    color: white;
    font-size: 1.25rem;
}

.site-footer p {
    color: #cbd5e1;
    line-height: 1.8;
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    color: #cbd5e1;
    margin: 9px 0;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

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

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

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

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

    .side-panel {
        position: static;
    }

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

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
    }

    .brand {
        font-size: 1.3rem;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-copy {
        padding-bottom: 86px;
    }

    .hero h1,
    .hero h2 {
        font-size: clamp(2.25rem, 12vw, 4rem);
    }

    .hero-arrow {
        display: none;
    }

    .content-stack {
        gap: 54px;
        padding: 54px 0;
    }

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

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

    .movie-card-wide .movie-poster {
        aspect-ratio: 16 / 9;
    }

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

    .ranking-item img {
        grid-column: 1 / -1;
        width: 100%;
    }

    .ranking-score {
        text-align: left;
    }

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

@media (max-width: 520px) {
    .main-wrap,
    .header-inner,
    .mobile-panel,
    .footer-grid,
    .footer-bottom,
    .hero-copy {
        width: min(100% - 24px, 1180px);
    }

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

    .movie-rail {
        grid-auto-columns: 82%;
    }

    .page-hero,
    .detail-top {
        padding-top: 34px;
    }

    .detail-copy,
    .article-panel,
    .side-panel {
        padding: 20px;
    }
}
