:root {
    --bg: #030005;
    --bg-soft: #0d0215;
    --grape-950: #14051f;
    --grape-900: #210a34;
    --grape-850: #2d0c48;
    --grape-800: #3b1060;
    --grape-700: #552091;
    --grape-600: #6d30bd;
    --grape-500: #8f4dea;
    --grape-400: #b58cff;
    --gold-400: #f5c767;
    --gold-300: #ffe2a0;
    --text: #fff9ff;
    --muted: #c9b6d7;
    --muted-2: #927aa8;
    --line: rgba(181, 140, 255, 0.18);
    --card: rgba(33, 10, 52, 0.84);
    --shadow: 0 24px 80px rgba(8, 0, 14, 0.58);
    --glow: 0 0 32px rgba(245, 199, 103, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(109, 48, 189, 0.22), transparent 32rem),
        radial-gradient(circle at 80% 6%, rgba(245, 199, 103, 0.12), transparent 26rem),
        linear-gradient(180deg, #000000 0%, var(--grape-950) 44%, #000000 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(3, 0, 5, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1220px, calc(100% - 32px));
    height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--grape-600), var(--grape-800));
    box-shadow: var(--glow), inset 0 0 18px rgba(255, 255, 255, 0.14);
}

.brand-text {
    font-size: 1.18rem;
    background: linear-gradient(90deg, var(--grape-400), var(--gold-300), var(--grape-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 12px;
    color: var(--muted);
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold-300);
    background: rgba(85, 32, 145, 0.46);
    box-shadow: inset 0 0 0 1px rgba(245, 199, 103, 0.13);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(20, 5, 31, 0.86);
    outline: none;
    transition: 0.25s ease;
}

.top-search input {
    width: 190px;
    padding: 10px 13px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 199, 103, 0.5);
    box-shadow: 0 0 0 4px rgba(245, 199, 103, 0.08);
}

.top-search button,
.mobile-search button,
.btn,
.filter-panel select {
    cursor: pointer;
}

.top-search button,
.mobile-search button {
    padding: 10px 14px;
    color: #16051f;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gold-300), var(--gold-400));
    font-weight: 800;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(33, 10, 52, 0.72);
}

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

.mobile-nav {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(20, 5, 31, 0.96);
}

.mobile-nav.open {
    display: grid;
    gap: 10px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    padding: 11px 13px;
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
}

.hero-stage {
    position: relative;
    height: min(78vh, 760px);
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(1.02);
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.84) 34%, rgba(0, 0, 0, 0.32) 72%, rgba(0, 0, 0, 0.86) 100%),
        linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.12) 42%, rgba(20, 5, 31, 0.72) 100%);
}

.hero-content {
    position: relative;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 720px;
    padding-top: 56px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold-300);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 48px rgba(0, 0, 0, 0.58);
}

.hero-summary,
.page-hero p,
.footer-inner p,
.movie-desc,
.detail-card p,
.category-card p,
.category-tile p,
.rank-feature p {
    color: var(--muted);
    line-height: 1.76;
}

.hero-summary {
    max-width: 620px;
    margin: 24px 0;
    font-size: 1.06rem;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    padding: 6px 10px;
    color: var(--grape-400);
    border: 1px solid rgba(181, 140, 255, 0.24);
    border-radius: 999px;
    background: rgba(33, 10, 52, 0.68);
    font-size: 0.82rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 16px;
    font-weight: 900;
    transition: 0.25s ease;
}

.btn-primary {
    color: #17071f;
    background: linear-gradient(135deg, var(--gold-300), var(--gold-400));
    box-shadow: var(--glow);
}

.btn-soft {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(33, 10, 52, 0.72);
}

.btn:hover,
.movie-card:hover,
.category-card:hover,
.category-tile:hover,
.rank-feature:hover {
    transform: translateY(-4px);
}

.hero-controls {
    position: absolute;
    right: max(32px, calc((100% - 1220px) / 2));
    bottom: 154px;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 48px;
    height: 48px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(20, 5, 31, 0.74);
    font-size: 2rem;
    cursor: pointer;
}

.hero-dots {
    position: absolute;
    left: max(16px, calc((100% - 1220px) / 2));
    bottom: 112px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.hero-dot.active {
    background: linear-gradient(90deg, var(--grape-400), var(--gold-300));
}

.hero-thumbs {
    width: min(1220px, calc(100% - 32px));
    margin: -84px auto 0;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.hero-thumb {
    min-width: 0;
    padding: 8px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(20, 5, 31, 0.78);
    cursor: pointer;
    transition: 0.25s ease;
    backdrop-filter: blur(12px);
}

.hero-thumb.active {
    border-color: rgba(245, 199, 103, 0.58);
    box-shadow: var(--glow);
}

.hero-thumb img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 8px;
}

.hero-thumb span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.86rem;
}

.main-section {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.55rem);
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--gold-300);
    font-weight: 800;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    display: block;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(33, 10, 52, 0.94), rgba(20, 5, 31, 0.92));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    transition: 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(245, 199, 103, 0.35);
    box-shadow: var(--shadow), var(--glow);
}

.movie-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--grape-950);
}

.movie-card-compact .movie-poster {
    aspect-ratio: 16 / 9;
}

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

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.movie-type,
.rank-mark {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.movie-type {
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    color: #17071f;
    background: linear-gradient(135deg, var(--gold-300), var(--gold-400));
    font-size: 0.78rem;
}

.rank-mark {
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--gold-300);
    background: rgba(0, 0, 0, 0.68);
    box-shadow: inset 0 0 0 1px rgba(245, 199, 103, 0.28);
}

