:root {
    --primary-950: #072744;
    --primary-900: #0b3f6e;
    --primary-800: #075985;
    --primary-700: #0158a0;
    --primary-600: #006fc6;
    --primary-500: #0ea5e9;
    --accent-600: #0d9485;
    --accent-400: #2dd4bf;
    --accent-300: #5feacf;
    --neutral-950: #0a0f1a;
    --neutral-900: #101827;
    --neutral-800: #1f2937;
    --neutral-700: #374151;
    --neutral-600: #4b5563;
    --neutral-100: #f3f4f6;
    --neutral-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.1);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
    background: linear-gradient(180deg, #f7fbff 0%, #eef5fb 42%, #f8fafc 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: rgba(11, 63, 110, 0.96);
    box-shadow: 0 16px 30px rgba(7, 39, 68, 0.22);
    backdrop-filter: blur(16px);
}

.header-inner {
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    color: var(--primary-900);
    background: linear-gradient(135deg, var(--accent-300), #ffffff);
    box-shadow: 0 10px 22px rgba(45, 212, 191, 0.32);
}

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

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

.nav-link,
.mobile-link {
    border-radius: 999px;
    padding: 9px 14px;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
}

.menu-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    background: rgba(11, 63, 110, 0.98);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero {
    position: relative;
    color: var(--white);
    background: var(--primary-950);
    overflow: hidden;
}

.hero-slide {
    position: relative;
    min-height: clamp(520px, 70vh, 720px);
    display: none;
    isolation: isolate;
}

.hero-slide.is-active {
    display: block;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-backdrop,
.detail-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 78% 28%, rgba(45, 212, 191, 0.32), transparent 28%),
        linear-gradient(90deg, rgba(7, 39, 68, 0.94) 0%, rgba(7, 39, 68, 0.78) 42%, rgba(7, 39, 68, 0.36) 100%),
        linear-gradient(0deg, rgba(7, 39, 68, 0.98) 0%, transparent 38%);
}

.hero-content {
    min-height: inherit;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(240px, 380px);
    align-items: center;
    gap: 54px;
    padding: 74px 0 86px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 10px;
    color: var(--accent-300);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4.6vw, 4.5rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 18px 0 10px;
    font-size: clamp(1.45rem, 2.6vw, 2.5rem);
    line-height: 1.15;
}

.hero p,
.page-hero p,
.detail-line {
    max-width: 760px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.06rem;
}

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

.hero-tags span,
.tag-row span,
.meta-line span,
.detail-meta span {
    border-radius: 999px;
    padding: 5px 10px;
    color: #eafffb;
    background: rgba(255, 255, 255, 0.14);
}

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

.btn {
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 20px;
    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: var(--primary-950);
    background: linear-gradient(135deg, var(--accent-300), #ffffff);
    box-shadow: 0 15px 32px rgba(45, 212, 191, 0.3);
}

.btn.ghost {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.1);
}

.btn.text {
    color: var(--accent-300);
    padding-inline: 6px;
}

.btn.small {
    min-height: 38px;
    padding: 8px 15px;
    font-size: 0.92rem;
}

.hero-poster {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 34px;
    min-height: 440px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.55), rgba(13, 148, 133, 0.5));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    right: 22px;
    bottom: 22px;
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    color: var(--primary-900);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

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

.hero-dot {
    width: 36px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--accent-300);
}

.section {
    padding: 58px 0;
}

.intro-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    align-items: center;
    gap: 24px;
}

.intro-panel h2,
.section-head h2,
.content-card h2,
.info-card h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.15;
}

.intro-panel p:not(.section-kicker) {
    margin: 12px 0 0;
    color: var(--neutral-600);
}

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

.section-head.slim {
    align-items: center;
}

.section-link {
    color: var(--primary-700);
    font-weight: 800;
}

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

.category-chip {
    min-height: 154px;
    border-radius: var(--radius-lg);
    padding: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-800), var(--accent-600));
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover,
.movie-card:hover,
.category-overview-card:hover,
.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-chip strong,
.category-chip span {
    display: block;
}

.category-chip strong {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.category-chip span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card.wide {
    display: grid;
    grid-template-columns: 158px 1fr;
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-700), var(--accent-600));
}

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

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

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

.badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--primary-950);
    background: var(--accent-300);
    font-weight: 900;
    font-size: 0.85rem;
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--primary-900);
    background: rgba(255, 255, 255, 0.92);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 8px 0 8px;
    color: #0f172a;
    font-size: 1.08rem;
    line-height: 1.3;
}

.card-body p {
    margin: 0;
    color: var(--neutral-600);
    font-size: 0.94rem;
}

.meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--neutral-600);
    font-size: 0.82rem;
}

.meta-line span {
    color: var(--neutral-600);
    background: var(--neutral-100);
}

