:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-cyan: #0891b2;
    --color-bg: #f8fafc;
    --color-soft: #eff6ff;
    --color-text: #111827;
    --color-muted: #64748b;
    --color-border: #e5e7eb;
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 24px 60px rgba(15, 23, 42, 0.16);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    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;
    color: var(--color-text);
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--color-text);
}

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

.brand-text {
    font-size: 1.45rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

.nav-link:hover,
.nav-link.is-active {
    color: var(--color-primary);
}

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

.nav-search input,
.page-search input,
.filter-panel input,
.filter-panel select {
    width: 240px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 10px 16px;
    color: #1f2937;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.page-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.nav-search button,
.page-search button,
.filter-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: var(--color-primary);
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.page-search button:hover,
.filter-panel button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #111827;
    border-radius: 99px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #155e75);
}

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

.hero-slide {
    opacity: 0;
    transition: opacity 900ms ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 40%, rgba(14, 165, 233, 0.24), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.58) 45%, rgba(15, 23, 42, 0.16) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 620px;
    flex-direction: column;
    justify-content: center;
    max-width: 1180px;
    color: #fff;
}

.hero-content h1 {
    max-width: 720px;
    margin: 0 0 22px;
    font-size: clamp(2.6rem, 6vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 24px;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: #dbeafe;
}

.hero-kicker,
.pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 18px;
    border-radius: 999px;
    padding: 8px 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

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

.hero-meta {
    margin-bottom: 30px;
}

.hero-meta span {
    border-radius: 999px;
    padding: 7px 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 14px 24px;
    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: #fff;
    background: var(--color-primary);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 72px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.1;
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--color-muted);
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-weight: 800;
}

.section-link span {
    transition: transform 0.2s ease;
}

.section-link:hover span {
    transform: translateX(4px);
}

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

.category-tile {
    display: grid;
    place-items: center;
    min-height: 150px;
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    font-size: 1.3rem;
    font-weight: 900;
}

.category-tile strong {
    font-size: 1.08rem;
}

.category-tile em {
    margin-top: 4px;
    color: var(--color-muted);
    font-style: normal;
}

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: var(--shadow-hover);
}

.poster {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-large {
    height: 360px;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.88) 100%);
}

.poster-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 24px;
    color: #fff;
}

.poster-caption h3 {
    margin: 0 0 8px;
    font-size: 1.55rem;
    line-height: 1.15;
}

.poster-caption p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #dbeafe;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-category {
    position: absolute;
    top: 14px;
    right: 14px;
    border-radius: 999px;
    padding: 6px 12px;
    color: #fff;
    background: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: #facc15;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.movie-body {
    padding: 20px;
}

.movie-body h3,
.compact-body h3 {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--color-text);
    line-height: 1.28;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-body p,
.compact-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 0.94rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta-line {
    color: #64748b;
    font-size: 0.86rem;
}

.meta-line span:not(:last-child)::after {
    content: "";
}

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

.tag-row span,
.tag-cloud span {
    border-radius: 999px;
    padding: 5px 10px;
    color: #475569;
    background: #f1f5f9;
    font-size: 0.78rem;
    font-weight: 700;
}

.movie-card-compact {
    display: flex;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
}

