:root {
    --bg: #0a0e1a;
    --bg-soft: #111827;
    --card: rgba(255, 255, 255, .07);
    --card-strong: rgba(255, 255, 255, .12);
    --line: rgba(245, 158, 11, .23);
    --line-soft: rgba(255, 255, 255, .11);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted-2: #94a3b8;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --orange: #f97316;
    --shadow: 0 24px 70px rgba(0, 0, 0, .42);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(245, 158, 11, .18), transparent 32rem),
        radial-gradient(circle at 90% 12%, rgba(249, 115, 22, .16), transparent 34rem),
        linear-gradient(180deg, #0a0e1a 0%, #111827 46%, #0a0e1a 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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: rgba(10, 14, 26, .78);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #111827;
    box-shadow: 0 10px 30px rgba(245, 158, 11, .35);
}

.brand-name {
    font-size: 22px;
    letter-spacing: .03em;
    background: linear-gradient(90deg, var(--amber-light), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #e5e7eb;
}

.site-nav a,
.nav-dropdown > button {
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    transition: color .2s ease;
}

.site-nav a:hover,
.nav-dropdown > button:hover {
    color: var(--amber-light);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    top: 34px;
    right: 0;
    width: 180px;
    display: grid;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: rgba(17, 24, 39, .96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    padding: 8px 10px;
    border-radius: 10px;
}

.nav-dropdown-panel a:hover {
    background: rgba(255, 255, 255, .08);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: var(--card);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-track,
.hero-slide,
.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity .8s ease;
}

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

.hero-bg {
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 14, 26, .08), rgba(10, 14, 26, .92)),
        radial-gradient(circle at 78% 55%, rgba(245, 158, 11, .16), transparent 22rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 54px;
    padding: 70px 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--amber-light);
    background: rgba(245, 158, 11, .10);
}

.hero h1 {
    margin: 0;
    max-width: 850px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -.05em;
    text-shadow: 0 5px 28px rgba(0, 0, 0, .55);
}

.hero h2 {
    margin: 14px 0 10px;
    font-size: clamp(24px, 3vw, 42px);
    color: var(--amber-light);
}

.hero p {
    max-width: 760px;
    margin: 0;
    color: #e2e8f0;
    font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    padding: 7px 11px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: #fef3c7;
    background: rgba(255, 255, 255, .08);
}

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

.primary-btn,
.ghost-btn,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.primary-btn {
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    box-shadow: 0 16px 34px rgba(245, 158, 11, .28);
}

.ghost-btn,
.section-link {
    border: 1px solid var(--line-soft);
    color: var(--text);
    background: rgba(255, 255, 255, .08);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .24);
}

.hero-mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    color: var(--muted);
}

.hero-mini-links a {
    color: var(--amber-light);
}

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, .08);
    box-shadow: var(--shadow);
}

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

.hero-poster span {
    display: block;
    padding: 18px;
    font-size: 20px;
    font-weight: 900;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .32);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--amber-light), var(--orange));
}

.page-main,
.detail-main,
.content-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

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

.intro-search,
.filter-panel,
.category-overview-card,
.story-card,
.player-section,
.rank-panel,
.archive-directory {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: 0 18px 52px rgba(0, 0, 0, .18);
    backdrop-filter: blur(16px);
}

.intro-search {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 460px);
    gap: 24px;
    align-items: center;
    margin-top: 48px;
    padding: 26px;
}

.intro-copy h2,
.section-head h2,
.page-hero h1,
.player-section h2,
.story-card h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.2;
}

.intro-copy p,
.section-head p,
.page-hero p,
.story-card p,
.detail-subtitle,
.card-summary {
    margin: 0;
    color: var(--muted);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(245, 158, 11, .52);
    box-shadow: 0 26px 64px rgba(0, 0, 0, .34);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(255, 255, 255, .05);
}

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

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

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

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    color: #111827;
    background: var(--amber-light);
}

.movie-card-body {
    padding: 16px;
}

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

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

.meta-line {
    margin: 0 0 8px;
    color: var(--muted-2);
    font-size: 14px;
}