.tag-row span {
    color: var(--primary-800);
    background: #e6f7fb;
    font-size: 0.82rem;
}

.tag-row.big span {
    color: #eafffb;
    background: rgba(255, 255, 255, 0.14);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 28px;
    align-items: start;
}

.side-rank,
.info-card,
.content-card,
.filter-panel,
.category-overview-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.side-rank {
    position: sticky;
    top: 90px;
    padding: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px;
    border-radius: 18px;
    padding: 10px;
    background: var(--white);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-cover {
    border-radius: 14px;
    overflow: hidden;
    min-height: 88px;
    background: linear-gradient(135deg, var(--primary-700), var(--accent-600));
}

.rank-info p {
    margin: 7px 0 10px;
    color: var(--neutral-600);
    font-size: 0.9rem;
}

.rank-head {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #0f172a;
    font-weight: 900;
}

.rank-num {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    color: var(--primary-950);
    background: var(--accent-300);
    font-size: 0.86rem;
}

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

.page-hero,
.detail-hero {
    position: relative;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-950), var(--primary-800));
    overflow: hidden;
}

.page-hero.compact .shell {
    padding: 86px 0;
}

.page-hero h1 {
    max-width: 900px;
}

.category-overview-grid {
    display: grid;
    gap: 18px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 210px;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-700), var(--accent-600));
}

.category-overview-card p:not(.section-kicker) {
    color: var(--neutral-600);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 160px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 999px;
    padding: 0 16px;
    background: var(--white);
}

.search-box span {
    color: var(--primary-700);
    font-weight: 900;
}

.search-box input,
.filter-select {
    width: 100%;
    border: 0;
    outline: 0;
    min-height: 44px;
    color: #0f172a;
    background: transparent;
}

.filter-select {
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 999px;
    padding: 0 14px;
    background: var(--white);
}

.empty-state {
    display: none;
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    color: var(--neutral-600);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
    display: block;
}

.detail-hero {
    isolation: isolate;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    filter: blur(2px) saturate(1.08);
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
    padding: 72px 0;
}

.detail-poster {
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary-700), var(--accent-600));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.detail-meta {
    margin-top: 16px;
}

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

.player-card {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 28px;
    background: #030712;
    box-shadow: var(--shadow);
}

.video-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #030712;
}

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: var(--white);
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.18), rgba(3, 7, 18, 0.72));
    cursor: pointer;
    z-index: 2;
}

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

.play-circle {
    width: 86px;
    height: 86px;
    border-radius: 30px;
    display: grid;
    place-items: center;
    color: var(--primary-950);
    background: linear-gradient(135deg, var(--accent-300), #ffffff);
    box-shadow: 0 18px 38px rgba(45, 212, 191, 0.28);
    font-size: 1.8rem;
}

.content-card,
.info-card {
    margin-top: 22px;
    padding: 24px;
}

.content-card p {
    color: var(--neutral-700);
    font-size: 1.02rem;
}

.info-card:first-child {
    margin-top: 0;
}

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

.info-card dt {
    color: var(--neutral-600);
    font-size: 0.86rem;
}

.info-card dd {
    margin: 0;
    color: #0f172a;
    font-weight: 800;
}

.side-link {
    display: block;
    border-radius: 14px;
    padding: 12px 14px;
    margin-top: 10px;
    color: var(--primary-800);
    background: #e8f6fb;
    font-weight: 800;
}

.site-footer {
    margin-top: 42px;
    color: rgba(255, 255, 255, 0.76);
    background: var(--neutral-950);
}

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

.footer-logo {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p,
.footer-column p {
    margin: 0;
}

.footer-column h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 1rem;
}

.footer-column a {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
}

.footer-column a:hover {
    color: var(--accent-300);
}

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

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

    .menu-button {
        display: flex;
    }

    .hero-content,
    .detail-hero-inner,
    .split-layout,
    .detail-layout,
    .intro-panel,
    .category-overview-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        min-height: 360px;
    }

    .hero-poster img {
        min-height: 360px;
    }

    .side-rank {
        position: static;
    }

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

    .movie-grid,
    .wide-grid,
    .full-rank {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .hero-slide {
        min-height: 620px;
    }

    .hero-content {
        padding: 54px 0 80px;
        gap: 28px;
    }

    .hero-poster {
        min-height: 260px;
        border-radius: 24px;
    }

    .hero-poster img {
        min-height: 260px;
    }

    .category-grid,
    .movie-grid,
    .wide-grid,
    .full-rank {
        grid-template-columns: 1fr;
    }

    .movie-card.wide,
    .rank-item {
        grid-template-columns: 116px 1fr;
    }

    .category-cover-strip {
        min-height: 160px;
    }

    .detail-hero-inner {
        padding: 46px 0;
    }

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

    .player-card {
        border-radius: 20px;
    }

    .page-hero.compact .shell {
        padding: 56px 0;
    }
}
