:root {
    --bg: #f7fbff;
    --surface: #ffffff;
    --surface-soft: #eef7ff;
    --text: #101828;
    --muted: #667085;
    --primary: #2563eb;
    --primary-dark: #1e3a8a;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --line: rgba(15, 23, 42, 0.1);
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f8fcff 0%, #eef7ff 42%, #ffffff 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--cyan), var(--teal));
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.32);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-link {
    color: #344054;
    font-weight: 700;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-link {
    padding: 11px 18px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    padding: 11px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--primary);
    border-radius: 3px;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 14px;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.mobile-nav.open {
    display: grid;
}

.mobile-link {
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--line);
}

.page-main {
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    min-height: 590px;
    background: linear-gradient(135deg, #1d4ed8 0%, #06b6d4 52%, #14b8a6 100%);
    color: #ffffff;
    isolation: isolate;
}

.hero-carousel:before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 26%),
        radial-gradient(circle at 80% 18%, rgba(20, 184, 166, 0.45), transparent 26%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.22));
    z-index: -1;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    filter: saturate(1.1) contrast(1.08);
    transform: scale(1.04);
}

.hero-bg:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.36), rgba(15, 23, 42, 0.64));
}

.hero-content {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    min-height: 590px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 22px;
    padding: 96px 0 120px;
}

.hero-kicker,
.page-hero p,
.section-heading p,
.panel-head p,
.detail-kicker {
    margin: 0;
    color: #bae6fd;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 720px;
    margin: 0;
    color: #e0f2fe;
    font-size: clamp(18px, 3vw, 24px);
    line-height: 1.7;
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 700;
}

.hero-tags span,
.detail-tags span {
    padding: 9px 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

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

.primary-btn {
    color: var(--primary);
    background: #ffffff;
    box-shadow: 0 20px 44px rgba(255, 255, 255, 0.25);
}

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

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.ghost-btn.dark {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.18);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    width: min(1200px, calc(100% - 32px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.hero-arrow,
.hero-dot {
    pointer-events: auto;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.hero-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    padding: 0;
    opacity: 0.66;
}

.hero-dot.active {
    width: 34px;
    border-radius: 999px;
    opacity: 1;
    background: #ffffff;
}

.content-shell,
.quick-search-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-shell {
    position: relative;
    z-index: 5;
    margin-top: -54px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.content-shell {
    padding: 72px 0 0;
}

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

.compact-heading {
    margin-bottom: 18px;
}

.section-heading h2,
.panel-head h2 {
    margin: 4px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-heading > a,
.text-link {
    color: var(--primary);
    font-weight: 800;
}

.filter-panel {
    margin-bottom: 24px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(140px, 0.75fr));
    gap: 14px;
}

.filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-weight: 800;
    color: #344054;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text);
    padding: 0 15px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-empty {
    display: none;
    margin: 20px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.filter-empty.show {
    display: block;
}

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

.small-grid {
    max-height: 560px;
    overflow: auto;
    padding-right: 6px;
}

.catalog-grid {
    align-items: stretch;
}

.movie-card {
    background: var(--surface);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 24px 55px rgba(37, 99, 235, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.8), transparent);
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #ffffff;
    font-size: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.rank-num {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 42px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

.movie-card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h2 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.tag-row span {
    padding: 6px 9px;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.18));
}

.category-tile strong,
.category-tile small {
    position: relative;
}

.category-tile strong {
    font-size: 22px;
    margin-bottom: 8px;
}

.category-tile small {
    color: #dbeafe;
    line-height: 1.6;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.ranking-panel,
.side-card {
    position: sticky;
    top: 96px;
    padding: 24px;
    background: linear-gradient(180deg, #ffffff, #f0f9ff);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.compact-list,
.side-links,
.hero-mini-list {
    display: grid;
    gap: 12px;
}

.compact-card,
.hero-mini-list > a,
.side-links > a {
    display: grid;
    grid-template-columns: auto 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.06);
    transition: transform 0.2s ease, background 0.2s ease;
}

.compact-card:hover,
.hero-mini-list > a:hover,
.side-links > a:hover {
    transform: translateX(3px);
    background: rgba(37, 99, 235, 0.12);
}

.compact-rank {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    font-weight: 900;
}

.compact-card img {
    width: 54px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
}

.compact-card strong,
.hero-mini-list strong,
.side-links strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-card small,
.hero-mini-list span,
.side-links span {
    display: block;
    color: var(--muted);
    margin-top: 4px;
    font-size: 12px;
}

.inner-page {
    padding-bottom: 80px;
}

.page-hero,
.detail-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto 0;
    border-radius: 30px;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8 0%, #06b6d4 54%, #14b8a6 100%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: 24px;
    padding: clamp(28px, 5vw, 54px);
    align-items: center;
}

.slim-hero {
    display: block;
}

.page-hero h1 {
    margin: 6px 0 12px;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.page-hero span {
    color: #e0f2fe;
    line-height: 1.8;
}

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

.category-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.1);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.category-card-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
}

.category-card-covers img {
    width: 100%;
    height: 118px;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
}

.category-card h2 {
    margin: 4px 0 10px;
    font-size: 24px;
}

.category-card p {
    color: var(--muted);
    line-height: 1.8;
}

.detail-hero {
    position: relative;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: clamp(24px, 5vw, 44px);
    padding: clamp(22px, 5vw, 46px);
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.24), transparent 24%),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 56%, #06b6d4 100%);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    background: linear-gradient(135deg, var(--primary), var(--cyan));
}

.detail-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #bfdbfe;
    font-weight: 700;
}

.detail-intro h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 0;
    max-width: 760px;
    color: #e0f2fe;
    font-size: 19px;
    line-height: 1.8;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    align-items: start;
}

