:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --border: rgba(168, 85, 247, 0.22);
    --text: #f8fafc;
    --muted: #c4b5fd;
    --subtle: #94a3b8;
    --amber: #fbbf24;
    --pink: #f472b6;
    --purple: #a855f7;
    --blue: #38bdf8;
    --radius: 1.25rem;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
}

html {
    background: var(--bg);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 5%, rgba(168, 85, 247, 0.28), transparent 32rem),
        radial-gradient(circle at 88% 18%, rgba(244, 114, 182, 0.18), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

img {
    object-fit: cover;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid rgba(168, 85, 247, 0.18);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 2.45rem;
    height: 2.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--pink), var(--purple));
    box-shadow: 0 12px 30px rgba(244, 114, 182, 0.3);
}

.desktop-nav,
.mobile-nav {
    align-items: center;
    gap: 0.25rem;
}

.desktop-nav {
    display: flex;
}

.desktop-nav a,
.mobile-nav a {
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    color: #ddd6fe;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #ffffff;
    background: rgba(168, 85, 247, 0.18);
}

.mobile-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.9rem;
    background: rgba(168, 85, 247, 0.14);
    border: 1px solid var(--border);
    color: #ffffff;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem 1rem;
}

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

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-bottom: 1px solid rgba(168, 85, 247, 0.18);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.9s ease, transform 1.4s ease;
    pointer-events: none;
}

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    filter: saturate(1.12) contrast(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 38%, rgba(251, 191, 36, 0.18), transparent 26rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.2) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.28) 0%, rgba(2, 6, 23, 0.95) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72vh;
    padding: 8rem 1.25rem 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(251, 191, 36, 0.34);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.08);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    margin-top: 1.25rem;
    max-width: 780px;
    font-size: clamp(2.6rem, 8vw, 6.8rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.06em;
    text-shadow: 0 16px 45px rgba(0, 0, 0, 0.46);
}

.hero p {
    margin-top: 1.35rem;
    max-width: 720px;
    color: #ddd6fe;
    font-size: clamp(1rem, 2vw, 1.28rem);
    line-height: 1.9;
}

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

.hero-tags {
    margin-top: 1.5rem;
}

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.16);
    border: 1px solid rgba(168, 85, 247, 0.24);
    font-size: 0.78rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.primary-button,
.ghost-button,
.search-bar button,
.filter-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.search-bar button {
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--pink));
    box-shadow: 0 14px 36px rgba(251, 191, 36, 0.24);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.52);
}

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

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.hero-dots button {
    width: 2.25rem;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 3.5rem;
    background: linear-gradient(135deg, var(--amber), var(--pink));
}

.section-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 1.25rem;
}

.quick-search {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    gap: 1.5rem;
    align-items: center;
}

.quick-search h2,
.section-heading h2,
.inline-heading h2,
.side-card h2,
.player-card h2 {
    margin-top: 0.7rem;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 850;
    letter-spacing: -0.03em;
}

.search-bar,
.filter-box {
    display: flex;
    gap: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    background: rgba(15, 23, 42, 0.66);
    padding: 0.75rem;
    box-shadow: var(--shadow);
}

.search-bar input,
.filter-box input,
.filter-box select {
    min-width: 0;
    flex: 1;
    border-radius: 0.9rem;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(168, 85, 247, 0.16);
    color: #ffffff;
    padding: 0.8rem 0.95rem;
    outline: none;
}

.filter-box select {
    flex: 0 0 160px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-heading a {
    color: #fde68a;
    font-weight: 700;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.2rem;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 1.2rem;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(168, 85, 247, 0.18);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.38);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.44);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease, filter 0.3s ease;
}

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

.card-type,
.rank-badge {
    position: absolute;
    top: 0.75rem;
    z-index: 2;
    border-radius: 999px;
    padding: 0.32rem 0.58rem;
    font-size: 0.76rem;
    font-weight: 800;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--pink));
}

.card-type {
    left: 0.75rem;
}

.rank-badge {
    right: 0.75rem;
}

.movie-card-body {
    padding: 0.9rem;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #c4b5fd;
    font-size: 0.78rem;
    margin-bottom: 0.45rem;
}

.movie-card h3 {
    min-height: 2.7rem;
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.35;
}

.movie-card p {
    margin-top: 0.55rem;
    min-height: 3.8rem;
    color: #b8b8d9;
    font-size: 0.86rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    margin-top: 0.75rem;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 1.5rem;
}

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

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

