:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #f59e0b;
    --accent-strong: #fbbf24;
    --accent-soft: rgba(245, 158, 11, 0.14);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.18), transparent 28rem),
        radial-gradient(circle at 85% 12%, rgba(59, 130, 246, 0.12), transparent 30rem),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

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

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

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

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

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

.nav-link {
    padding: 10px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #111827;
    background: var(--accent-strong);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.92);
    color: var(--text);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
}

.global-search {
    position: relative;
    width: min(280px, 28vw);
}

.global-search-input,
.local-filter-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--text);
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.global-search-input:focus,
.local-filter-input:focus {
    border-color: rgba(251, 191, 36, 0.78);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, 92vw);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.98);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: none;
}

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

.search-result {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.search-result:last-child {
    border-bottom: 0;
}

.search-result img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.86);
}

.search-result strong {
    display: block;
    margin-bottom: 4px;
}

.search-result span {
    color: var(--muted);
    font-size: 13px;
}

main {
    overflow: hidden;
}

.hero-section {
    position: relative;
    min-height: 720px;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slider {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.9s ease;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: center;
    gap: 48px;
    padding: 120px max(32px, calc((100vw - 1180px) / 2)) 96px;
}

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

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-strong);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy h1 {
    max-width: 880px;
    font-size: clamp(34px, 5.2vw, 72px);
}

.hero-copy h2 {
    margin-top: 18px;
    font-size: clamp(24px, 3vw, 42px);
    color: var(--accent-strong);
}

.hero-text {
    max-width: 680px;
    margin: 22px 0 0;
    color: #dbeafe;
    line-height: 1.85;
    font-size: 17px;
}

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

.primary-btn,
.secondary-btn,
.ghost-btn,
.watch-link,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.primary-btn {
    min-height: 46px;
    padding: 0 24px;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: #111827;
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.25);
}

.secondary-btn,
.ghost-btn {
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid rgba(251, 191, 36, 0.38);
    background: rgba(15, 23, 42, 0.72);
    color: #fde68a;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.watch-link:hover,
.text-link:hover {
    transform: translateY(-2px);
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    background: rgba(245, 158, 11, 0.1);
    color: #fde68a;
    padding: 5px 10px;
    font-size: 12px;
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    background: rgba(15, 23, 42, 0.92);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: inherit;
}

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

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

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

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

.section-block {
    padding: 56px 0;
}

.page-main {
    padding-top: 34px;
}

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

.section-heading h2,
.page-hero h1,
.content-card h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.16;
}

.section-heading p:not(.eyebrow),
.page-hero p,
.content-card p,
.category-card p,
.movie-card-body p,
.ranking-info p,
.site-footer p {
    color: var(--muted);
    line-height: 1.76;
}

.row-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
}

.text-link,
.watch-link {
    color: var(--accent-strong);
}

.wide-search {
    max-width: 760px;
}

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

.category-card,
.content-card,
.category-preview,
.page-hero,
.detail-hero,
.watch-section,
.ranking-row {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62));
    border-radius: 28px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.18);
}

.category-card {
    padding: 20px;
}

.category-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 900;
}

.category-card strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

.category-samples {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.category-samples a {
    color: #cbd5e1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.48);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-year,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.poster-year {
    right: 12px;
    color: #111827;
    background: var(--accent-strong);
}

.rank-badge {
    left: 12px;
    color: #fde68a;
    background: rgba(2, 6, 23, 0.78);
}

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

.movie-title,
.ranking-title {
    display: block;
    font-weight: 800;
    line-height: 1.35;
}

.movie-title {
    min-height: 44px;
}

.movie-meta {
    margin: 10px 0;
}

.movie-meta span,
.detail-meta span {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.7);
}

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

.page-hero {
    padding: 42px;
    margin-bottom: 34px;
    position: relative;
    overflow: hidden;
}

.page-hero::before,
.detail-hero::before {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.16);
    filter: blur(48px);
    right: -80px;
    top: -90px;
}

.page-hero > * {
    position: relative;
}

.category-tools {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chips button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.74);
    color: #cbd5e1;
}

.filter-chips button.is-active {
    background: var(--accent-strong);
    color: #111827;
}

.category-preview {
    padding: 28px;
    margin-bottom: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 22px;
    color: #cbd5e1;
}

.breadcrumb a {
    color: var(--accent-strong);
}

.breadcrumb em {
    color: #475569;
    font-style: normal;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    padding: 34px;
    margin-bottom: 32px;
}

.detail-poster-wrap,
.detail-poster {
    border-radius: 26px;
}

.detail-poster-wrap {
    position: relative;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

.detail-copy {
    position: relative;
    align-self: center;
}

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

.detail-one-line {
    margin: 20px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

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

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

.watch-section {
    padding: 28px;
    margin-bottom: 32px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: #111827;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.72));
}

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

.play-symbol {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent-strong);
    color: #111827;
    font-size: 32px;
    box-shadow: 0 20px 54px rgba(245, 158, 11, 0.42);
}

.player-start span:last-child {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--accent-strong);
    font-weight: 900;
}

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

.content-card {
    padding: 28px;
}

.content-card h2 {
    font-size: 28px;
    margin-bottom: 16px;
}

.ranking-list {
    display: grid;
    gap: 14px;
    padding-bottom: 64px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 70px 86px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px 18px;
}

.ranking-number {
    font-size: 30px;
    font-weight: 900;
    color: var(--accent-strong);
}

.ranking-poster img {
    width: 86px;
    height: 116px;
    object-fit: cover;
    border-radius: 16px;
}

.ranking-title {
    font-size: 20px;
    margin-bottom: 8px;
}

.watch-link {
    padding: 10px 14px;
    border: 1px solid rgba(251, 191, 36, 0.34);
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #cbd5e1;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
    border-top: 1px solid var(--line);
}

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

@media (max-width: 1080px) {
    .hero-slide {
        grid-template-columns: 1fr 280px;
    }

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

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

@media (max-width: 820px) {
    .header-inner {
        min-height: 68px;
        gap: 12px;
    }

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

    .site-nav {
        position: fixed;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(2, 6, 23, 0.98);
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
    }

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

    .global-search {
        width: 46vw;
    }

    .hero-section {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 100px 18px 86px;
        align-content: center;
    }

    .hero-poster {
        display: none;
    }

    .row-heading,
    .footer-inner {
        align-items: start;
        flex-direction: column;
    }

    .category-grid,
    .movie-grid,
    .compact-grid,
    .mini-grid,
    .detail-content,
    .detail-hero {
        grid-template-columns: 1fr 1fr;
    }

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

    .ranking-row {
        grid-template-columns: 44px 74px 1fr;
    }

    .ranking-row .watch-link {
        grid-column: 3;
        justify-content: flex-start;
        border: 0;
        padding: 0;
    }
}

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

    .global-search {
        display: none;
    }

    .hero-copy h1 {
        font-size: 34px;
    }

    .section-block,
    .page-main,
    .footer-inner,
    .copyright {
        width: min(100% - 24px, 1180px);
    }

    .category-grid,
    .movie-grid,
    .compact-grid,
    .mini-grid,
    .detail-content,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .watch-section,
    .content-card,
    .category-preview {
        padding: 22px;
        border-radius: 22px;
    }

    .ranking-row {
        grid-template-columns: 42px 1fr;
    }

    .ranking-poster {
        display: none;
    }

    .ranking-row .watch-link {
        grid-column: 2;
    }
}
