:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-soft: rgba(30, 41, 59, 0.68);
    --panel-strong: #0f172a;
    --border: rgba(96, 165, 250, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --blue: #2563eb;
    --blue-light: #60a5fa;
    --cyan: #22d3ee;
    --orange: #f97316;
    --green: #22c55e;
    --yellow: #eab308;
    --radius: 20px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.18), transparent 30rem),
        radial-gradient(circle at 80% 15%, rgba(34, 211, 238, 0.14), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 75%);
    z-index: -1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--border);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.header-inner,
.quick-nav-inner,
.page-container,
.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue-light), var(--cyan));
    box-shadow: 0 12px 34px rgba(37, 99, 235, 0.32);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-name,
.footer-logo {
    font-size: 1.28rem;
    background: linear-gradient(90deg, var(--blue-light), var(--cyan));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-link,
.mobile-link,
.quick-nav a,
.footer-links a {
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active,
.quick-nav a:hover,
.footer-links a:hover {
    color: #ffffff;
}

.nav-link.is-active,
.nav-link:hover {
    background: rgba(37, 99, 235, 0.22);
}

.top-search,
.mobile-search,
.search-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
    width: 220px;
    padding: 10px 15px;
}

.top-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.top-search button,
.mobile-search button,
.search-page-form button {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue), #0891b2);
}

.menu-toggle {
    display: none;
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.78);
    border-radius: 12px;
    padding: 9px 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.97);
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
}

.mobile-link {
    padding: 10px 4px;
}

.quick-nav {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    overflow-x: auto;
}

.quick-nav-inner {
    display: flex;
    gap: 10px;
    padding: 10px 0;
}

.quick-nav a {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 0.92rem;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #0f172a;
}

.hero-stage,
.hero-slide,
.hero-image,
.hero-gradient {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 2;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-gradient {
    background:
        linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.82) 36%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.18) 60%, rgba(2, 6, 23, 0.6));
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1240px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 78px;
}

.hero-badge,
.detail-label,
.page-hero span,
.section-head span {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    background: linear-gradient(90deg, var(--blue), #06b6d4);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.26);
}

.hero-kicker-title {
    margin: 18px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 14px 0 0;
    max-width: 820px;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.hero h2 {
    font-size: clamp(2rem, 5vw, 4.3rem);
}

.hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

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

.hero-tags {
    margin-top: 20px;
}

.hero-tags span,
.badge-row span {
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.82rem;
}

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

.primary-button,
.secondary-button,
.text-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--blue), #06b6d4);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.3);
}

.secondary-button,
.text-button,
.section-more {
    color: #dbeafe;
    border: 1px solid rgba(96, 165, 250, 0.26);
    background: rgba(15, 23, 42, 0.68);
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-50%);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

.home-flow {
    padding: 48px 0 72px;
    display: grid;
    gap: 72px;
}

.content-section {
    display: grid;
    gap: 22px;
}

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

.section-head h2 {
    margin: 10px 0 0;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    line-height: 1.15;
}

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

.category-movie-grid {
    padding: 42px 0 72px;
}

.movie-card,
.compact-card,
.category-card,
.category-overview-card,
.ranking-item,
.story-card,
.info-card {
    border: 1px solid rgba(96, 165, 250, 0.16);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.82));
    border-radius: var(--radius);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.category-overview-card:hover,
.ranking-item:hover,
.compact-card:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.44);
    box-shadow: var(--shadow);
}

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

.poster-link img,
.compact-poster img,
.ranking-poster img,
.detail-poster img,
.category-preview img,
.overview-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img,
.compact-card:hover .compact-poster img,
.ranking-item:hover .ranking-poster img,
.category-card:hover .category-preview img,
.category-overview-card:hover .overview-visual img {
    transform: scale(1.06);
    filter: saturate(1.12);
}

.play-chip {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.card-body {
    padding: 16px;
}

.card-meta,
.ranking-score span,
.compact-card span {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--subtle);
    font-size: 0.82rem;
}

.movie-card h3,
.compact-card h3,
.category-card h3,
.ranking-info h2,
.overview-content h2 {
    margin: 8px 0;
    color: #ffffff;
    line-height: 1.3;
}

.movie-card h3 {
    font-size: 1.08rem;
}

.movie-card p,
.compact-card p,
.category-card p,
.ranking-info p,
.overview-content p,
.story-card p,
.info-card dd,
.site-footer p {
    color: var(--muted);
}

.movie-card p,
.compact-card p,
.ranking-info p,
.category-card p {
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-rail .movie-card {
    width: 330px;
    flex: 0 0 330px;
    scroll-snap-align: start;
}

.compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.32), rgba(22, 78, 99, 0.28));
}