.compact-poster {
    position: relative;
    width: 132px;
    height: 92px;
    flex: 0 0 132px;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.compact-body {
    min-width: 0;
    flex: 1;
}

.compact-body h3 {
    margin-bottom: 6px;
    -webkit-line-clamp: 1;
}

.compact-body p {
    min-height: auto;
    margin-bottom: 10px;
    -webkit-line-clamp: 2;
}

.blue-section {
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
}

.blue-section .section-heading p,
.blue-section .section-link {
    color: #dbeafe;
}

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

.blue-section .movie-card-compact {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.blue-section .compact-body h3,
.blue-section .compact-body p,
.blue-section .meta-line {
    color: #fff;
}

.section-panel .panel-card,
.text-card,
.detail-card,
.sidebar-card,
.category-overview-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.panel-card,
.text-card {
    padding: 36px;
}

.page-hero {
    color: #fff;
    background:
        radial-gradient(circle at 75% 20%, rgba(56, 189, 248, 0.32), transparent 34%),
        linear-gradient(135deg, #1e3a8a, #0e7490);
}

.compact-hero {
    padding: 74px 0;
}

.compact-hero h1 {
    max-width: 850px;
    margin: 0 0 14px;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.08;
}

.compact-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 1.1rem;
}

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

.category-overview-card {
    padding: 24px;
}

.category-overview-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.category-overview-head > span {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    flex: 0 0 56px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    font-size: 1.35rem;
    font-weight: 900;
}

.category-overview-head h2 {
    margin: 0 0 4px;
}

.category-overview-head p {
    margin: 0;
    color: var(--color-muted);
}

.category-overview-head em {
    margin-left: auto;
    color: var(--color-primary);
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.overview-preview {
    display: grid;
    gap: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-card);
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    border-radius: 14px;
}

.empty-state {
    margin-bottom: 28px;
    padding: 34px;
    text-align: center;
    border: 1px dashed #bfdbfe;
    border-radius: var(--radius-md);
    color: #475569;
    background: #eff6ff;
}

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

.search-summary {
    margin-bottom: 24px;
    color: #475569;
    font-size: 1.05rem;
    font-weight: 800;
}

.page-search {
    display: flex;
    gap: 10px;
    max-width: 620px;
    margin-top: 28px;
}

.page-search input {
    width: 100%;
    border-radius: 16px;
    padding: 14px 18px;
}

.page-search button {
    border-radius: 16px;
    padding: 14px 22px;
}

.detail-top {
    padding: 28px 0;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1f2937);
}

.back-link,
.breadcrumb a {
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease;
}

.back-link:hover,
.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.62);
}

.breadcrumb strong {
    color: #fff;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: start;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    background: #000;
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.28);
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 999px;
    padding-left: 6px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.38);
    font-size: 2.4rem;
    transform: scale(1);
    transition: transform 0.2s ease;
}

.player-start:hover span {
    transform: scale(1.08);
}

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

.detail-card {
    padding: 32px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
}

.detail-card section {
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--color-border);
}

.detail-card h2,
.sidebar-card h2,
.text-card h2 {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.detail-card p {
    margin: 0;
    color: #334155;
    font-size: 1.02rem;
}

.detail-card p + p {
    margin-top: 16px;
}

.one-line {
    color: #111827 !important;
    font-size: 1.15rem !important;
    font-style: italic;
    font-weight: 750;
}

.review-box {
    border-radius: 18px;
    padding: 22px;
    color: #1f2937;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.related-sidebar {
    position: sticky;
    top: 96px;
}

.sidebar-card {
    padding: 22px;
}

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

.sidebar-list .movie-card-compact {
    box-shadow: none;
}

.narrow-section .container {
    max-width: 860px;
}

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

.text-card p {
    margin: 0;
    color: #475569;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #0f172a);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 36px;
    padding: 54px 0 38px;
}

.footer-brand p {
    max-width: 360px;
    color: #cbd5e1;
}

.brand-footer .brand-text {
    color: #fff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.site-footer h3 {
    margin: 0 0 16px;
    color: #fff;
}

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

.site-footer a {
    color: #cbd5e1;
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 0;
    text-align: center;
    color: #94a3b8;
}

.footer-bottom p {
    margin: 0;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1080px) {
    .site-nav {
        gap: 14px;
    }

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

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

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

    .related-sidebar {
        position: static;
    }

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

@media (max-width: 860px) {
    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 18px 16px 22px;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    }

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

    .nav-search {
        width: 100%;
    }

    .nav-search input {
        width: 100%;
    }

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

    .hero-control {
        display: none;
    }

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

    .movie-grid,
    .large-grid,
    .small-grid,
    .rank-grid,
    .ranking-list,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

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

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

    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-actions,
    .page-search {
        flex-direction: column;
    }

    .movie-grid,
    .large-grid,
    .small-grid,
    .rank-grid,
    .ranking-list,
    .category-overview-grid,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .poster {
        height: 300px;
    }

    .movie-card-compact {
        gap: 12px;
    }

    .compact-poster {
        width: 112px;
        height: 82px;
        flex-basis: 112px;
    }

    .detail-card,
    .panel-card,
    .text-card {
        padding: 24px;
    }
}
