:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #fbbf24;
    --orange: #f97316;
    --red: #ef4444;
    --cyan: #06b6d4;
    --radius: 18px;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.16), transparent 34rem),
        radial-gradient(circle at 90% 20%, rgba(249, 115, 22, 0.10), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(251, 191, 36, 0.16);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #020617;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 14px 30px rgba(251, 191, 36, 0.22);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(135deg, #fde68a, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted-strong);
    font-weight: 650;
    font-size: 15px;
}

.nav-link {
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--amber);
}

.mobile-menu-toggle {
    display: none;
    border: 0;
    color: var(--muted-strong);
    background: transparent;
    font-size: 26px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 18px;
    border-top: 1px solid rgba(251, 191, 36, 0.14);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
}

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

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.26) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 38%, rgba(2, 6, 23, 0.30) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 116px;
}

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

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

.hero-kicker span,
.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fed7aa;
    border: 1px solid rgba(251, 191, 36, 0.20);
    background: rgba(251, 191, 36, 0.08);
    font-size: 13px;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 670px;
    margin: 0 0 22px;
    color: var(--muted-strong);
    font-size: 19px;
}

.hero-actions,
.page-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 13px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.primary-button {
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 38px rgba(251, 191, 36, 0.23);
}

.ghost-button {
    color: var(--muted-strong);
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow: 0 20px 46px rgba(251, 191, 36, 0.16);
}

.small-button {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    z-index: 5;
    display: flex;
    width: min(410px, calc(100% - 32px));
    padding: 8px;
    border: 1px solid rgba(251, 191, 36, 0.20);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(16px);
}

.hero-search input,
.search-panel input,
.search-panel select,
.page-tools input {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 13px;
    color: var(--text);
    outline: none;
    background: rgba(2, 6, 23, 0.64);
    padding: 0 14px;
}

.hero-search button {
    min-width: 78px;
    margin-left: 8px;
    border: 0;
    border-radius: 12px;
    color: #111827;
    font-weight: 850;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.section-block {
    padding: 72px 0 12px;
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading span,
.page-hero span,
.panel-title span {
    color: var(--amber);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
}

.section-heading h2,
.panel-title h2 {
    margin: 8px 0 8px;
    color: var(--text);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.15;
}

.section-heading p,
.page-hero p,
.category-card p,
.category-overview-card p,
.site-footer p {
    margin: 0;
    color: var(--muted);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.50);
    box-shadow: 0 28px 60px rgba(251, 191, 36, 0.12);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #111827;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .movie-cover img,
.category-card:hover img,
.category-overview-card a:hover img {
    transform: scale(1.07);
}

.cover-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 30px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
    font-size: 13px;
}

.movie-info {
    padding: 14px;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text);
    font-weight: 850;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.25s ease;
}

.movie-title:hover {
    color: var(--amber);
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 45px;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    color: #cbd5e1;
    font-size: 13px;
    gap: 10px;
}

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

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 170px 1fr;
    min-height: 178px;
}

.wide-cover {
    aspect-ratio: auto;
    height: 100%;
}

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

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

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

.category-card,
.category-overview-card,
.ranking-panel,
.story-card,
.detail-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
}

.category-card {
    overflow: hidden;
    padding: 16px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.42);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.category-covers img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.35s ease;
}

.category-card h3,
.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.category-card span {
    display: inline-flex;
    margin-top: 16px;
    color: var(--amber);
    font-weight: 800;
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 18px;
}

.panel-title {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 4px 16px;
    margin-bottom: 18px;
}

.panel-title span {
    grid-column: 1 / 3;
}

.panel-title h2 {
    margin: 0;
    font-size: 26px;
}

.panel-title a {
    color: var(--amber);
    font-weight: 800;
}

.ranking-row {
    display: grid;
    grid-template-columns: 46px 56px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
}

.ranking-row:first-of-type {
    border-top: 0;
}

.ranking-number {
    color: var(--amber);
    font-weight: 950;
    font-size: 18px;
}

.ranking-row img {
    width: 56px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
}

