* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --text: #f8fafc;
    --muted: #c4b5fd;
    --soft: #94a3b8;
    --line: rgba(168, 85, 247, 0.22);
    --amber: #fbbf24;
    --pink: #ec4899;
    --purple: #a855f7;
    --blue: #38bdf8;
    --green: #34d399;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(168, 85, 247, 0.22), transparent 32rem),
        radial-gradient(circle at 90% 18%, rgba(236, 72, 153, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.is-menu-open {
    overflow: hidden;
}

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: 50;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(88, 28, 135, 0.92), rgba(15, 23, 42, 0.94));
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 50px rgba(2, 6, 23, 0.4);
}

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

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 15px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--pink));
    box-shadow: 0 12px 40px rgba(251, 191, 36, 0.25);
}

.brand-name,
.footer-brand {
    font-size: 1.35rem;
}

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

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

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

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

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.55);
    outline: none;
}

.header-search input,
.mobile-search input {
    width: 230px;
    padding: 10px 15px;
}

.header-search button,
.mobile-search button,
.filter-bar button,
.btn {
    border: 0;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--pink));
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 14px 36px rgba(236, 72, 153, 0.28);
}

.header-search button,
.mobile-search button,
.filter-bar button {
    padding: 10px 17px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #f8fafc;
}

.mobile-panel {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.68);
}

.hero-carousel {
    position: relative;
    min-height: 720px;
    overflow: hidden;
}

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

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

.hero-bg,
.detail-hero {
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.64), rgba(2, 6, 23, 0.92)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    transform: scale(1.04);
    filter: saturate(1.12);
}

.hero-content {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 56px;
    align-items: center;
    padding: 70px 0 100px;
}

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

.hero-copy p,
.detail-copy .lead,
.page-hero p {
    max-width: 760px;
    color: #ddd6fe;
    font-size: clamp(1.05rem, 2.1vw, 1.28rem);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    margin-bottom: 16px;
    color: var(--amber);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-tags,
.card-badges,
.tag-row,
.info-list,
.inline-links,
.category-cloud,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip,
.hero-tags span,
.tag-row span,
.card-badges span,
.category-cloud a,
.inline-links a,
.footer-links a {
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 999px;
    color: #ddd6fe;
    background: rgba(15, 23, 42, 0.58);
}

.chip,
.hero-tags span,
.category-cloud a,
.inline-links a,
.footer-links a {
    padding: 8px 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 23px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(236, 72, 153, 0.36);
}

.btn.ghost {
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(168, 85, 247, 0.36);
    box-shadow: none;
}

.hero-poster,
.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: var(--shadow);
}

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

.hero-poster span,
.play-dot {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--pink));
}

.hero-poster span {
    right: 22px;
    bottom: 22px;
    width: 66px;
    height: 66px;
    font-size: 1.5rem;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.4);
    cursor: pointer;
}

.hero-dot.active {
    width: 38px;
    background: linear-gradient(135deg, var(--amber), var(--pink));
}

.quick-panel,
.content-section,
.detail-inner,
.site-footer .footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-panel {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 24px;
    transform: translateY(-52px);
}

.quick-card,
.side-panel,
.text-panel,
.info-card,
.player-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-card {
    padding: 28px;
}

.quick-card span {
    color: var(--amber);
    font-weight: 900;
}

.quick-card strong {
    display: block;
    margin: 8px 0;
    font-size: 1.75rem;
    line-height: 1.2;
}

.quick-card p,
.section-head p,
.movie-card p,
.text-panel p,
.info-card p,
.site-footer p {
    color: var(--muted);
}

.quick-links,
.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.quick-links a,
.cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    color: #ddd6fe;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.quick-links a:hover,
.cat-link:hover,
.movie-card:hover,
.rank-row:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.6);
}

.content-section {
    padding: 34px 0;
}

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

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

.section-head p {
    margin: 8px 0 0;
}

.section-more {
    color: var(--amber);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.88) 100%);
}

.play-dot {
    right: 15px;
    bottom: 15px;
    width: 42px;
    height: 42px;
}

.rank-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 2;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: var(--amber);
    font-weight: 900;
}

.card-body {
    padding: 18px;
}

.card-badges span,
.tag-row span {
    padding: 5px 9px;
    font-size: 0.8rem;
}

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

.movie-card h3 a:hover {
    color: var(--amber);
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    color: #bfdbfe;
    font-size: 0.9rem;
}

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

.movie-card.compact {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
}

