:root {
    --page-bg: #f8fafc;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --card: #ffffff;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --radius: 22px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --rainbow: linear-gradient(90deg, #f87171, #facc15, #4ade80, #22d3ee, #60a5fa, #a78bfa, #f472b6);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: var(--page-bg);
}

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

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

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

.rainbow-line {
    height: 4px;
    background: var(--rainbow);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #dc2626, #f97316, #7c3aed);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.brand-text {
    font-size: 24px;
    line-height: 1;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981, #06b6d4, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link,
.mobile-link {
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.search-toggle,
.menu-toggle,
.header-search button,
.mobile-search button,
.page-search button {
    border: 0;
    cursor: pointer;
}

.search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 22px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f3f4f6;
    font-size: 22px;
}

.header-search {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.header-search.is-open {
    max-height: 90px;
    padding-bottom: 16px;
}

.header-search form,
.mobile-search,
.page-search {
    display: flex;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.page-search input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 13px 18px;
    outline: none;
    font-size: 15px;
}

.header-search button,
.mobile-search button,
.page-search button {
    border-radius: 999px;
    padding: 0 22px;
    color: #fff;
    background: var(--primary);
    font-weight: 800;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    background: #fff;
    border-top: 1px solid var(--line);
}

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

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--rainbow);
}

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

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

.hero-slide > img,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide > img {
    opacity: 0.55;
    transform: scale(1.03);
}

.hero-overlay,
.detail-cover {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.2), transparent 24%), linear-gradient(90deg, rgba(17, 24, 39, 0.78), rgba(17, 24, 39, 0.36), rgba(17, 24, 39, 0.72));
}

.hero-content {
    position: relative;
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    max-width: 980px;
}

.hero-logo {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    border: 2px solid rgba(255, 255, 255, 0.34);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 80px rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(18px);
}

.hero-logo .brand-mark {
    width: 58px;
    height: 58px;
    font-size: 28px;
}

.hero-kicker,
.section-label {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    font-weight: 800;
    font-size: 14px;
}

.hero-kicker {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    margin-bottom: 14px;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.hero h2 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 48px);
}

.hero p {
    max-width: 720px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.17);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.tag-row span {
    background: #eef2ff;
    color: #4f46e5;
}

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

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

.primary-button {
    color: #111827;
    background: #fff;
    box-shadow: 0 16px 32px rgba(255, 255, 255, 0.22);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.13);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.ghost-button.dark {
    color: #111827;
    border-color: rgba(17, 24, 39, 0.16);
    background: rgba(255, 255, 255, 0.76);
}

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

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

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

.section {
    padding: 70px 0;
}

.section-white {
    background: #fff;
}

.section-soft {
    background: #f1f5f9;
}

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

.section-head h2 {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.section-head a {
    color: var(--primary);
    font-weight: 900;
}

.compact-head {
    align-items: center;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #e5e7eb, #cbd5e1);
}

.movie-card.compact .poster {
    aspect-ratio: 3 / 4;
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    color: #fff;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.65);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.movie-info {
    padding: 18px;
}

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

.movie-info h2 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.35;
}

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

.movie-list {
    display: grid;
    gap: 18px;
}

.movie-card.list {
    display: grid;
    grid-template-columns: 210px 1fr;
}

.movie-card.list .poster {
    height: 100%;
    min-height: 160px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
    gap: 36px;
}

.ranking-panel,
.side-card,
.content-card,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.ranking-panel,
.side-card,
.filter-panel {
    padding: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 64px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: #eef2ff;
}

.rank-num {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    font-weight: 900;
}

.rank-item img {
    width: 64px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-item strong,
.rank-item em {
    display: block;
}

.rank-item em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.gradient-section {
    background: linear-gradient(135deg, #fce7f3, #e0f2fe, #ede9fe);
}

.cta-box {
    text-align: center;
}

.cta-box h2 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 48px);
}

.cta-box p {
    max-width: 680px;
    margin: 0 auto;
    color: #475569;
    line-height: 1.8;
}

