*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --card: #1e293b;
    --card-hover: #263449;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --blue: #2563eb;
    --blue-strong: #1d4ed8;
    --cyan: #22d3ee;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.42);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.24), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.16), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 45px rgba(2, 6, 23, 0.32);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.32);
}

.brand-text {
    font-size: 1.25rem;
}

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

.desktop-nav a,
.mobile-panel a,
.site-footer a {
    color: var(--muted-strong);
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
    color: #fff;
}

.nav-search,
.mobile-search,
.big-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.big-search input {
    width: 230px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    color: #fff;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.big-search input:focus {
    border-color: rgba(59, 130, 246, 0.82);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.nav-search button,
.mobile-search button,
.big-search button,
.primary-action,
.ghost-action,
.more-link,
.filter-chip {
    border: 0;
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.mobile-search button,
.big-search button,
.primary-action {
    background: linear-gradient(135deg, var(--blue), var(--blue-strong));
    padding: 11px 18px;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

.nav-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.primary-action:hover,
.ghost-action:hover,
.more-link:hover,
.filter-chip:hover {
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.92);
    color: #fff;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.mobile-panel nav a {
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.78);
    padding: 12px 14px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.26) 100%),
        var(--hero-image);
    background-position: center;
    background-size: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 50%, rgba(37, 99, 235, 0.2), transparent 26rem),
        linear-gradient(0deg, var(--bg), transparent 36%);
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    min-height: 630px;
    margin: 0 auto;
    padding: 90px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 720px;
    margin-left: max(16px, calc((100% - 1200px) / 2));
}

.hero-kicker,
.section-kicker,
.card-meta {
    color: #93c5fd;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0 18px;
    font-size: clamp(2.35rem, 6vw, 5.4rem);
    line-height: 1.03;
    letter-spacing: -0.06em;
}

.hero-one-line {
    margin: 0 0 10px;
    color: #e2e8f0;
    font-size: clamp(1rem, 2vw, 1.36rem);
    font-weight: 700;
}

.hero-summary {
    max-width: 650px;
    margin: 0 0 24px;
    color: #cbd5e1;
    line-height: 1.78;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
    padding: 7px 11px;
    font-size: 0.85rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.ghost-action,
.more-link,
.filter-chip {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    padding: 11px 18px;
}

.hero-poster {
    position: absolute;
    z-index: 3;
    right: max(16px, calc((100% - 1200px) / 2));
    bottom: 66px;
    width: min(310px, 24vw);
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.52);
    transform: rotate(2deg);
}

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

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 22px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 44px;
    background: var(--blue);
}

.section-shell,
.page-hero,
.breadcrumb,
.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-section,
.page-main {
    padding-top: 34px;
}

.quick-search-box,
.page-hero,
.spotlight-box,
.category-card,
.article-section,
.player-section,
.index-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.68));
    box-shadow: var(--shadow);
}

.quick-search-box {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    padding: 30px;
}

.quick-search-box h2,
.section-head h2,
.spotlight-box h2,
.article-section h2,
.player-section h2,
.index-group h2 {
    margin: 8px 0 10px;
    font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.quick-search-box p,
.page-hero p,
.spotlight-box p,
.article-section p,
.category-card p,
.footer-grid p {
    color: var(--muted-strong);
    line-height: 1.78;
}

.big-search input {
    width: 100%;
    min-height: 54px;
}

.big-search button {
    min-height: 54px;
    min-width: 92px;
}

.section-shell {
    padding-top: 48px;
}

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

.section-head.compact {
    margin-bottom: 18px;
}

.category-pills,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-pills a {
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.86);
    color: #fff;
    font-weight: 800;
    padding: 14px 20px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.category-pills a:hover {
    background: var(--blue);
    transform: translateY(-1px);
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
}

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

.spotlight-box {
    position: sticky;
    top: 94px;
    align-self: start;
    padding: 28px;
}

.spotlight-box .primary-action {
    display: inline-flex;
    margin-top: 18px;
}

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

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

.movie-card {
    display: block;
    min-width: 0;
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.75));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient {
    opacity: 1;
}

.type-badge,
.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 6px 9px;
}

.type-badge {
    top: 10px;
    left: 10px;
    background: rgba(37, 99, 235, 0.96);
}

