:root {
    --bg: #0f1026;
    --bg-soft: #171833;
    --card: rgba(255, 255, 255, 0.94);
    --text: #111827;
    --muted: #6b7280;
    --light: #f8fafc;
    --primary: #7c3aed;
    --primary-dark: #5b21b6;
    --pink: #ec4899;
    --blue: #38bdf8;
    --shadow: 0 24px 70px rgba(20, 20, 43, 0.18);
    --radius: 24px;
}

* {
    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:
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.18), transparent 38rem),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.14), transparent 34rem),
        #f8fafc;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(148, 163, 184, 0.26);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    color: #111827;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--pink));
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.28);
}

.brand-text {
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--pink));
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #eef2ff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #4338ca;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: var(--bg);
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 16, 38, 0.96), rgba(15, 16, 38, 0.72), rgba(15, 16, 38, 0.28)),
        radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.28), transparent 34rem);
}

.hero-backdrop img {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) blur(1px);
    opacity: 0.42;
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    align-items: center;
    gap: 56px;
    color: white;
}

.hero-copy h1 {
    margin: 16px 0 20px;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
    line-height: 1.9;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pink);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

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

.hero-tags {
    margin: 24px 0;
}

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.82rem;
    font-weight: 700;
}

.tag-row span {
    background: #eef2ff;
    color: #4338ca;
    border-color: #e0e7ff;
}

.tag-row.large span {
    padding: 9px 14px;
}

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

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

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

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--pink));
    box-shadow: 0 18px 34px rgba(124, 58, 237, 0.34);
}

.btn-ghost {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.hero-cover {
    position: relative;
    border-radius: 34px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.24), rgba(255,255,255,0.04));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-cover img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.8rem;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dot.is-active {
    width: 32px;
    border-radius: 999px;
    background: white;
}

.search-panel,
.toolbar-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 36px;
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.search-panel h2,
.search-panel p {
    margin: 0;
}

.search-panel h2 {
    font-size: 1.7rem;
}

.search-panel p {
    margin-top: 6px;
    color: var(--muted);
}

.search-box {
    min-width: min(420px, 100%);
}

.search-box.wide {
    flex: 1;
}

.search-box input,
.sort-box select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 0 18px;
    color: #111827;
    background: white;
    outline: none;
}

.sort-box {
    min-width: 180px;
}

.section-block {
    margin-top: 58px;
}

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

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    letter-spacing: -0.04em;
}

.section-heading a,
.panel-title a {
    color: var(--primary);
    font-weight: 900;
}

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

.category-card,
.category-overview-card {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 28px;
    padding: 24px;
    color: white;
    background: var(--category-gradient);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.category-card strong,
.category-overview-card strong {
    display: block;
    font-size: 1.28rem;
    margin-bottom: 10px;
}

.category-card span,
.category-overview-card p,
.category-overview-card small {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.category-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    right: -55px;
    bottom: -55px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.11);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.movie-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--pink));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.card-rank {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 42px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.72);
    font-style: normal;
    font-weight: 900;
}

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

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

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.7;
}

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

.ranking-panel {
    border-radius: 28px;
    padding: 20px;
    background: #111827;
    color: white;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.sticky-panel {
    position: sticky;
    top: 92px;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-weight: 900;
}

.rank-list,
.wide-rank-list {
    display: grid;
    gap: 10px;
}

.rank-item,
.wide-rank-item {
    display: grid;
    gap: 2px;
    border-radius: 18px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover,
.wide-rank-item:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(4px);
}

.rank-item span {
    color: #f9a8d4;
    font-weight: 900;
}

.rank-item small,
.wide-rank-item small {
    color: rgba(255, 255, 255, 0.62);
}

.wide-rank-item {
    grid-template-columns: 36px 54px minmax(0, 1fr);
    align-items: center;
}

.wide-rank-item img {
    width: 54px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.page-hero,
.detail-hero {
    margin-top: 34px;
    border-radius: 34px;
    padding: clamp(30px, 6vw, 64px);
    color: white;
    background:
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.28), transparent 24rem),
        linear-gradient(135deg, #111827 0%, #312e81 100%);
    box-shadow: var(--shadow);
}

.small-hero {
    min-height: 300px;
}

.page-hero h1 {
    margin: 12px 0 14px;
    font-size: clamp(2.3rem, 6vw, 4.5rem);
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.9;
}

.category-hero {
    background: var(--category-gradient);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: center;
    gap: 34px;
}

.detail-poster img {
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    font-weight: 800;
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(2.1rem, 6vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.detail-lead {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.08rem;
    line-height: 1.9;
}

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

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

.player-section {
    margin-top: 34px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: #020617;
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.24);
}

.player-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.74));
    cursor: pointer;
    text-align: center;
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.player-play {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--pink));
    box-shadow: 0 22px 50px rgba(124, 58, 237, 0.38);
    font-size: 2rem;
}

.player-cover strong {
    max-width: min(90%, 720px);
    font-size: clamp(1.4rem, 4vw, 2.7rem);
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 34px;
}

.story-card {
    border-radius: 28px;
    padding: 28px;
    background: white;
    box-shadow: var(--shadow);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.story-card p {
    margin: 0;
    color: #4b5563;
    line-height: 2;
}

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

.site-footer {
    margin-top: 70px;
    padding: 34px 0;
    color: rgba(255, 255, 255, 0.74);
    background: #111827;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-grid p {
    margin: 8px 0 0;
    max-width: 620px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    gap: 16px;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .category-grid,
    .movie-grid.dense {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .split-layout,
    .ranking-page-layout {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }
}

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

    .main-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 22px;
        background: white;
        box-shadow: var(--shadow);
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        min-height: 760px;
        padding-top: 64px;
        padding-bottom: 96px;
        gap: 28px;
    }

    .hero-cover {
        max-width: 300px;
        margin: 0 auto;
    }

    .search-panel,
    .toolbar-section,
    .section-heading,
    .footer-grid {
        align-items: stretch;
        flex-direction: column;
    }

    .category-grid,
    .overview-grid,
    .movie-grid,
    .movie-grid.dense,
    .related-grid,
    .detail-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 560px) {
    .site-shell {
        width: min(100% - 22px, 1200px);
    }

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

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

    .category-grid,
    .overview-grid,
    .movie-grid,
    .movie-grid.dense,
    .related-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-hero,
    .story-card {
        border-radius: 24px;
        padding: 24px;
    }

    .player-frame {
        border-radius: 24px;
    }
}
