:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-400: #60a5fa;
    --purple-600: #9333ea;
    --purple-400: #c084fc;
    --text-main: #111827;
    --text-muted: #64748b;
    --border: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--slate-50);
    color: var(--text-main);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.25);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue-500), var(--purple-600));
    color: #ffffff;
    font-size: 14px;
    box-shadow: 0 0 28px rgba(96, 165, 250, 0.45);
}

.brand-name {
    font-size: 24px;
    line-height: 1;
    background: linear-gradient(90deg, var(--blue-400), var(--purple-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.header-search input,
.mobile-panel input,
.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input,
.mobile-panel input {
    padding: 10px 14px;
    color: #ffffff;
    background: rgba(51, 65, 85, 0.9);
}

.header-search input::placeholder,
.mobile-panel input::placeholder {
    color: #94a3b8;
}

.header-search button,
.mobile-panel button,
.hero-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    background: var(--blue-600);
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-panel button:hover,
.hero-search button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(51, 65, 85, 0.8);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 999px;
}

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

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

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

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--slate-950);
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.38), rgba(15, 23, 42, 1));
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    padding: 86px 0 130px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--blue-600);
}

.hero-content h1,
.hero-content h2 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.hero-content h2 {
    margin-top: 10px;
    color: #dbeafe;
}

.hero-text {
    max-width: 680px;
    margin: 20px 0 0;
    color: #e2e8f0;
    font-size: 19px;
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue-600), var(--purple-600));
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.35);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
}

.btn-muted {
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.35);
}

.tag-pill,
.detail-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.22);
    border: 1px solid rgba(147, 197, 253, 0.28);
    font-size: 13px;
    font-weight: 700;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.52);
    font-size: 36px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(2, 6, 23, 0.78);
}

.hero-prev {
    left: max(18px, calc((100% - 1220px) / 2 - 70px));
}

.hero-next {
    right: max(18px, calc((100% - 1220px) / 2 - 70px));
}

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

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

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

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 76px;
    z-index: 4;
    width: min(660px, calc(100% - 32px));
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
}

.hero-search input {
    flex: 1;
    padding: 13px 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.hero-search input::placeholder {
    color: #cbd5e1;
}

.section-wrap {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

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

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

.section-head h2,
.page-hero h1,
.detail-card h1 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.text-link {
    color: var(--blue-600);
    font-weight: 800;
}

.text-link:hover {
    color: #1d4ed8;
}

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

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

.category-tile {
    min-height: 142px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 22px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
    box-shadow: var(--soft-shadow);
    overflow: hidden;
    position: relative;
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -38px;
    bottom: -42px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.55), rgba(147, 51, 234, 0.35));
}

.category-tile span {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 900;
}

.category-tile em {
    position: relative;
    z-index: 1;
    color: #cbd5e1;
    font-style: normal;
    font-size: 14px;
}

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

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

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

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

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

.card-region,
.card-year,
.rank-badge {
    position: absolute;
    top: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.75);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-region {
    left: 10px;
}

.card-year {
    right: 10px;
}

.rank-badge {
    left: 10px;
    top: auto;
    bottom: 10px;
    background: linear-gradient(135deg, var(--blue-600), var(--purple-600));
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    color: var(--text-main);
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: var(--blue-600);
}

.card-meta {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.card-line {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 0;
    color: #475569;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 30px;
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 42px 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.rank-index {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue-600), var(--purple-600));
    font-weight: 900;
}

.rank-thumb {
    width: 58px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    display: block;
    color: var(--text-main);
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-item p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    width: min(1220px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 54px;
    border-radius: 28px;
    color: #ffffff;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.38), transparent 32%),
        linear-gradient(135deg, var(--slate-900), var(--slate-800));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    color: #ffffff;
}

.page-hero p:last-child {
    max-width: 720px;
    margin: 16px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 20px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 16px;
}

.filter-grid label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    border-radius: 12px;
    padding: 12px 13px;
    color: var(--text-main);
    background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus,
.header-search input:focus,
.mobile-panel input:focus,
.hero-search input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.empty-state {
    margin: 18px 0 0;
    color: var(--text-muted);
    font-weight: 700;
}

.detail-main {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 54px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 22px;
    color: var(--text-muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--blue-600);
}

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

.detail-content,
.detail-side {
    min-width: 0;
}

.player-section,
.detail-card,
.side-info,
.side-poster {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.player-section {
    padding: 12px;
    background: #0f172a;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: #000000;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.2));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue-600), var(--purple-600));
    box-shadow: 0 18px 44px rgba(37, 99, 235, 0.4);
    font-size: 32px;
}

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

.player-message {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    padding: 9px 13px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.8);
    font-size: 14px;
}

.detail-card {
    margin-top: 22px;
    padding: 28px;
}

.detail-card h1 {
    margin-bottom: 14px;
}

.detail-one-line {
    margin: 0 0 20px;
    color: #334155;
    font-size: 18px;
    font-weight: 700;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.detail-card h2,
.side-info h2 {
    margin: 24px 0 10px;
    font-size: 22px;
    line-height: 1.25;
}

.detail-card p {
    color: #334155;
}

.side-poster {
    aspect-ratio: 2 / 3;
    background: linear-gradient(145deg, #1e293b, #0f172a);
}

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

.side-info {
    margin-top: 18px;
    padding: 22px;
}

.side-info h2 {
    margin-top: 0;
}

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

.side-info dl div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
}

.side-info dt {
    color: var(--text-muted);
    font-weight: 800;
}

.side-info dd {
    margin: 0;
    color: var(--text-main);
}

.side-info a {
    color: var(--blue-600);
    font-weight: 800;
}

.related-wrap {
    width: 100%;
}

.site-footer {
    color: #cbd5e1;
    background: var(--slate-950);
    margin-top: 30px;
}

.footer-grid {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 20px;
}

.site-footer p {
    max-width: 460px;
    margin: 16px 0 0;
    color: #94a3b8;
}

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #94a3b8;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1180px) {
    .desktop-nav {
        gap: 12px;
        font-size: 14px;
    }

    .header-search {
        min-width: 230px;
    }

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-slider,
    .hero-content {
        min-height: 560px;
    }

    .category-grid,
    .category-grid.large,
    .featured-grid,
    .split-layout,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

@media (max-width: 720px) {
    .header-inner {
        width: min(100% - 24px, 1220px);
        height: 64px;
    }

    .brand-name {
        font-size: 20px;
    }

    .hero-slider,
    .hero-content {
        min-height: 610px;
    }

    .hero-content {
        padding-top: 80px;
        padding-bottom: 160px;
    }

    .hero-text {
        font-size: 16px;
    }

    .hero-control {
        display: none;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 24px;
        bottom: 64px;
    }

    .hero-search input,
    .hero-search button {
        border-radius: 16px;
    }

    .section-wrap {
        padding: 38px 0;
    }

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

    .category-grid,
    .category-grid.large,
    .featured-grid,
    .split-layout,
    .detail-layout,
    .footer-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 34px 22px;
        border-radius: 22px;
    }

    .detail-main,
    .section-wrap,
    .page-hero,
    .hero-content {
        width: min(100% - 24px, 1220px);
    }

    .detail-card {
        padding: 22px;
    }

    .side-info dl div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}
