:root {
    color-scheme: dark;
    --bg: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --border: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --gold: #fde047;
    --gold-dark: #f59e0b;
    --purple: #6d28d9;
    --pink: #db2777;
    --shadow: 0 22px 55px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(109, 40, 217, 0.28), transparent 32rem),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--border);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner,
.page-section,
.home-search-band,
.detail-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #1e1b4b;
    background: linear-gradient(135deg, var(--gold), #fff7ad);
    box-shadow: 0 10px 30px rgba(253, 224, 71, 0.25);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong,
.footer-brand {
    font-size: 22px;
    letter-spacing: 0.03em;
    background: linear-gradient(90deg, var(--gold), #fff7ad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted);
    white-space: nowrap;
}

.desktop-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--gold);
}

.header-search,
.mobile-panel form,
.home-search-band form,
.inline-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-panel input,
.home-search-band input,
.inline-filter input {
    width: 210px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    outline: none;
    padding: 10px 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease, width 0.2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.home-search-band input:focus,
.inline-filter input:focus {
    border-color: rgba(253, 224, 71, 0.72);
    box-shadow: 0 0 0 4px rgba(253, 224, 71, 0.13);
}

.header-search button,
.mobile-panel button,
.home-search-band button,
.inline-filter button,
.primary-btn,
.ghost-btn,
.section-more {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-panel button,
.home-search-band button,
.inline-filter button,
.primary-btn {
    color: #1f2937;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    font-weight: 800;
    padding: 10px 18px;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
}

.header-search button:hover,
.mobile-panel button:hover,
.home-search-band button:hover,
.inline-filter button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.menu-button {
    display: none;
    border: 1px solid var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 9px 12px;
}

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

.mobile-panel.open {
    display: grid;
    gap: 14px;
}

.mobile-panel a {
    color: var(--muted);
}

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

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

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

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

.hero-overlay,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.38)),
        linear-gradient(0deg, rgba(15, 23, 42, 1), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 58px;
    width: min(1180px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    padding: 74px 0;
}

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

.eyebrow,
.section-heading span,
.ranking-title span,
.category-overview-body span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-info p,
.section-heading p,
.text-panel p,
.category-overview-body p,
.site-footer p {
    color: var(--muted);
}

.hero-copy p {
    max-width: 680px;
    font-size: 18px;
}

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

.hero-tags {
    margin: 26px 0 34px;
}

.hero-tags span,
.tag-cloud span,
.card-meta span,
.detail-meta span {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--muted);
    padding: 6px 11px;
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
}

.ghost-btn,
.section-more {
    color: var(--text);
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

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

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

.hero-dot.active {
    width: 34px;
    border-radius: 999px;
    background: var(--gold);
}

.home-search-band {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    margin-top: -34px;
    position: relative;
    z-index: 5;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(88, 28, 135, 0.72));
    box-shadow: var(--shadow);
}

.home-search-band h2 {
    margin: 0 0 4px;
    font-size: 24px;
}

.home-search-band input {
    width: min(420px, 56vw);
}

.page-section {
    padding: 76px 0 0;
}

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

.section-heading h2,
.ranking-title h2,
.text-panel h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
}

.section-heading p {
    margin-top: 8px;
    max-width: 680px;
}

.section-more {
    flex: 0 0 auto;
    padding: 10px 16px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(253, 224, 71, 0.36);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #020617;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    color: #1f2937;
    background: var(--gold);
    padding: 7px 12px;
    font-size: 13px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    color: #1f2937;
    background: linear-gradient(135deg, var(--gold), #ffffff);
}

.card-body {
    padding: 16px;
}

.card-meta,
.card-footer {
    align-items: center;
    justify-content: space-between;
    color: var(--soft);
    font-size: 13px;
}

.card-meta span {
    padding: 3px 8px;
    font-size: 12px;
}

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

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.card-compact h3 {
    font-size: 16px;
}

.card-compact .card-body {
    padding: 14px;
}

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

.category-card,
.category-overview-card a {
    position: relative;
    display: grid;
    min-height: 210px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.7);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.category-card img,
.category-card span {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-card img {
    object-fit: cover;
    transition: transform 0.25s ease;
}

.category-card span {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.15));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 1;
    align-self: end;
    padding: 0 18px;
}

