:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.88);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --gold: #f59e0b;
    --gold-strong: #f97316;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.14), transparent 28rem),
        radial-gradient(circle at 82% 0%, rgba(59, 130, 246, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    min-height: 100vh;
}

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

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

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.35));
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
    background: rgba(15, 23, 42, 0.96);
    border-color: var(--line);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.site-logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #1f2937;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.28);
}

.site-logo-text {
    font-size: 20px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 16px;
    color: var(--soft);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(245, 158, 11, 0.16);
    transform: translateY(-1px);
}

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

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.4s ease;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(0deg, #020617, transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 72px;
    max-width: 760px;
}

.hero-eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 12px;
    color: #fde68a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.1);
}

.hero-content h1,
.hero-content h2 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(42px, 8vw, 84px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 690px;
    margin: 22px 0 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.movie-meta,
.tag-row,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.movie-meta span,
.tag-row span {
    color: #dbeafe;
    font-size: 13px;
    line-height: 1;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
}

.hero-actions {
    margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.3);
}

.ghost-btn,
.section-more {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.58);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 80px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 42px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    background: #f59e0b;
}

.category-strip {
    margin-top: -48px;
    position: relative;
    z-index: 8;
}

.category-strip-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.category-strip-inner span {
    white-space: nowrap;
    color: #fde68a;
    font-weight: 900;
}

.category-strip-inner a {
    flex: 0 0 auto;
    padding: 10px 14px;
    color: var(--soft);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
}

.category-strip-inner a:hover {
    color: #fff;
    background: rgba(245, 158, 11, 0.16);
}

.content-section,
.page-hero,
.detail-main,
.category-overview-grid {
    width: min(1180px, calc(100% - 32px));
    margin-right: auto;
    margin-left: auto;
}

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

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-text h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(15, 23, 42, 0.92);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.22), transparent 42%),
        linear-gradient(160deg, #1e293b, #020617);
    background-size: cover;
    background-position: center;
}

.poster-frame::after,
.wide-cover::after,
.category-cover::after,
.detail-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.76));
}

.movie-badge,
.rank-mark {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.movie-badge {
    right: 12px;
    color: #111827;
    background: #fbbf24;
}

.rank-mark {
    left: 12px;
    color: #fff;
    background: rgba(220, 38, 38, 0.9);
}

.card-content {
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover {
    color: #fbbf24;
}

.card-content p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 46px;
    margin: 10px 0 13px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    gap: 7px;
    margin-bottom: 12px;
}

.movie-meta span,
.tag-row span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-row {
    gap: 7px;
}

.tag-row span {
    color: #bae6fd;
    padding: 6px 9px;
    font-size: 12px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 42% 1fr;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.wide-cover,
.category-cover,
.detail-poster {
    position: relative;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.2), transparent),
        linear-gradient(160deg, #1e293b, #020617);
    background-size: cover;
    background-position: center;
}

.wide-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.wide-content h3 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
}

.wide-content p {
    margin: 16px 0;
    color: var(--soft);
    line-height: 1.8;
}

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

.page-main {
    padding-top: 112px;
}

.small-hero {
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.22), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.84));
    box-shadow: var(--shadow);
}

.small-hero p {
    max-width: 820px;
    margin: 18px 0 0;
    color: var(--soft);
    font-size: 17px;
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    margin-top: 28px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    color: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.7);
    padding: 0 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.62);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.empty-state {
    display: none;
    margin: 36px 0 0;
    padding: 22px;
    text-align: center;
    color: var(--soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.7);
}

.empty-state.is-visible {
    display: block;
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding: 42px 0 0;
}

.category-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.76);
}

.category-cover {
    min-height: 250px;
    border-radius: 18px;
}

.category-card h2 {
    margin: 6px 0 12px;
    font-size: 28px;
}

.category-card p,
.category-mini-list {
    color: var(--soft);
    line-height: 1.7;
}

.category-mini-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 20px;
}

.category-mini-list span {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
}

.detail-main {
    padding-top: 100px;
}

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

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 34px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.18), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.86));
    box-shadow: var(--shadow);
}

.detail-poster {
    min-height: 500px;
    border-radius: 24px;
    overflow: hidden;
}

.detail-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.detail-info p {
    margin: 18px 0 22px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    margin-bottom: 18px;
}

.large-tags {
    margin-bottom: 26px;
}

.player-section {
    padding-top: 58px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 16px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.24), rgba(2, 6, 23, 0.72)),
        rgba(2, 6, 23, 0.58);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 46px rgba(245, 158, 11, 0.34);
}

.play-icon::before {
    content: "";
    display: block;
    margin-left: 6px;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #111827;
}

.detail-text {
    color: var(--soft);
    font-size: 17px;
    line-height: 1.9;
}

.detail-text h2 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 30px;
}

.detail-text p + h2 {
    margin-top: 34px;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner strong {
    display: block;
    color: #fff;
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: 660px;
}

.footer-links a {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
}

.footer-links a:hover {
    color: #fbbf24;
}

@media (max-width: 1100px) {
    .movie-grid,
    .full-grid,
    .ranking-list,
    .ranking-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 820px) {
    .site-header-inner {
        height: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 64px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

    .site-header.menu-open .site-nav {
        display: flex;
    }

    .nav-link {
        text-align: center;
    }

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

    .hero-content h1,
    .hero-content h2 {
        font-size: 46px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-controls {
        right: 24px;
        bottom: 38px;
    }

    .movie-grid,
    .full-grid,
    .compact-grid,
    .ranking-list,
    .ranking-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .wide-cover,
    .category-cover {
        min-height: 340px;
    }

    .detail-poster {
        min-height: 460px;
    }

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

    .small-hero {
        padding: 32px 22px;
    }

    .footer-inner {
        flex-direction: column;
    }

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

@media (max-width: 520px) {
    .site-logo-text {
        font-size: 17px;
    }

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

    .hero-content h1,
    .hero-content h2 {
        font-size: 36px;
    }

    .hero-tags span,
    .detail-meta span,
    .movie-meta span,
    .tag-row span {
        font-size: 12px;
    }

    .movie-grid,
    .full-grid,
    .compact-grid,
    .ranking-list,
    .ranking-grid {
        grid-template-columns: 1fr;
    }

    .card-content p {
        min-height: auto;
    }

    .player-shell {
        border-radius: 18px;
    }
}