.movie-card.compact .poster {
    aspect-ratio: auto;
    min-height: 100%;
}

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

.side-panel {
    position: sticky;
    top: 100px;
    padding: 24px;
}

.side-panel h2,
.info-card h2,
.player-shell h2,
.text-panel h2 {
    margin: 0 0 18px;
    font-size: 1.45rem;
}

.category-cloud {
    align-items: flex-start;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
}

.compact-hero {
    min-height: 320px;
    display: grid;
    place-items: center;
    text-align: center;
    background:
        radial-gradient(circle at 30% 0%, rgba(168, 85, 247, 0.26), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(88, 28, 135, 0.62), rgba(2, 6, 23, 0.9));
    border-bottom: 1px solid var(--line);
}

.compact-hero > div {
    width: min(960px, calc(100% - 32px));
}

.filter-bar {
    position: sticky;
    top: 88px;
    z-index: 5;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    padding: 0 14px;
}

.filter-bar input {
    flex: 1;
    min-width: 240px;
}

.filter-bar select {
    min-width: 150px;
}

.search-hidden {
    display: none;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 96px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row img {
    width: 96px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-no,
.rank-score {
    font-size: 1.35rem;
    color: var(--amber);
    font-weight: 900;
    text-align: center;
}

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

.rank-main em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
}

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

.cat-link {
    min-height: 86px;
}

.cat-link strong,
.cat-link span {
    display: block;
}

.cat-link span {
    color: var(--muted);
    font-size: 0.9rem;
}

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

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(251, 191, 36, 0.22), transparent 20rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), #020617 100%);
}

.detail-inner {
    position: relative;
    padding: 56px 0 76px;
}

.back-link {
    display: inline-flex;
    margin-bottom: 28px;
    color: var(--amber);
    font-weight: 900;
}

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

.detail-copy h1 {
    max-width: 900px;
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 24px;
}

.player-shell,
.text-panel,
.info-card {
    padding: 24px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    border: 1px solid rgba(251, 191, 36, 0.25);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: #111827;
    background:
        radial-gradient(circle at center, rgba(251, 191, 36, 0.22), transparent 9rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.play-layer span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--pink));
    font-size: 2rem;
    box-shadow: 0 18px 50px rgba(251, 191, 36, 0.28);
}

.movie-player.is-playing .play-layer {
    opacity: 0;
    pointer-events: none;
}

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

.info-list a,
.info-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.36);
    color: #ddd6fe;
}

.info-list span {
    color: var(--soft);
}

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

.large-tags span {
    padding: 8px 12px;
}

.inline-links {
    margin-bottom: 20px;
}

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

.mini-rank {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.36);
}

.mini-rank span {
    display: grid;
    height: 32px;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: var(--amber);
    font-weight: 900;
}

.mini-rank strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-footer {
    margin-top: 50px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.58);
}

.footer-inner {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 30px;
    padding: 42px 0;
}

.footer-links {
    justify-content: flex-end;
}

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

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

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

    .hero-content,
    .detail-grid,
    .quick-panel,
    .split-section,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-content {
        gap: 34px;
        padding-top: 44px;
    }

    .hero-poster,
    .detail-poster {
        max-width: 340px;
    }

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

@media (max-width: 720px) {
    .header-inner {
        min-height: 66px;
    }

    .brand-name {
        font-size: 1.15rem;
    }

    .hero-carousel {
        min-height: 760px;
    }

    .hero-content {
        padding-bottom: 86px;
    }

    .hero-copy h1,
    .detail-copy h1,
    .page-hero h1 {
        font-size: clamp(2.2rem, 13vw, 3.3rem);
    }

    .quick-panel {
        transform: none;
        padding-top: 22px;
    }

    .content-section {
        padding: 26px 0;
    }

    .section-head {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 12px;
    }

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

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

    .card-body {
        padding: 14px;
    }

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

    .filter-bar {
        position: static;
        display: grid;
    }

    .filter-bar input,
    .filter-bar select,
    .filter-bar button {
        width: 100%;
    }

    .rank-row {
        grid-template-columns: 42px 72px minmax(0, 1fr);
    }

    .rank-row img {
        width: 72px;
        height: 50px;
    }

    .rank-score {
        display: none;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-inner {
        padding: 34px 0 46px;
    }

    .player-shell,
    .text-panel,
    .info-card,
    .quick-card,
    .side-panel {
        padding: 18px;
    }

    .play-layer span {
        width: 68px;
        height: 68px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}
