:root {
    color-scheme: dark;
    --bg: #070b18;
    --bg-soft: #0f172a;
    --card: rgba(255, 255, 255, 0.065);
    --card-strong: rgba(255, 255, 255, 0.11);
    --line: rgba(255, 255, 255, 0.12);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted-soft: #94a3b8;
    --gold: #facc15;
    --gold-dark: #d97706;
    --purple: #6d28d9;
    --pink: #db2777;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(250, 204, 21, 0.11), transparent 32rem),
        radial-gradient(circle at top right, rgba(219, 39, 119, 0.18), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #070b18 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(88, 28, 135, 0.92), rgba(15, 23, 42, 0.95));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
}

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

.brand-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 15px;
    color: #111827;
    background: linear-gradient(135deg, #fde047, #f59e0b);
    box-shadow: 0 10px 28px rgba(250, 204, 21, 0.28);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: rotate(10deg) scale(1.04);
}

.brand strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1;
    background: linear-gradient(90deg, #fde047, #fff7ad);
    -webkit-background-clip: text;
    color: transparent;
}

.brand small {
    display: block;
    margin-top: 4px;
    color: #d1d5db;
    font-size: 0.76rem;
}

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

.nav-link,
.mobile-link {
    color: #f8fafc;
    opacity: 0.88;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
    color: var(--gold);
    opacity: 1;
}

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

.header-search input,
.mobile-search input,
.filter-search input {
    width: 210px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    outline: none;
    color: #fff;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-search input:focus {
    border-color: rgba(250, 204, 21, 0.85);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.14);
    background: rgba(255, 255, 255, 0.12);
}

.header-search button,
.mobile-search button {
    border: 0;
    color: #111827;
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(135deg, #fde047, #f59e0b);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: #fff;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px;
    background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-search input {
    width: 100%;
}

.hero {
    position: relative;
    height: clamp(560px, 72vh, 760px);
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade,
.detail-hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.8) 35%, rgba(15, 23, 42, 0.2) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.58) 44%, rgba(2, 6, 23, 0.82) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    padding-top: 24px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
    margin: 18px 0;
    font-size: clamp(2.6rem, 7vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    text-shadow: 0 12px 38px rgba(0, 0, 0, 0.45);
}

.hero p,
.page-hero p,
.detail-hero p {
    max-width: 760px;
    color: #e5e7eb;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.8;
}

.hero-meta,
.movie-meta-line,
.mini-category-row,
.tag-row,
.hero-actions,
.filter-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin: 26px 0;
}

.hero-meta span,
.movie-meta-line span,
.tag,
.mini-category,
.poster-badge,
.poster-score {
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: #f8fafc;
    padding: 7px 12px;
    font-size: 0.82rem;
}

.hero-meta span:first-child,
.poster-score {
    color: #111827;
    border-color: rgba(250, 204, 21, 0.9);
    background: linear-gradient(135deg, #fde047, #f59e0b);
    font-weight: 900;
}

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

.primary-button {
    color: #111827;
    background: linear-gradient(135deg, #fde047, #f59e0b);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.26);
}

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

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.25);
}

.block-button {
    width: 100%;
    margin-top: 16px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.54);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
    width: 34px;
    background: var(--gold);
}

.main-stack {
    display: grid;
    gap: 72px;
    padding: 64px 0;
}

.section-block {
    position: relative;
}

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

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    letter-spacing: -0.035em;
}

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

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 320px);
    gap: 22px;
    overflow-x: auto;
    padding: 4px 2px 20px;
    scrollbar-width: thin;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 22px;
}

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.046));
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.19);
    transition: transform 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(250, 204, 21, 0.5);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.poster-wrap img,
.rank-thumb img,
.cover-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    backdrop-filter: blur(10px);
}

.poster-score {
    position: absolute;
    right: 12px;
    bottom: 12px;
}

.movie-body {
    padding: 16px;
}

.movie-meta-line {
    color: var(--muted-soft);
    font-size: 0.8rem;
}

.movie-meta-line span {
    padding: 4px 9px;
    color: #cbd5e1;
}

.movie-card h3,
.rank-card h3 {
    margin: 12px 0 8px;
    font-size: 1.05rem;
    line-height: 1.35;
}

.movie-card p,
.rank-card p,
.site-footer p,
.category-card p {
    color: var(--muted);
    line-height: 1.7;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.4em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.93rem;
}

.tag-row {
    margin-top: 14px;
}

.tag {
    color: #fde68a;
    padding: 5px 9px;
    font-size: 0.78rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
}

.large-category-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.category-card {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 8rem),
        linear-gradient(135deg, rgba(109, 40, 217, 0.58), rgba(219, 39, 119, 0.32));
    transition: transform 0.25s ease, border 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(250, 204, 21, 0.45);
}

.category-index {
    display: inline-flex;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 22px;
}

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

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

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