.category-card strong {
    margin-top: auto;
    font-size: 22px;
}

.category-card em {
    padding-bottom: 18px;
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

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

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

.ranking-panel,
.text-panel,
.next-panel,
.category-overview-card a {
    border: 1px solid var(--border);
    border-radius: 26px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.ranking-panel {
    position: sticky;
    top: 100px;
    padding: 22px;
}

.ranking-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.ranking-title a {
    color: var(--gold);
    font-size: 14px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 34px 52px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 9px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    transform: translateX(3px);
    background: rgba(253, 224, 71, 0.12);
}

.rank-number {
    color: var(--gold);
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 52px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-title {
    font-weight: 700;
}

.rank-score {
    color: var(--gold);
    font-size: 14px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(88, 28, 135, 0.72)),
        var(--bg);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    opacity: 0.24;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg), transparent 70%);
}

.page-hero > div {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    width: min(1180px, calc(100% - 32px));
    min-height: 420px;
    margin: 0 auto;
    padding: 72px 0;
}

.slim-hero {
    min-height: 330px;
}

.slim-hero > div {
    min-height: 330px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.inline-filter {
    margin-top: 26px;
}

.inline-filter input {
    width: min(520px, 70vw);
}

.category-overview-card a {
    min-height: 320px;
    overflow: hidden;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    min-height: 178px;
}

.category-thumbs img {
    width: 100%;
    height: 178px;
    object-fit: cover;
}

.category-overview-body {
    padding: 20px;
}

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

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

.narrow-section {
    width: min(900px, calc(100% - 32px));
}

.extended-ranking .rank-row {
    grid-template-columns: 42px 64px 1fr auto;
}

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

.detail-hero-inner {
    position: relative;
    z-index: 2;
    min-height: 760px;
    padding: 88px 0 70px;
}

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

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

.movie-player {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.18));
    cursor: pointer;
}

.player-cover span {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #1f2937;
    background: var(--gold);
    font-size: 28px;
    box-shadow: 0 18px 42px rgba(253, 224, 71, 0.25);
}

.player-cover strong {
    font-size: 18px;
}

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

.detail-info {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(18px);
}

.detail-info h1 {
    font-size: clamp(32px, 4vw, 54px);
}

.detail-meta {
    margin: 22px 0;
}

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

.text-panel,
.next-panel {
    padding: 26px;
}

.text-panel h2 + p {
    margin-top: 12px;
}

.text-panel p + h2 {
    margin-top: 28px;
}

.next-panel {
    display: grid;
    gap: 14px;
    position: sticky;
    top: 100px;
}

.next-panel a {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.next-panel a:hover {
    background: rgba(253, 224, 71, 0.12);
}

.next-panel span {
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr 1fr;
    gap: 42px;
    padding: 46px 0;
}

.footer-inner h4 {
    margin: 0 0 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.footer-links a {
    color: var(--muted);
    font-size: 14px;
}

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid var(--border);
    color: var(--soft);
    text-align: center;
    font-size: 14px;
}

.search-card.is-hidden,
.movie-card.is-hidden {
    display: none;
}

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

    .menu-button {
        display: inline-flex;
    }

    .hero-content,
    .detail-grid,
    .split-layout,
    .detail-content,
    .footer-inner,
    .home-search-band {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

    .ranking-panel,
    .next-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner,
    .footer-inner,
    .page-section,
    .home-search-band,
    .detail-hero-inner,
    .page-hero > div {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-copy h1,
    .page-hero h1 {
        font-size: 40px;
    }

    .home-search-band,
    .section-heading {
        align-items: stretch;
    }

    .section-heading,
    .home-search-band form,
    .inline-filter,
    .mobile-panel form {
        flex-direction: column;
    }

    .home-search-band input,
    .inline-filter input,
    .mobile-panel input {
        width: 100%;
    }

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

    .card-body {
        padding: 12px;
    }

    .movie-card p {
        display: none;
    }

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

    .detail-hero-inner {
        padding: 42px 0;
    }

    .detail-info {
        padding: 18px;
    }

    .rank-row,
    .extended-ranking .rank-row {
        grid-template-columns: 34px 46px 1fr;
    }

    .rank-score {
        display: none;
    }
}

@media (max-width: 480px) {
    .brand-text em {
        display: none;
    }

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

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