.compact-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 16px;
    padding: 12px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.compact-poster {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

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

.category-card {
    padding: 16px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    height: 170px;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.category-card h3 {
    font-size: 1.2rem;
    margin-top: 16px;
}

.page-hero {
    padding: 70px 0 54px;
    background:
        linear-gradient(90deg, rgba(30, 58, 138, 0.42), rgba(8, 145, 178, 0.24)),
        radial-gradient(circle at 80% 30%, rgba(34, 211, 238, 0.18), transparent 24rem);
    border-bottom: 1px solid rgba(96, 165, 250, 0.18);
}

.page-hero h1 {
    margin: 16px 0 10px;
    max-width: 900px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.08rem;
}

.filter-panel,
.search-page-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
    min-height: 46px;
    padding: 0 16px;
}

.filter-panel input {
    width: min(360px, 100%);
}

.filter-panel select {
    appearance: none;
    min-width: 150px;
}

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

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

.category-overview-grid {
    display: grid;
    gap: 20px;
    padding: 48px 0 72px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    padding: 18px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.overview-visual {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    min-height: 220px;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.overview-content {
    padding: 6px 6px 6px 0;
}

.overview-content h2 {
    font-size: 1.7rem;
}

.overview-content ul {
    display: grid;
    gap: 8px;
    margin: 14px 0 18px;
    padding: 0;
    list-style: none;
    color: var(--muted);
}

.ranking-list {
    display: grid;
    gap: 14px;
    padding: 44px 0 72px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 76px 120px 1fr 120px;
    align-items: center;
    gap: 18px;
    padding: 14px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-number {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--cyan);
    text-align: center;
}

.ranking-poster {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.ranking-info h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

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

.ranking-score strong {
    display: block;
    color: var(--yellow);
    font-size: 1.45rem;
}

.detail-hero {
    padding: 46px 0 60px;
    background:
        linear-gradient(180deg, rgba(30, 58, 138, 0.35), rgba(2, 6, 23, 0.3)),
        radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.16), transparent 28rem);
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: end;
}

.breadcrumb {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--subtle);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #bfdbfe;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: #0f172a;
    border: 1px solid rgba(96, 165, 250, 0.22);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 840px;
    color: var(--muted);
    font-size: 1.16rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 7px 12px;
}

.detail-tags {
    margin-top: 18px;
}

.player-section {
    padding: 48px 0 32px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    border: 1px solid rgba(96, 165, 250, 0.22);
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.34));
    transition: opacity 0.25s ease;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    color: #ffffff;
    font-size: 2.3rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 60px rgba(37, 99, 235, 0.44);
}

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

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    padding: 22px 0 48px;
}

.story-card,
.info-card {
    padding: 26px;
}

.story-card h2,
.info-card h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.story-card h2:not(:first-child) {
    margin-top: 28px;
}

.story-card p {
    margin: 0;
    font-size: 1.02rem;
}

.info-card dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-card dt {
    color: var(--subtle);
    font-size: 0.86rem;
}

.info-card dd {
    margin: -8px 0 0;
}

.related-section {
    padding-bottom: 76px;
}

.site-footer {
    border-top: 1px solid rgba(96, 165, 250, 0.18);
    background: rgba(2, 6, 23, 0.88);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2fr;
    gap: 28px;
    padding: 34px 0;
}

.footer-logo {
    margin-bottom: 8px;
}

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

[hidden] {
    display: none !important;
}

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

    .top-search input {
        width: 170px;
    }

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

    .ranking-score {
        grid-column: 3;
        text-align: left;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .hero {
        height: 560px;
    }

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

    .hero-control {
        display: none;
    }

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

    .category-overview-card,
    .detail-layout,
    .detail-content-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .overview-visual {
        min-height: 180px;
    }

    .detail-poster {
        max-width: 340px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .quick-nav-inner,
    .page-container,
    .footer-inner {
        width: min(100% - 24px, 1240px);
    }

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

    .hero {
        height: 520px;
    }

    .hero h1,
    .hero h2 {
        font-size: 2.35rem;
    }

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

    .movie-rail .movie-card {
        width: 280px;
        flex-basis: 280px;
    }

    .compact-card,
    .ranking-item {
        grid-template-columns: 86px 1fr;
    }

    .rank-number {
        grid-row: span 2;
    }

    .ranking-poster {
        display: none;
    }

    .ranking-score {
        grid-column: 2;
    }

    .filter-panel,
    .search-page-form,
    .hero-actions,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-panel input,
    .filter-panel select,
    .search-page-form input,
    .search-page-form button {
        width: 100%;
    }
}