.year-badge {
    top: 10px;
    right: 10px;
    background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
    left: 10px;
    bottom: 10px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.hover-play {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    display: block;
    padding-top: 10px;
}

.card-body strong,
.wide-body strong {
    display: -webkit-box;
    color: #fff;
    font-size: 0.98rem;
    line-height: 1.38;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.card-body span,
.wide-desc {
    display: -webkit-box;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
    margin-top: 6px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover .card-body strong,
.movie-card:hover .wide-body strong {
    color: #60a5fa;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.72);
    padding: 10px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.movie-card-wide:hover {
    background: rgba(38, 52, 73, 0.92);
    transform: translateY(-1px);
}

.wide-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: var(--card);
}

.wide-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 48px;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: -30% -10% auto auto;
    width: 460px;
    height: 460px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.24), transparent 70%);
}

.page-hero > * {
    position: relative;
}

.page-hero h1 {
    max-width: 850px;
}

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

.filter-row {
    margin-top: 24px;
}

.filter-chip.is-active {
    background: var(--blue);
    border-color: rgba(96, 165, 250, 0.6);
}

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

.category-card {
    padding: 24px;
}

.category-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.category-main span {
    color: #fff;
    font-size: 1.45rem;
    font-weight: 900;
}

.category-main strong {
    color: #60a5fa;
}

.category-samples,
.index-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.category-samples a,
.index-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.58);
    padding: 7px 11px;
    font-size: 0.86rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    padding: 22px 0;
}

.breadcrumb a {
    color: #bfdbfe;
}

.detail-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.2), transparent 28rem),
        rgba(15, 23, 42, 0.82);
    padding: 30px;
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
}

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

.detail-one-line {
    color: #e2e8f0;
    font-size: 1.2rem;
    line-height: 1.7;
}

.detail-meta,
.detail-tags {
    margin: 18px 0;
}

.player-section {
    padding: 28px;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 28px 70px rgba(0, 0, 0, 0.45);
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
    cursor: pointer;
}

.center-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    box-shadow: 0 24px 60px rgba(37, 99, 235, 0.38);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.center-play:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.player-shell.is-playing .center-play {
    opacity: 0;
    pointer-events: none;
}

.player-message {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 4;
    display: none;
    max-width: calc(100% - 48px);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: #fecaca;
    padding: 10px 16px;
    transform: translateX(-50%);
}

.player-message.is-visible {
    display: block;
}

.article-section {
    padding: 28px;
}

.article-section p {
    margin: 0 0 22px;
    font-size: 1.05rem;
}

.empty-state {
    display: none;
    color: var(--muted);
    text-align: center;
    padding: 42px 0;
}

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

.index-shell {
    display: grid;
    gap: 22px;
}

.index-group {
    padding: 24px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.94);
    margin-top: 40px;
    padding: 44px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
}

.footer-brand {
    font-size: 1.3rem;
}

[hidden] {
    display: none !important;
}

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

    .menu-button {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-poster {
        display: none;
    }

    .hero-content {
        max-width: calc(100% - 32px);
        margin: 0 auto;
    }

    .quick-search-box,
    .split-section,
    .detail-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .spotlight-box {
        position: static;
    }

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

@media (max-width: 760px) {
    .hero,
    .hero-content {
        min-height: 570px;
    }

    .hero-content {
        padding: 70px 0;
    }

    .hero-arrow {
        display: none;
    }

    .hero-actions,
    .big-search,
    .mobile-search {
        align-items: stretch;
        flex-direction: column;
    }

    .big-search button,
    .mobile-search button {
        width: 100%;
    }

    .quick-search-box,
    .page-hero,
    .detail-hero,
    .player-section,
    .article-section,
    .category-card,
    .index-group {
        padding: 22px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

    .detail-hero {
        gap: 22px;
    }

    .detail-poster {
        width: min(240px, 80vw);
        margin: 0 auto;
    }

    .center-play {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

@media (max-width: 420px) {
    .nav-wrap,
    .section-shell,
    .page-hero,
    .breadcrumb,
    .footer-grid,
    .detail-hero {
        width: min(100% - 22px, 1200px);
    }

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

    .brand-text {
        font-size: 1.05rem;
    }
}