.rank-card {
    display: grid;
    grid-template-columns: auto 92px 1fr;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.25s ease, background 0.25s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
}

.rank-number {
    display: inline-grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 16px;
    color: #111827;
    font-weight: 1000;
    font-size: 1.35rem;
    background: linear-gradient(135deg, #fde047, #f59e0b);
}

.rank-thumb {
    display: block;
    width: 92px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.rank-info p {
    margin: 0 0 10px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 68px;
    background:
        radial-gradient(circle at 20% 10%, rgba(250, 204, 21, 0.16), transparent 28rem),
        radial-gradient(circle at 80% 10%, rgba(219, 39, 119, 0.24), transparent 30rem),
        linear-gradient(135deg, rgba(88, 28, 135, 0.74), rgba(15, 23, 42, 0.92));
}

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

.mini-category-row {
    margin-top: 30px;
}

.mini-category.active,
.mini-category:hover {
    color: #111827;
    border-color: var(--gold);
    background: var(--gold);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 26px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.055);
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 14px;
}

.filter-search input {
    width: min(520px, 100%);
}

.filter-search span {
    color: var(--muted-soft);
}

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

.filter-chip {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #fff;
    padding: 9px 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.07);
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
    color: #111827;
    border-color: var(--gold);
    background: var(--gold);
    font-weight: 900;
}

[data-card].hidden {
    display: none;
}

.detail-hero {
    position: relative;
    min-height: 480px;
    overflow: hidden;
    background: #020617;
}

.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.88);
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 74px 0 52px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #cbd5e1;
    margin-bottom: 42px;
}

.breadcrumb a {
    color: #fde68a;
}

.detail-title-wrap {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
}

.detail-score {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 130px;
    height: 130px;
    border: 1px solid rgba(250, 204, 21, 0.44);
    border-radius: 36px;
    background: rgba(250, 204, 21, 0.12);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.32);
}

.detail-score strong {
    color: var(--gold);
    font-size: 3rem;
    line-height: 1;
}

.detail-score span {
    color: #fde68a;
    font-size: 0.85rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    padding: 44px 0 70px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 26px;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 8px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.62));
}

.player-shell.playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-circle {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    font-size: 2rem;
    background: linear-gradient(135deg, #fde047, #f59e0b);
    box-shadow: 0 18px 48px rgba(245, 158, 11, 0.35);
}

.play-overlay strong {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.38);
}

.detail-meta-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 24px 0;
}

.detail-meta-card div,
.aside-card,
.detail-content {
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
}

.detail-meta-card div {
    padding: 18px;
}

.detail-meta-card span {
    display: block;
    color: var(--muted-soft);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.detail-meta-card strong {
    color: #fff;
}

.detail-content {
    padding: 26px;
}

.detail-content h2,
.aside-card h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.detail-content p {
    color: #dbeafe;
    line-height: 1.95;
    margin: 0 0 24px;
}

.detail-tags .tag {
    font-size: 0.86rem;
}

.detail-aside {
    display: grid;
    align-content: start;
    gap: 22px;
}

.aside-card {
    padding: 18px;
}

.cover-card img {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

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

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

.movie-card-wide .poster-wrap {
    aspect-ratio: 2 / 3;
}

.movie-card-wide .movie-body {
    padding: 12px;
}

.movie-card-wide .movie-body p,
.movie-card-wide .tag-row,
.movie-card-wide .poster-badge,
.movie-card-wide .poster-score {
    display: none;
}

.movie-card-wide h3 {
    margin-top: 6px;
    font-size: 0.95rem;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-grid h3 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.footer-grid a {
    display: block;
    color: var(--muted);
    margin: 8px 0;
}

.footer-grid a:hover {
    color: var(--gold);
}

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

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 45;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 18px;
    color: #111827;
    cursor: pointer;
    font-weight: 1000;
    background: var(--gold);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.3);
}

.back-to-top.show {
    display: block;
}

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

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

    .rank-grid,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-title-wrap {
        display: block;
    }

    .detail-score {
        width: 112px;
        height: 112px;
        margin-top: 24px;
    }
}

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

    .hero {
        height: 640px;
    }

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

    .hero-actions,
    .section-heading,
    .filter-search {
        align-items: stretch;
        flex-direction: column;
    }

    .section-heading {
        gap: 10px;
    }

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

    .movie-body {
        padding: 12px;
    }

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

    .movie-card p,
    .tag-row {
        display: none;
    }

    .rank-card {
        grid-template-columns: 44px 76px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .rank-thumb {
        width: 76px;
    }

    .rank-info p {
        display: none;
    }

    .detail-meta-card {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-hero {
        padding: 72px 0 48px;
    }
}

@media (max-width: 460px) {
    .brand small {
        display: none;
    }

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

    .movie-card p,
    .tag-row {
        display: flex;
    }

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