.center-actions {
    justify-content: center;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: var(--rainbow);
}

.page-hero-inner {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-mini {
    margin-bottom: 18px;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(38px, 6vw, 62px);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0 auto 24px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.92);
}

.page-search {
    width: min(680px, 100%);
}

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

.filter-panel h2 {
    margin: 0 0 16px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    font-weight: 900;
}

.filter-button.is-active,
.filter-button:hover {
    color: #fff;
    background: var(--primary);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    padding: 28px;
    border-radius: 28px;
    background: #111827;
    color: #fff;
    box-shadow: var(--shadow);
}

.category-glow {
    position: absolute;
    inset: -20%;
    opacity: 0.7;
    background: radial-gradient(circle at 20% 30%, #f97316, transparent 28%), radial-gradient(circle at 80% 20%, #3b82f6, transparent 28%), radial-gradient(circle at 50% 90%, #22c55e, transparent 24%);
}

.category-covers {
    position: absolute;
    right: 24px;
    top: 24px;
    display: grid;
    grid-template-columns: repeat(2, 82px);
    gap: 10px;
    transform: rotate(4deg);
}

.category-covers img {
    width: 82px;
    height: 105px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    object-fit: cover;
}

.category-card h2,
.category-card p {
    position: relative;
    max-width: 58%;
}

.category-card h2 {
    margin: 0 0 12px;
    font-size: 32px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
}

.wide-rank-list {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.wide-rank {
    display: grid;
    grid-template-columns: 58px 76px 1fr minmax(180px, 0.55fr);
    align-items: center;
    gap: 18px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.wide-rank span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 14px;
    background: #111827;
    font-weight: 900;
}

.wide-rank img {
    width: 76px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
}

.wide-rank em {
    color: var(--muted);
    font-style: normal;
}

.detail-hero {
    min-height: 560px;
    background: #111827;
}

.detail-bg {
    opacity: 0.48;
    filter: blur(2px);
    transform: scale(1.04);
}

.detail-hero-inner {
    position: relative;
    padding: 42px 0 70px;
    color: #fff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.detail-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%);
    font-weight: 900;
}

.detail-text h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    letter-spacing: -0.05em;
}

.detail-desc {
    max-width: 790px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.9;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 800;
}

.large-tags span {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

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

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.82));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: #fff;
    font-size: 30px;
    box-shadow: 0 22px 44px rgba(255, 255, 255, 0.22);
}

.player-overlay strong {
    font-size: 22px;
}

.content-card {
    margin-top: 26px;
    padding: 28px;
}

.content-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 24px;
    color: #334155;
    line-height: 2;
    font-size: 16px;
}

.side-card {
    height: fit-content;
    position: sticky;
    top: 100px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px 8px;
    margin: 0;
}

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

.side-card dd {
    margin: 0;
    font-weight: 800;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-grid h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 18px;
}

.footer-grid p {
    margin: 14px 0 0;
    color: #9ca3af;
    line-height: 1.8;
}

.footer-grid a {
    display: block;
    margin-bottom: 10px;
    color: #d1d5db;
}

.footer-grid a:hover {
    color: #fff;
}

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

.is-hidden-card {
    display: none !important;
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .movie-grid.three,
    .movie-grid.four,
    .split-layout,
    .category-grid,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

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

    .hero,
    .hero-content {
        min-height: 78vh;
    }

    .hero-logo {
        width: 74px;
        height: 74px;
        margin-bottom: 18px;
    }

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

    .section {
        padding: 46px 0;
    }

    .section-head,
    .movie-card.list,
    .wide-rank,
    .detail-layout,
    .detail-grid,
    .movie-grid.three,
    .movie-grid.four,
    .split-layout,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

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

    .category-covers {
        opacity: 0.28;
    }

    .category-card h2,
    .category-card p {
        max-width: 100%;
    }

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

    .side-card {
        position: static;
    }

    .wide-rank {
        gap: 12px;
    }

    .wide-rank em {
        display: none;
    }
}