.movie-info {
    padding: 16px;
}

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

.movie-meta {
    margin: 0 0 10px;
    color: var(--muted-2);
    font-size: 0.86rem;
}

.movie-desc {
    min-height: 3.3em;
    margin: 0 0 12px;
    font-size: 0.92rem;
}

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

.category-tile,
.category-card,
.rank-feature,
.side-box,
.detail-card,
.player-shell {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(33, 10, 52, 0.92), rgba(10, 2, 16, 0.92));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.category-tile {
    overflow: hidden;
    min-height: 220px;
    padding: 18px;
    border-radius: 22px;
    transition: 0.25s ease;
}

.category-tile img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 14px;
}

.category-tile span,
.category-card h2 {
    color: var(--gold-300);
    font-size: 1.22rem;
    font-weight: 900;
}

.category-tile p,
.category-card p {
    margin-bottom: 0;
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(10, 2, 16, 0.72);
}

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

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

.page-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
    padding: 86px max(16px, calc((100% - 1220px) / 2)) 58px;
    background:
        radial-gradient(circle at 16% 20%, rgba(245, 199, 103, 0.16), transparent 18rem),
        linear-gradient(135deg, rgba(85, 32, 145, 0.5), rgba(3, 0, 5, 0.7));
    border-bottom: 1px solid var(--line);
}

.page-hero > div {
    max-width: 760px;
}

.page-hero p {
    max-width: 690px;
    font-size: 1.06rem;
}

.category-card {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border-radius: 24px;
    transition: 0.25s ease;
}

.category-posters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    padding: 10px;
}

.category-posters img {
    aspect-ratio: 3 / 4;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.category-card > div:last-child {
    padding: 18px;
}

.category-card h2 {
    margin: 0 0 8px;
}

.category-card span {
    display: inline-flex;
    color: var(--gold-300);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 170px 170px 150px;
    gap: 12px;
    margin-bottom: 26px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-width: 0;
    padding: 13px 14px;
}

.empty-state {
    display: none;
    padding: 32px;
    text-align: center;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(20, 5, 31, 0.74);
}

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

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

.rank-feature {
    overflow: hidden;
    border-radius: 24px;
    transition: 0.25s ease;
}

.rank-feature img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.rank-feature div {
    padding: 16px;
}

.rank-feature span {
    color: var(--gold-300);
    font-weight: 900;
}

.rank-feature h2 {
    margin: 6px 0 8px;
    font-size: 1.1rem;
}

.detail-wrap {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 22px;
    color: var(--muted-2);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: var(--grape-400);
}

.breadcrumb strong {
    color: var(--text);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(245, 199, 103, 0.18), transparent 16rem),
        rgba(0, 0, 0, 0.38);
    cursor: pointer;
}

.player-overlay.hidden {
    display: none;
}

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    color: #16051f;
    background: linear-gradient(135deg, var(--gold-300), var(--gold-400));
    box-shadow: var(--glow);
    font-size: 2.1rem;
}

.player-overlay strong {
    font-size: 1.1rem;
}

.detail-card,
.side-box {
    border-radius: 24px;
    padding: 24px;
}

.detail-card {
    margin-top: 22px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.04em;
}

.detail-card h2,
.side-box h2 {
    margin: 24px 0 10px;
    color: var(--gold-300);
}

.lead-text {
    font-size: 1.08rem;
    color: #f5ecff;
}

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 18px;
}

.side-poster {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--grape-950);
}

.side-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.side-box dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 12px;
    margin: 0;
}

.side-box dt {
    color: var(--muted-2);
}

.side-box dd {
    margin: 0;
    color: var(--text);
}

.related-section {
    width: 100%;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(3, 0, 5, 0.82);
}

.footer-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
}

.footer-brand {
    color: var(--gold-300);
    font-size: 1.28rem;
}

.footer-inner p {
    max-width: 640px;
    margin: 12px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.footer-links a {
    color: var(--muted);
}

.footer-bottom {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    color: var(--muted-2);
    border-top: 1px solid rgba(181, 140, 255, 0.12);
    font-size: 0.92rem;
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 80;
    width: 46px;
    height: 46px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(85, 32, 145, 0.88);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: 0.25s ease;
}

.back-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 1120px) {
    .top-search {
        display: none;
    }

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

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }

    .hero-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .menu-button {
        display: block;
        margin-left: auto;
    }

    .header-inner {
        height: 66px;
    }

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

    .hero-stage {
        height: 680px;
        min-height: 680px;
    }

    .hero-content {
        padding-top: 22px;
    }

    .hero-controls {
        right: 16px;
        bottom: 128px;
    }

    .hero-dots {
        bottom: 96px;
    }

    .hero-thumbs {
        margin-top: -70px;
        grid-template-columns: repeat(2, 1fr);
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-page-grid,
    .rank-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .rank-list .movie-card {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .header-inner,
    .mobile-nav,
    .main-section,
    .detail-wrap,
    .footer-inner,
    .footer-bottom,
    .hero-content,
    .hero-thumbs {
        width: min(100% - 24px, 1220px);
    }

    .hero h1,
    .page-hero h1 {
        font-size: 2.35rem;
    }

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

    .hero-thumbs {
        display: none;
    }

    .hero-controls {
        bottom: 62px;
    }

    .hero-dots {
        bottom: 36px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-page-grid,
    .rank-feature-grid {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 64px 16px 42px;
    }

    .detail-card,
    .side-box {
        padding: 18px;
    }
}
