:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel-bg: #0f172a;
    --panel-soft: #1e293b;
    --panel-line: #334155;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    --blue: #2563eb;
    --blue-strong: #1d4ed8;
    --cyan: #22d3ee;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32rem), var(--page-bg);
    color: var(--text-main);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img.is-hidden {
    opacity: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(51, 65, 85, 0.75);
    backdrop-filter: blur(16px);
}

.header-inner {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    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-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.brand-text {
    font-size: 21px;
    white-space: nowrap;
}

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

.nav-link {
    color: var(--text-soft);
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.local-filter input {
    height: 42px;
    border: 1px solid rgba(51, 65, 85, 0.95);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    outline: none;
    padding: 0 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.local-filter input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

.header-search button,
.mobile-search button,
.search-page-form button {
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--blue);
    color: #ffffff;
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover {
    background: var(--blue-strong);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: var(--panel-soft);
    color: #ffffff;
    width: 42px;
    height: 42px;
    font-size: 22px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(51, 65, 85, 0.75);
    padding: 16px 24px 24px;
}

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

.mobile-search {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.mobile-search input {
    flex: 1;
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text-soft);
    background: rgba(30, 41, 59, 0.65);
}

.mobile-link.active,
.mobile-link:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.65);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

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

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.2)), linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding: 96px 0;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 78px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.hero-one-line {
    max-width: 620px;
    margin: 0 0 10px;
    color: #e2e8f0;
    font-size: 20px;
    line-height: 1.7;
}

.hero-summary {
    max-width: 620px;
    margin: 0;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
}

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

.primary-btn,
.secondary-btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 0 24px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

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

.primary-btn:hover {
    background: var(--blue-strong);
}

.secondary-btn {
    background: rgba(30, 41, 59, 0.82);
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    padding: 0 10px;
    font-size: 13px;
}

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

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-arrow:hover {
    background: rgba(37, 99, 235, 0.78);
}

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

.hero-dot {
    width: 18px;
    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.active {
    width: 42px;
    background: var(--blue);
}

.section,
.page-main,
.detail-main {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.section {
    padding-top: 56px;
    padding-bottom: 16px;
}

.section-tight {
    padding-top: 36px;
}

.page-main {
    padding-top: 48px;
    padding-bottom: 48px;
}

.detail-main {
    padding-top: 28px;
    padding-bottom: 48px;
}

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

.section-heading h2,
.page-hero h1,
.story-panel h2,
.side-panel h2 {
    margin: 0;
    font-weight: 900;
}

.section-heading h2 {
    font-size: clamp(24px, 4vw, 36px);
}

.section-heading a {
    color: #93c5fd;
    font-weight: 700;
}

.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-strip a {
    border-radius: 14px;
    background: var(--panel-soft);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #ffffff;
    padding: 12px 18px;
    font-weight: 800;
}

.category-strip a:hover {
    background: var(--blue);
}

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

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #1e293b, #020617);
    box-shadow: var(--shadow);
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 58%);
    opacity: 0.58;
    transition: opacity 0.25s ease;
}

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

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%) scale(0.88);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.88);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.type-badge,
.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
}

.type-badge {
    top: 10px;
    left: 10px;
    background: var(--blue);
}

.year-badge {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.58);
}

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

.card-body {
    padding: 12px 2px 0;
}

.card-body h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body h3 a:hover {
    color: #60a5fa;
}

.card-body p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: #64748b;
    font-size: 12px;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--panel-soft);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: var(--shadow);
}

.category-bg,
.category-overlay {
    position: absolute;
    inset: 0;
}

.category-bg {
    background-position: center;
    background-size: cover;
    opacity: 0.24;
    transition: transform 0.35s ease;
}

.category-card:hover .category-bg {
    transform: scale(1.08);
}

.category-overlay {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(37, 99, 235, 0.45));
}

.category-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.category-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--blue);
    margin-bottom: 18px;
}

.category-content h2 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 900;
}

.category-content p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.category-more {
    margin-top: auto;
    color: #bfdbfe;
    font-weight: 800;
}