.card-summary {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 14px;
}

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

.tag-row span {
    padding: 4px 8px;
    font-size: 12px;
}

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

.category-tile {
    min-height: 158px;
    padding: 20px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(245, 158, 11, .16), rgba(255, 255, 255, .06));
    transition: transform .2s ease, border-color .2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, .58);
}

.category-tile strong {
    display: block;
    font-size: 22px;
}

.category-tile span {
    display: block;
    margin: 4px 0 12px;
    color: var(--amber-light);
}

.category-tile p {
    margin: 0;
    color: var(--muted);
}

.hot-board {
    width: min(980px, calc(100% - 32px));
}

.rank-panel {
    padding: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 15px;
    transition: background .2s ease;
}

.rank-row:hover {
    background: rgba(255, 255, 255, .08);
}

.rank-row span {
    color: var(--amber-light);
    font-weight: 900;
}

.rank-row em {
    color: var(--muted-2);
    font-style: normal;
}

.page-hero {
    margin: 44px 0 0;
    padding: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, .2), transparent 24rem),
        linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
    box-shadow: var(--shadow);
}

.slim-hero {
    max-width: 980px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    padding: 14px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    outline: none;
    padding: 0 14px;
    color: var(--text);
    background: rgba(10, 14, 26, .64);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, .7);
}

.overview-stack {
    display: grid;
    gap: 24px;
    margin: 36px 0 64px;
}

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

.category-overview-head {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.category-overview-head h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

.category-overview-head p {
    margin: 0;
    color: var(--muted);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 34px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 100% 20%, rgba(245, 158, 11, .18), transparent 26rem),
        rgba(255, 255, 255, .07);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, .06);
}

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

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

.breadcrumb a {
    color: var(--amber-light);
}

.detail-info h1 {
    margin: 0 0 10px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
}

.detail-subtitle {
    font-size: 18px;
}

.detail-meta {
    margin: 20px 0 4px;
}

.big-tags span {
    font-size: 13px;
}

.player-section {
    margin-top: 34px;
    padding: 24px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: 0 18px 58px rgba(0, 0, 0, .45);
}

.player-box video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    object-fit: contain;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #111827;
    background: rgba(0, 0, 0, .18);
    cursor: pointer;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 34px;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    box-shadow: 0 18px 44px rgba(245, 158, 11, .36);
}

.player-start.is-hidden {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 28px;
}

.story-card {
    padding: 24px;
}

.story-card p + p {
    margin-top: 14px;
}

.detail-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.detail-nav a {
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
}

.detail-nav a:hover {
    color: var(--amber-light);
}

.related-section {
    margin-bottom: 64px;
}

.archive-directory {
    padding: 24px;
}

.archive-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.archive-link {
    padding: 10px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
}

.archive-link:hover {
    color: var(--amber-light);
    border-color: rgba(245, 158, 11, .6);
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line-soft);
    background: rgba(10, 14, 26, .72);
}

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.3fr;
    gap: 30px;
}

.footer-grid strong {
    color: var(--amber-light);
    font-size: 20px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-content: flex-start;
}

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

.copyright {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 26px;
    color: var(--muted-2);
}

.is-filtered-out {
    display: none !important;
}

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

    .hero-content {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 20px;
        border: 1px solid var(--line-soft);
        border-radius: 20px;
        background: rgba(17, 24, 39, .98);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-dropdown-panel {
        position: static;
        width: 100%;
        margin-top: 8px;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, .05);
    }

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        position: relative;
        grid-template-columns: 1fr;
        padding: 58px 0 86px;
    }

    .hero-poster {
        max-width: 320px;
    }

    .intro-search,
    .detail-hero,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .section-head,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

@media (max-width: 560px) {
    .brand-name {
        font-size: 18px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .page-hero,
    .detail-hero,
    .player-section,
    .story-card,
    .intro-search {
        padding: 20px;
    }

    .movie-grid,
    .mini-grid,
    .category-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 38px 1fr;
    }

    .rank-row em {
        grid-column: 2;
    }
}
