:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --amber: #fbbf24;
    --amber-strong: #f59e0b;
    --rose: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(251, 191, 36, 0.16), transparent 30%),
        radial-gradient(circle at 86% 12%, rgba(59, 130, 246, 0.12), transparent 32%),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark,
.footer-logo span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.25);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 10px;
    color: #cbd5e1;
    font-size: 15px;
}

.desktop-nav a,
.mobile-panel a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: var(--amber);
}

.header-search {
    margin-left: auto;
    width: 286px;
    position: relative;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.26);
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    height: 40px;
    padding: 0 44px 0 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.08);
}

.header-search button {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    color: var(--amber);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--text);
    background: transparent;
    font-size: 26px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-search {
    display: flex;
    gap: 10px;
}

.mobile-search input {
    height: 42px;
    padding: 0 14px;
}

.mobile-search button,
.big-search button,
.filter-panel button {
    border: 0;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    font-weight: 800;
    padding: 0 18px;
    cursor: pointer;
}

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

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 900ms ease;
    background:
        radial-gradient(circle at 70% 30%, rgba(251, 191, 36, 0.2), transparent 36%),
        linear-gradient(135deg, #0f172a, #020617);
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.66) 42%, rgba(2, 6, 23, 0.1) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.54) 36%, transparent 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 72px;
    width: min(720px, calc(100% - 64px));
}

.hero-labels,
.detail-meta-line,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-labels span,
.detail-meta-line span,
.hero-labels strong,
.detail-meta-line strong,
.eyebrow {
    color: #111827;
    background: rgba(251, 191, 36, 0.94);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 900;
}

.detail-meta-line span {
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    text-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.hero-content p {
    max-width: 760px;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.75;
    margin: 0;
}

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

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

.hero-tags span,
.tag-row span {
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.08);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.inline-link,
.section-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 900;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #111827;
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.25);
}

.ghost-btn,
.inline-link,
.section-head a {
    color: #f8fafc;
    border: 1px solid rgba(248, 250, 252, 0.18);
    background: rgba(15, 23, 42, 0.55);
}

.primary-btn:hover,
.ghost-btn:hover,
.inline-link:hover,
.section-head a:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.7);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 1px solid rgba(248, 250, 252, 0.16);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(14px);
    font-size: 34px;
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.42);
    cursor: pointer;
}

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

.search-entrance {
    margin-top: -38px;
    position: relative;
    z-index: 5;
}

.big-search {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.big-search input {
    height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.82);
}

.big-search button {
    min-width: 120px;
}

.category-chip-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 22px;
}

.category-chip,
.category-overview-card,
.detail-card,
.side-card,
.ranking-panel,
.filter-panel {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.category-chip {
    padding: 18px;
    min-height: 112px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-chip:hover,
.movie-card:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(15, 23, 42, 0.96);
}

.category-chip strong {
    display: block;
    color: #fde68a;
    margin-bottom: 8px;
    font-size: 18px;
}

.category-chip span,
.section-head p,
.movie-info p,
.category-overview-text p,
.page-hero p,
.detail-card p,
.site-footer p,
.search-summary {
    color: var(--muted);
    line-height: 1.72;
}

section.container,
.home-category-block {
    margin-top: 64px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    display: block;
    background:
        linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(30, 41, 59, 0.98)),
        radial-gradient(circle at 80% 20%, rgba(248, 113, 113, 0.2), transparent 36%);
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 36%, rgba(2, 6, 23, 0.88) 100%);
}

.poster-title {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    color: #fff;
    font-weight: 900;
    line-height: 1.35;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #111827;
    background: var(--amber);
    border-radius: 999px;
    font-size: 13px;
}

.movie-info {
    padding: 14px;
}

.movie-meta {
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-info h3 {
    min-height: 48px;
    margin: 9px 0;
    font-size: 16px;
    line-height: 1.48;
}

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

.movie-info p {
    min-height: 66px;
    margin: 0 0 12px;
    font-size: 13px;
}

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

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

.ranking-panel {
    padding: 22px;
}

.compact-head {
    margin-bottom: 16px;
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.32);
}