.category-tile {
    min-height: 9.5rem;
    padding: 1.25rem;
    border-radius: 1.25rem;
    background:
        linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(244, 114, 182, 0.08)),
        rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(168, 85, 247, 0.22);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.44);
}

.category-tile span {
    display: block;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 850;
}

.category-tile p {
    margin-top: 0.7rem;
    color: #c4b5fd;
    line-height: 1.7;
}

.rank-panel,
.side-card,
.player-card,
.filter-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.rank-panel {
    padding: 1.2rem;
    align-self: start;
    position: sticky;
    top: 5.5rem;
}

.mini-list {
    display: grid;
    gap: 0.85rem;
}

.mini-card {
    display: grid;
    grid-template-columns: auto 4.2rem minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
    padding: 0.65rem;
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.48);
    border: 1px solid rgba(168, 85, 247, 0.14);
}

.mini-rank {
    width: 1.8rem;
    height: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    color: #111827;
    background: var(--amber);
    font-weight: 900;
}

.mini-card img {
    width: 4.2rem;
    height: 5.8rem;
    border-radius: 0.7rem;
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card strong {
    color: #ffffff;
    font-weight: 800;
}

.mini-card em {
    margin-top: 0.35rem;
    color: #c4b5fd;
    font-size: 0.8rem;
    font-style: normal;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 1.25rem 2rem;
}

.compact-hero > div {
    border-radius: 1.6rem;
    border: 1px solid rgba(168, 85, 247, 0.22);
    background:
        radial-gradient(circle at 72% 20%, rgba(251, 191, 36, 0.18), transparent 20rem),
        linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(15, 23, 42, 0.84));
    padding: clamp(2rem, 6vw, 4rem);
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    margin-top: 1rem;
    font-size: clamp(2.2rem, 6vw, 4.6rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.compact-hero p {
    margin-top: 1rem;
    max-width: 760px;
    color: #ddd6fe;
    font-size: 1.1rem;
    line-height: 1.9;
}

.filter-section {
    padding-top: 2rem;
}

.filter-box {
    margin-bottom: 1.5rem;
}

.search-filter-box {
    flex-wrap: wrap;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    filter: blur(12px) saturate(1.2);
    transform: scale(1.04);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.82) 55%, rgba(2, 6, 23, 0.94) 100%);
}

.detail-shell {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 1.25rem 3.5rem;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}

.detail-poster {
    border-radius: 1.4rem;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(251, 191, 36, 0.22);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: #c4b5fd;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #fde68a;
}

.detail-info h1 {
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 0.96;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.detail-one-line {
    margin-top: 1.2rem;
    max-width: 780px;
    color: #ddd6fe;
    font-size: 1.18rem;
    line-height: 1.9;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 1.2rem 0;
}

.detail-meta span {
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.4rem;
}

.player-card,
.side-card {
    padding: 1.25rem;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    background: #020617;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(168, 85, 247, 0.18);
}

.video-frame video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.62));
    pointer-events: auto;
}

.play-cover.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 5rem;
    height: 5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--pink));
    box-shadow: 0 20px 54px rgba(251, 191, 36, 0.32);
    font-size: 2rem;
    padding-left: 0.25rem;
}

.player-card p,
.side-card p {
    margin-top: 0.9rem;
    color: #d8b4fe;
    line-height: 1.9;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.7rem 1rem;
    margin-top: 1rem;
}

.side-card dt {
    color: #fde68a;
    font-weight: 800;
}

.side-card dd {
    color: #ddd6fe;
}

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

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

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

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

    .quick-search,
    .split-layout,
    .detail-main,
    .detail-shell {
        grid-template-columns: 1fr;
    }

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

    .rank-panel {
        position: static;
    }

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

@media (max-width: 720px) {
    .hero,
    .hero-content {
        min-height: 74vh;
    }

    .hero-content {
        padding-top: 6.5rem;
    }

    .section-shell {
        padding: 3rem 1rem;
    }

    .page-hero {
        padding: 3rem 1rem 1rem;
    }

    .movie-grid,
    .featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.9rem;
    }

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

    .filter-box,
    .search-bar {
        flex-direction: column;
    }

    .filter-box select {
        flex: 1 1 auto;
    }

    .detail-shell {
        padding-top: 3rem;
    }

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

    .movie-card-body {
        padding: 0.75rem;
    }

    .movie-card h3 {
        font-size: 0.95rem;
    }

    .movie-card p {
        font-size: 0.82rem;
    }
}
