:root {
    color-scheme: light;
    --bg: #f9fafb;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --soft: #eff6ff;
    --footer: #030712;
    --radius: 18px;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: 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;
    -webkit-font-smoothing: antialiased;
}

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

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

button, input, select {
    font: inherit;
}

main {
    min-height: 70vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, #2563eb, #1e40af);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.16);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.12);
}

.nav-shell {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.site-header.is-scrolled .brand {
    color: #111827;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    background: #fff;
    color: #2563eb;
    border-radius: 12px;
    font-size: 22px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.site-header.is-scrolled .brand-mark {
    background: #2563eb;
    color: #fff;
}

.brand-name {
    font-size: 22px;
    white-space: nowrap;
}

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

.nav-links a {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 650;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: #fff;
}

.site-header.is-scrolled .nav-links a {
    color: #374151;
}

.site-header.is-scrolled .nav-links a:hover,
.site-header.is-scrolled .nav-links a.is-active {
    color: #2563eb;
}

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

.nav-search input,
.home-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 12px;
    outline: none;
    padding: 10px 14px;
    transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.nav-search button,
.home-search button,
.search-page-form button {
    border: 0;
    background: #fff;
    color: #1d4ed8;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
}

.site-header.is-scrolled .nav-search input {
    background: #fff;
    border-color: #d1d5db;
    color: #111827;
}

.site-header.is-scrolled .nav-search input::placeholder {
    color: #9ca3af;
}

.site-header.is-scrolled .nav-search button {
    background: #2563eb;
    color: #fff;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    cursor: pointer;
}

.site-header.is-scrolled .menu-toggle {
    color: #111827;
    background: #f3f4f6;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(90deg, #1e3a8a, #1e40af, #1e3a8a);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.04));
}

.hero-content {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(1180px, calc(100% - 48px));
    transform: translate(-50%, -50%);
    color: #fff;
}

.hero-content h2 {
    max-width: 760px;
    margin: 16px 0;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 650px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 850;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: #2563eb;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.primary-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.primary-btn.slim {
    padding: 10px 16px;
    white-space: nowrap;
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 13px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.eyebrow.dark {
    background: #dbeafe;
    color: #1d4ed8;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.home-intro,
.content-section,
.detail-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 0;
}

.home-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
}

.home-title h1,
.page-hero h1 {
    margin: 12px 0 12px;
    color: #111827;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.home-title p,
.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #4b5563;
    font-size: 18px;
}

.home-search,
.search-page-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    width: min(780px, 100%);
}

.home-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
    background: #fff;
    color: #111827;
    border-color: #d1d5db;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.home-search button,
.search-page-form button {
    background: #2563eb;
    color: #fff;
}

.quick-cats,
.category-nav-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-cats a,
.category-nav-strip a,
.side-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 10px 15px;
    font-weight: 750;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition: border 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.quick-cats a:hover,
.category-nav-strip a:hover,
.category-nav-strip a.is-active,
.side-links a:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
}

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

.section-head h2 {
    margin: 10px 0 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

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

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, #1e3a8a, #111827);
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.75));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    color: #fff;
    font-weight: 900;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 3;
    border-radius: 999px;
    padding: 5px 10px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 900;
}

.card-body h3 a:hover {
    color: #2563eb;
}

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta span {
    background: #eff6ff;
    color: #2563eb;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.detail-tags a {
    border-radius: 999px;
    padding: 5px 9px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 190px 1fr;
}

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

.soft-panel {
    margin-top: 56px;
    padding: 36px;
    border-radius: 26px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    box-shadow: var(--shadow);
}

.split-rank {
    display: grid;
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
    gap: 32px;
}

.rank-panel,
.detail-card,
.side-card,
.filter-panel,
.category-card {
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}

.rank-panel {
    padding: 28px;
}

.rank-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    border-radius: 14px;
    padding: 12px;
    background: #f9fafb;
    color: #111827;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-list a:hover {
    background: #eff6ff;
    transform: translateX(4px);
}

.rank-list b {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
}

.rank-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.rank-list em {
    color: #6b7280;
    font-style: normal;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 8px;
}

.page-hero > div {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 62px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    box-shadow: var(--shadow);
}

.page-hero > div::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
}

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

.category-card {
    padding: 26px;
}

.category-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #111827;
    font-size: 24px;
    font-weight: 900;
}

.category-main strong {
    border-radius: 999px;
    padding: 7px 12px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
}

.category-card p {
    min-height: 56px;
    color: #4b5563;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-samples a {
    border-radius: 999px;
    padding: 6px 10px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
}

.category-nav-strip {
    max-width: 1280px;
    margin: 24px auto 0;
    padding: 0 24px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
    padding: 20px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #374151;
    font-weight: 800;
}

.detail-layout {
    padding-top: 34px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a {
    color: #2563eb;
    font-weight: 750;
}

.breadcrumb em {
    color: #111827;
    font-style: normal;
}

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

.detail-main {
    display: grid;
    gap: 24px;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.player-panel video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 94px;
    height: 94px;
    border: 0;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.45);
}

.player-panel.is-playing .play-button {
    opacity: 0;
    pointer-events: none;
}

.detail-card {
    padding: 30px;
}

.detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.detail-card h1 {
    margin: 10px 0 0;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

.detail-meta span {
    background: #eff6ff;
    color: #2563eb;
}

.detail-card section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 900;
}

.detail-card p {
    margin: 0;
    color: #374151;
    font-size: 17px;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 22px;
}

.side-card {
    padding: 22px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 12px;
}

.mini-card img {
    width: 72px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    background: #dbeafe;
}

.mini-card span {
    font-weight: 850;
    line-height: 1.35;
}

.side-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-section {
    padding-bottom: 34px;
}

.search-page-form {
    margin-bottom: 28px;
}

.site-footer {
    margin-top: 72px;
    background: var(--footer);
    color: #d1d5db;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
}

.footer-logo {
    display: inline-flex;
    margin-bottom: 10px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.footer-inner p {
    max-width: 580px;
    margin: 0;
}

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

.footer-links a {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 24px;
    text-align: center;
    color: #9ca3af;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.38);
}

.back-top.is-visible {
    display: block;
}

[data-movie-card].is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .three-grid,
    .four-grid,
    .compact-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split-rank,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 10px 18px;
    }

    .nav-links {
        display: none;
        width: 100%;
        order: 4;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 0 8px;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-search {
        display: none;
        width: 100%;
        order: 5;
        grid-template-columns: 1fr auto;
    }

    .nav-links.is-open + .nav-search,
    .nav-search.is-open {
        display: grid;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        width: calc(100% - 36px);
    }

    .hero-control {
        display: none;
    }

    .home-intro,
    .content-section,
    .detail-layout,
    .page-hero {
        padding-left: 18px;
        padding-right: 18px;
    }

    .page-hero > div {
        padding: 38px 26px;
    }

    .two-grid,
    .three-grid,
    .four-grid,
    .compact-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 130px 1fr;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .detail-title-row,
    .footer-inner {
        grid-template-columns: 1fr;
        display: grid;
    }

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

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

@media (max-width: 520px) {
    .brand-name {
        font-size: 19px;
    }

    .hero {
        height: 520px;
    }

    .hero-content h2 {
        font-size: 34px;
    }

    .home-search,
    .search-page-form {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        display: block;
    }

    .movie-card-horizontal .card-poster {
        aspect-ratio: 2 / 3;
    }

    .soft-panel {
        padding: 24px 18px;
    }

    .play-button {
        width: 74px;
        height: 74px;
        font-size: 28px;
    }
}