.page-hero,
.detail-hero,
.prose-panel,
.story-panel,
.side-panel,
.player-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.page-hero {
    border-radius: 28px;
    padding: clamp(32px, 5vw, 64px);
    margin-bottom: 16px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.3), transparent 26rem), rgba(15, 23, 42, 0.78);
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
    margin-bottom: 16px;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.8;
}

.search-page-form {
    display: flex;
    gap: 12px;
    max-width: 720px;
    margin-top: 26px;
}

.search-page-form input {
    flex: 1;
}

.local-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    padding: 14px;
}

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

.local-filter span {
    color: var(--text-muted);
    font-weight: 700;
}

.search-status {
    margin-bottom: 24px;
    color: var(--text-soft);
    font-size: 18px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 44px;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn,
.page-number,
.page-ellipsis {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--panel-soft);
    color: #ffffff;
    padding: 0 13px;
    font-weight: 800;
}

.page-number.active,
.page-btn:hover,
.page-number:hover {
    background: var(--blue);
}

.page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.page-ellipsis {
    background: transparent;
    color: var(--text-muted);
}

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

.breadcrumb a:hover {
    color: #93c5fd;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    border-radius: 28px;
    padding: clamp(22px, 4vw, 36px);
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 28rem), rgba(15, 23, 42, 0.86);
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, #1e293b, #020617);
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.12;
    font-weight: 900;
}

.detail-one-line {
    color: #e2e8f0;
    font-size: 19px;
    line-height: 1.8;
    margin: 0 0 18px;
}

.detail-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-meta span {
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    padding: 8px 11px;
    font-size: 14px;
    font-weight: 700;
}

.detail-section {
    padding-top: 42px;
}

.player-card {
    border-radius: 22px;
    overflow: hidden;
    background: #000000;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
    overflow: hidden;
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.28), rgba(0, 0, 0, 0.35));
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.play-overlay span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    font-size: 42px;
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.35);
}

.video-shell.is-started .play-overlay {
    opacity: 0;
    pointer-events: none;
}

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

.story-panel,
.side-panel,
.prose-panel {
    border-radius: 22px;
    padding: clamp(22px, 4vw, 34px);
}

.story-panel h2,
.side-panel h2,
.prose-panel h2 {
    margin-bottom: 16px;
    font-size: 26px;
}

.story-panel p,
.prose-panel p {
    color: var(--text-soft);
    line-height: 1.9;
    font-size: 17px;
    margin: 0 0 24px;
}

.side-panel dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.side-panel dt {
    color: var(--text-muted);
    font-size: 13px;
}

.side-panel dd {
    margin: 4px 0 0;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.6;
}

.side-panel a {
    color: #93c5fd;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.feature-grid div {
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 20px;
}

.feature-grid h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.feature-grid p {
    margin: 0;
    font-size: 15px;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(51, 65, 85, 0.75);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

.footer-brand {
    font-size: 22px;
    margin-bottom: 12px;
}

.site-footer p {
    max-width: 520px;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: #93c5fd;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    border-top: 1px solid rgba(51, 65, 85, 0.62);
    padding: 18px 24px 28px;
    color: #64748b;
    font-size: 14px;
}

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

    .header-search input {
        width: 210px;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        min-height: 560px;
    }

    .hero-content {
        width: calc(100% - 48px);
        margin: 0 24px;
    }

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

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

    .detail-hero,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

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

    .hero {
        min-height: 560px;
    }

    .hero-content {
        width: calc(100% - 32px);
        margin: 0 16px;
        padding: 72px 0;
    }

    .hero-one-line {
        font-size: 17px;
    }

    .hero-summary {
        font-size: 15px;
    }

    .hero-arrow {
        display: none;
    }

    .section,
    .page-main,
    .detail-main {
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

    .section-heading,
    .local-filter,
    .search-page-form {
        align-items: stretch;
        flex-direction: column;
    }

    .search-page-form input,
    .local-filter input {
        width: 100%;
    }

    .detail-hero {
        padding: 18px;
    }

    .detail-poster {
        max-width: none;
    }

    .play-overlay span {
        width: 68px;
        height: 68px;
        font-size: 34px;
    }
}