.ranking-title {
    display: -webkit-box;
    overflow: hidden;
    font-weight: 800;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-meta {
    grid-column: 3;
    color: var(--muted);
    font-size: 13px;
}

.standalone-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.standalone-title span {
    display: none;
}

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

.large-row {
    grid-template-columns: 58px 66px 1fr;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.50);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 68px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.14);
    background:
        radial-gradient(circle at 15% 10%, rgba(251, 191, 36, 0.18), transparent 26rem),
        linear-gradient(135deg, rgba(251, 191, 36, 0.10), rgba(249, 115, 22, 0.08));
}

.compact-page-hero {
    padding: 74px 0 58px;
}

.page-hero h1 {
    max-width: 820px;
    margin: 10px 0;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 760px;
    font-size: 18px;
}

.page-tools input {
    max-width: 520px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-top: 28px;
    max-width: 920px;
}

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

.overview-head {
    margin-bottom: 18px;
}

.overview-movies {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.overview-movies a {
    overflow: hidden;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
}

.overview-movies img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.overview-movies span {
    display: -webkit-box;
    overflow: hidden;
    padding: 8px;
    color: var(--muted-strong);
    font-size: 13px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 52px 0;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(14px) saturate(1.1);
    transform: scale(1.08);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.40), #020617 88%);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 26px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #111827;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.12), rgba(2, 6, 23, 0.52));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    padding-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 22px 50px rgba(251, 191, 36, 0.26);
    font-size: 34px;
}

.detail-card {
    overflow: hidden;
}

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

.detail-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px;
}

.detail-meta-grid span {
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--muted-strong);
    background: rgba(2, 6, 23, 0.42);
}

.detail-content {
    padding-top: 34px;
}

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

.breadcrumb a {
    color: #fed7aa;
}

.detail-title-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin: 24px 0 18px;
}

.detail-title-row h1 {
    margin: 0 0 10px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

.detail-title-row p {
    margin: 0;
    max-width: 850px;
    color: var(--muted-strong);
    font-size: 18px;
}

.detail-tags {
    margin-bottom: 24px;
}

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

.story-card {
    padding: 24px;
}

.story-card h2 {
    margin: 0 0 12px;
    color: var(--amber);
    font-size: 24px;
}

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

.site-footer {
    margin-top: 74px;
    border-top: 1px solid rgba(251, 191, 36, 0.15);
    background: rgba(2, 6, 23, 0.75);
}

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

.footer-brand {
    margin-bottom: 16px;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

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

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

.footer-bottom {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

    .mobile-menu-toggle {
        display: block;
    }

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

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

    .ranking-panel {
        position: relative;
        top: auto;
    }

    .detail-card {
        display: none;
    }

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        min-height: 64px;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        padding: 0 0 130px;
        align-items: flex-end;
    }

    .hero h1 {
        font-size: clamp(36px, 11vw, 52px);
    }

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

    .hero-control {
        display: none;
    }

    .hero-search {
        left: 12px;
        right: 12px;
        bottom: 58px;
        width: auto;
    }

    .hero-dots {
        bottom: 24px;
    }

    .section-block {
        padding-top: 52px;
    }

    .movie-grid,
    .compact-grid,
    .wide-list,
    .category-grid,
    .category-overview-grid,
    .ranking-list,
    .detail-columns,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .movie-card-wide {
        grid-template-columns: 120px 1fr;
        min-height: 150px;
    }

    .movie-card-wide .tag-row {
        display: none;
    }

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

    .page-hero {
        padding: 62px 0 42px;
    }

    .detail-hero {
        padding: 22px 0;
    }

    .player-shell,
    .movie-video {
        min-height: 240px;
    }

    .detail-title-row {
        display: block;
    }

    .detail-title-row .primary-button {
        margin-top: 18px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .compact-grid {
        gap: 14px;
    }

    .movie-info {
        padding: 12px;
    }

    .movie-desc,
    .tag-row {
        display: none;
    }

    .mobile-nav.is-open {
        grid-template-columns: 1fr;
    }
}