.ranking-row:hover {
    border-color: rgba(251, 191, 36, 0.5);
}

.ranking-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #111827;
    background: #fbbf24;
    border-radius: 12px;
    font-weight: 900;
    font-size: 13px;
}

.ranking-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.ranking-kind {
    grid-column: 2 / 3;
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-score {
    grid-column: 3;
    grid-row: 1 / span 2;
    color: var(--amber);
    font-weight: 900;
}

.page-hero {
    padding: 80px 0 24px;
}

.page-hero .eyebrow {
    display: inline-flex;
    margin: 0 0 16px;
}

.page-hero h1 {
    max-width: 880px;
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

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

.category-overview-list {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 24px;
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-text h2 {
    margin: 10px 0;
    font-size: 32px;
}

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

.compact-card .movie-info p,
.compact-card .tag-row {
    display: none;
}

.compact-card .movie-info h3 {
    min-height: auto;
    font-size: 14px;
}

.category-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
}

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

.ranking-page-list {
    padding-bottom: 36px;
}

.wide-ranking .ranking-row {
    grid-template-columns: 52px minmax(0, 1fr) 140px;
}

.filter-panel {
    padding: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 14px;
}

.filter-grid label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

.filter-grid input,
.filter-grid select {
    height: 46px;
    padding: 0 14px;
    border-radius: 16px;
}

.search-summary {
    margin-top: 14px;
}

.detail-hero {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.18), transparent 36%),
        linear-gradient(135deg, #0f172a, #020617);
}

.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    filter: blur(1px) saturate(1.08);
}

.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.55)),
        linear-gradient(0deg, #020617 0%, transparent 60%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 58px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #cbd5e1;
    margin-bottom: 28px;
    font-size: 14px;
}

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

.detail-hero h1 {
    max-width: 880px;
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-hero p {
    max-width: 820px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.75;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    margin-top: 34px;
}

.player-section,
.detail-card,
.side-card {
    margin-bottom: 24px;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle, rgba(251, 191, 36, 0.18), rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.88) 100%);
    cursor: pointer;
}

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

.play-circle {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    border-radius: 999px;
    font-size: 30px;
    box-shadow: 0 18px 50px rgba(251, 191, 36, 0.3);
}

.detail-card,
.side-card {
    padding: 24px;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 25px;
}

.detail-card p {
    margin: 0;
    font-size: 17px;
}

.info-table dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-table div {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.info-table dt {
    color: #fcd34d;
    font-weight: 800;
}

.info-table dd {
    margin: 0;
    color: #cbd5e1;
}

.info-table a:hover {
    color: var(--amber);
}

.side-recommend-grid {
    display: grid;
    gap: 14px;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 30px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #fde68a;
    margin-bottom: 12px;
}

.site-footer h3 {
    margin: 0 0 14px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 9px;
    color: #cbd5e1;
}

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 600px;
        height: 82vh;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 72px;
        width: auto;
    }

    .hero-arrow {
        display: none;
    }

    .category-chip-row,
    .filter-grid,
    .footer-inner,
    .two-column-section,
    .detail-layout,
    .category-layout,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }
}

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

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

    .hero-content h1,
    .detail-hero h1,
    .page-hero h1 {
        letter-spacing: -0.03em;
    }

    .big-search {
        border-radius: 24px;
        flex-direction: column;
    }

    .big-search button {
        height: 48px;
    }

    .category-chip-row,
    .movie-grid,
    .small-grid,
    .category-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-info {
        padding: 12px;
    }

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

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

    .ranking-row {
        grid-template-columns: 38px minmax(0, 1fr) 48px;
    }

    .detail-hero {
        min-height: 420px;
    }

    .detail-hero-inner {
        padding: 36px 0 52px;
    }

    .info-table div {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}