.detail-main,
.text-section,
.player-section {
    min-width: 0;
}

.video-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-stage video,
.video-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-stage video {
    object-fit: contain;
    background: #020617;
}

.video-cover {
    border: 0;
    padding: 0;
    color: #ffffff;
    background: #020617;
    cursor: pointer;
    z-index: 2;
}

.video-cover.hide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.66;
}

.video-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.8));
}

.video-cover strong {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: var(--primary);
    font-size: 32px;
    box-shadow: 0 24px 60px rgba(255, 255, 255, 0.28);
}

.text-section {
    margin-top: 26px;
    padding: clamp(22px, 4vw, 34px);
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.1);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.text-section h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.text-section p {
    margin: 0;
    color: #344054;
    line-height: 1.95;
    font-size: 17px;
}

.meta-section dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.meta-section div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.06);
}

.meta-section dt {
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 6px;
}

.meta-section dd {
    margin: 0;
    font-weight: 800;
}

.side-links > a {
    display: block;
    color: var(--text);
}

.site-footer {
    margin-top: 90px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #1e3a8a 70%, #0e7490);
}

.footer-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(160px, 0.55fr));
    gap: 34px;
}

.footer-main p {
    max-width: 620px;
    color: #cbd5e1;
    line-height: 1.8;
}

.footer-group {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-group h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 0;
    text-align: center;
    color: #cbd5e1;
}

.searchable-card.hidden {
    display: none;
}

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

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

    .split-section,
    .detail-layout,
    .page-hero {
        grid-template-columns: 1fr;
    }

    .ranking-panel,
    .side-card {
        position: static;
    }

    .detail-hero {
        grid-template-columns: 240px minmax(0, 1fr);
    }

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

@media (max-width: 760px) {
    .desktop-nav {
        display: none;
    }

    .menu-button {
        display: block;
    }

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

    .hero-content {
        padding-top: 74px;
        padding-bottom: 112px;
    }

    .hero-controls {
        bottom: 24px;
    }

    .hero-arrow {
        width: 42px;
        height: 42px;
    }

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

    .movie-grid,
    .category-grid,
    .category-card-grid,
    .footer-shell,
    .filter-grid,
    .meta-section dl {
        grid-template-columns: 1fr;
    }

    .movie-grid {
        gap: 18px;
    }

    .category-card,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

    .quick-search-shell {
        padding: 18px;
    }

    .content-shell {
        padding-top: 52px;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 17px;
    }

    .hero-actions,
    .detail-actions {
        width: 100%;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .video-cover strong {
        width: 66px;
        height: 66px;
        font-size: 25px;
    }
}
