* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #fbbf24;
    --accent-deep: #d97706;
    --accent-soft: rgba(251, 191, 36, 0.12);
    --radius: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.10), transparent 30%),
        radial-gradient(circle at 80% 12%, rgba(59, 130, 246, 0.11), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background:
        linear-gradient(135deg, rgba(251, 191, 36, 0.20), rgba(15, 23, 42, 0.96)),
        var(--panel-soft);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 66px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    white-space: nowrap;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.28);
}

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

.site-nav a,
.footer-links a {
    color: var(--muted-strong);
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.footer-links a:hover {
    color: #ffffff;
}

.nav-cats {
    display: flex;
    gap: 16px;
    padding-left: 10px;
    border-left: 1px solid var(--line);
}

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

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

.nav-search input,
.filter-panel input,
.filter-panel select,
.search-box-large input {
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.92);
    color: var(--text);
    outline: none;
}

.nav-search input {
    width: 190px;
    padding: 10px 12px;
}

.nav-search button,
.search-box-large button {
    border: 0;
    border-radius: 13px;
    padding: 10px 14px;
    background: var(--accent);
    color: #111827;
    font-weight: 700;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--text);
    padding: 8px 10px;
}

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

.hero-stage {
    position: relative;
    min-height: 690px;
}

.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-bg {
    position: absolute;
    inset: 0;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 52%, rgba(2, 6, 23, 0.58) 100%);
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-title h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 76px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 680px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 19px;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 999px;
    padding: 5px 10px;
    color: #fde68a;
    background: var(--accent-soft);
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 14px;
    padding: 0 18px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary,
.btn.full {
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    color: #111827;
}

.btn.ghost {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
    color: #ffffff;
}

.btn.soft {
    border: 1px solid rgba(251, 191, 36, 0.25);
    background: var(--accent-soft);
    color: #fde68a;
}

.btn.full {
    width: 100%;
    margin-top: 18px;
}

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

.hero-dots button {
    width: 38px;
    height: 5px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    color: transparent;
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--accent);
}

.section-block {
    margin-top: 58px;
}

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

.section-head h2,
.site-footer h2,
.prose-section h2,
.player-section h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
}

.section-head.compact h2 {
    font-size: 24px;
}

.text-link {
    color: var(--accent);
    font-weight: 700;
}

.category-grid,
.category-wide-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.category-tile,
.category-card-wide {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.82));
    box-shadow: var(--shadow);
}

.category-tile {
    min-height: 128px;
    padding: 18px;
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 800;
}

.category-tile em,
.category-card-wide p {
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(30, 41, 59, 0.86);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    background:
        radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.92));
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.92);
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.86);
    color: #fde68a;
    font-weight: 900;
}

.card-body {
    padding: 15px;
}

.card-meta {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.card-body h2 {
    display: -webkit-box;
    min-height: 54px;
    margin: 7px 0;
    overflow: hidden;
    font-size: 19px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row span {
    border-color: rgba(148, 163, 184, 0.20);
    background: rgba(15, 23, 42, 0.62);
    color: #cbd5e1;
}

.rank-panel {
    position: sticky;
    top: 88px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    padding: 10px;
    background: rgba(30, 41, 59, 0.52);
}

.rank-row strong {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: #fde68a;
}

.rank-row span {
    font-weight: 800;
}

.rank-row em {
    grid-column: 2;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-main {
    padding: 88px 0 0;
}

.page-title {
    padding: 42px 0 16px;
}

.page-title p {
    max-width: 760px;
    color: var(--muted-strong);
}

.page-grid {
    margin-top: 24px;
}

.category-wide-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 22px;
}

.category-card-wide {
    padding: 24px;
}

.category-card-wide h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

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

.mini-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--muted-strong);
    font-size: 13px;
}

.filter-panel,
.search-box-large form {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.filter-panel input,
.filter-panel select,
.search-box-large input {
    min-height: 48px;
    padding: 0 14px;
}

.filter-panel input,
.search-box-large input {
    flex: 1;
}

.detail-main {
    background: var(--bg);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 120px 0 70px;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.36;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78)),
        linear-gradient(0deg, #020617, transparent 60%);
}

.detail-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--muted);
}

.breadcrumb a {
    color: #fde68a;
}

.detail-one-line {
    max-width: 820px;
    color: #dbeafe;
    font-size: 19px;
}

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

.player-section,
.prose-section {
    margin-top: 42px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(251, 191, 36, 0.16), rgba(2, 6, 23, 0.62)),
        rgba(2, 6, 23, 0.45);
    cursor: pointer;
}

.player-cover span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--accent);
    color: #111827;
    font-size: 28px;
    font-weight: 900;
}

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

.video-shell.playing .player-cover {
    display: none;
}

.prose-section {
    display: grid;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    background: rgba(15, 23, 42, 0.72);
}

.prose-section p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 16px;
}

.search-box-large {
    margin-top: 16px;
}

.site-footer {
    margin-top: 78px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.88);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 40px;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 900;
}

.site-footer p {
    margin: 0;
    color: var(--muted);
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-copy {
    border-top: 1px solid var(--line);
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

.hidden-card {
    display: none;
}

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

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

    .split-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .nav-wrap {
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .site-nav,
    .nav-search {
        display: none;
        width: 100%;
    }

    .site-nav.open,
    .nav-search.open {
        display: flex;
    }

    .site-nav.open {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .nav-cats {
        flex-wrap: wrap;
        padding-left: 0;
        border-left: 0;
    }

    .nav-search input {
        width: 100%;
        flex: 1;
    }

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

    .hero-content {
        padding-top: 120px;
    }

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

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

    .detail-poster {
        width: min(260px, 70vw);
    }
}

@media (max-width: 520px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .section-head,
    .filter-panel,
    .search-box-large form {
        flex-direction: column;
        align-items: stretch;
    }

    .hero h1,
    .page-title h1,
    .detail-info h1 {
        font-size: 34px;
    }
}
