:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --card: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft-text: #cbd5e1;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --amber-soft: rgba(245, 158, 11, 0.18);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.10), transparent 28rem),
        radial-gradient(circle at 90% 0%, rgba(56, 189, 248, 0.08), transparent 26rem),
        var(--bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

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

.brand-text {
    font-size: 20px;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
}

.nav-search,
.primary-button,
.ghost-button,
.text-button,
.panel-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-search,
.primary-button {
    color: #111827;
    background: var(--amber);
}

.nav-search {
    padding: 10px 16px;
}

.primary-button,
.ghost-button {
    min-height: 48px;
    padding: 0 26px;
}

.primary-button:hover,
.nav-search:hover {
    background: #fbbf24;
    transform: translateY(-1px);
}

.ghost-button {
    border: 1px solid rgba(248, 250, 252, 0.20);
    color: var(--text);
    background: rgba(15, 23, 42, 0.52);
}

.ghost-button:hover {
    border-color: rgba(245, 158, 11, 0.72);
    color: #fcd34d;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
}

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

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 18px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    background-position: center;
    background-size: cover;
    transition: opacity 1s ease, visibility 1s ease, transform 5s ease;
    transform: scale(1.02);
}

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

.hero-shade,
.page-hero-overlay,
.detail-bg::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.20) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    padding: 120px 0 90px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: end;
    gap: 48px;
}

.hero-label,
.section-kicker,
.wide-kicker,
.category-card-body span,
.rank-head span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 999px;
    color: #fcd34d;
    background: var(--amber-soft);
    font-size: 13px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--soft-text);
    font-size: 18px;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--soft-text);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    font-size: 14px;
}

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

.hero-poster {
    position: relative;
    align-self: center;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.hero-dot {
    width: 32px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
    background: var(--amber);
}

.content-section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.dark-band {
    width: 100%;
    max-width: none;
    padding: 72px max(16px, calc((100vw - 1280px) / 2));
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.30));
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.section-head p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
}

.section-more,
.text-button,
.panel-link {
    color: #fcd34d;
}

.section-more:hover,
.text-button:hover,
.panel-link:hover {
    color: var(--text);
}

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

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

.movie-card {
    min-width: 0;
}

.poster-link,
.poster {
    display: block;
}

.poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #0b1120;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}

.poster img,
.wide-cover img,
.category-card-cover img,
.ranking-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    color: var(--text);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
    transition: opacity 0.25s ease;
}

.poster-mask span {
    padding: 10px 16px;
    border-radius: 999px;
    color: #111827;
    background: var(--amber);
    font-weight: 800;
}

.movie-card:hover .poster img,
.wide-card:hover .wide-cover img,
.category-card:hover .category-card-cover img,
.ranking-item:hover .ranking-cover img {
    transform: scale(1.08);
    filter: saturate(1.08);
}

.movie-card:hover .poster-mask {
    opacity: 1;
}

.movie-info {
    padding-top: 12px;
}

.movie-info h3,
.wide-content h3,
.ranking-content h2,
.category-card-body h2 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.35;
}

.movie-info h3 a:hover,
.wide-content h3 a:hover,
.ranking-content h2 a:hover,
.category-card-body h2 a:hover {
    color: #fcd34d;
}

.movie-meta {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-desc,
.wide-content p,
.ranking-content p,
.story-card p,
.category-card-body p {
    color: var(--soft-text);
}

.movie-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 8px 0 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-list span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    font-size: 12px;
}

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

.wide-card,
.category-card,
.ranking-item,
.story-card,
.rank-panel,
.tool-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.wide-card {
    overflow: hidden;
}

.wide-cover {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.wide-content {
    padding: 18px;
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.rank-head h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.rank-list a:hover {
    background: rgba(245, 158, 11, 0.12);
}

.rank-no,
.rank-badge {
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #111827;
    background: var(--amber);
    font-weight: 900;
}

.rank-no {
    width: 34px;
    height: 34px;
    font-size: 13px;
}

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

.rank-score {
    color: #fcd34d;
    font-weight: 800;
}

.panel-link {
    margin-top: 18px;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 8px;
    overflow: hidden;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-position: center;
    background-size: cover;
    isolation: isolate;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.86));
}

.category-tile span {
    color: #fcd34d;
    font-weight: 800;
}

.category-tile strong {
    font-size: 16px;
    line-height: 1.35;
}

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

.small-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0 34px;
}

.category-hero {
    min-height: 430px;
    display: flex;
    align-items: end;
    background-position: center;
    background-size: cover;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 130px 0 70px;
}

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

.category-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    overflow: hidden;
}

.category-card-cover {
    min-height: 260px;
    overflow: hidden;
}

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

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0;
}

.category-samples a {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--soft-text);
    background: rgba(148, 163, 184, 0.12);
    font-size: 13px;
}

.tool-panel {
    margin-bottom: 30px;
    padding: 22px;
}

.search-field {
    display: grid;
    gap: 10px;
}

.search-field span {
    color: var(--soft-text);
    font-weight: 700;
}

.search-field input {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 15px;
    outline: 0;
    padding: 0 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.70);
}

.search-field input:focus {
    border-color: rgba(245, 158, 11, 0.78);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.filter-chip {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    color: var(--soft-text);
    background: rgba(2, 6, 23, 0.45);
}

.filter-chip:hover,
.filter-chip.active {
    border-color: rgba(245, 158, 11, 0.62);
    color: #111827;
    background: var(--amber);
}

.empty-state {
    display: none;
    margin: 20px 0 0;
    color: var(--muted);
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 20px;
    padding: 16px;
}

.ranking-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
}

.rank-badge {
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
}

.detail-hero {
    min-height: 620px;
    display: flex;
    align-items: end;
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.08);
}

.detail-bg::after {
    content: "";
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 110px 0 70px;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
}

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

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

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

.detail-tags {
    margin-top: 20px;
}

.player-section {
    width: min(1280px, calc(100% - 32px));
    margin: -32px auto 0;
    position: relative;
    z-index: 4;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.68));
}

.play-overlay.is-hidden {
    display: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: var(--amber);
    box-shadow: 0 18px 36px rgba(245, 158, 11, 0.28);
    font-size: 28px;
}

.play-overlay strong {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
}

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

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

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

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
    gap: 28px;
    color: var(--muted);
}

.footer-brand {
    color: var(--text);
    font-size: 20px;
}

.footer-inner p {
    max-width: 560px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--soft-text);
    background: rgba(148, 163, 184, 0.10);
}

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

.is-hidden-card {
    display: none !important;
}

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

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

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

    .rank-panel {
        position: static;
    }
}

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

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

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 98px;
    }

    .hero-poster {
        display: none;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(34px, 12vw, 58px);
    }

    .category-card-grid,
    .category-card,
    .ranking-item,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        padding-top: 92px;
    }

    .detail-poster {
        max-width: 260px;
    }

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

@media (max-width: 620px) {
    .nav-wrap,
    .content-section,
    .small-hero,
    .page-hero-content,
    .detail-layout,
    .player-section,
    .footer-inner {
        width: min(100% - 24px, 1280px);
    }

    .brand-text {
        font-size: 17px;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-content {
        min-height: 76vh;
        padding-bottom: 76px;
    }

    .hero-actions,
    .detail-meta,
    .hero-meta {
        gap: 9px;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

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

    .movie-info h3 {
        font-size: 15px;
    }

    .movie-desc {
        display: none;
    }

    .category-card-cover {
        min-height: 220px;
    }

    .ranking-item {
        gap: 14px;
    }

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