:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --muted: #94a3b8;
    --text: #f1f5f9;
    --soft: #cbd5e1;
    --line: rgba(51, 65, 85, 0.58);
    --accent: #fbbf24;
    --accent-soft: rgba(251, 191, 36, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(51, 65, 85, 0.42), transparent 28rem), linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 72%);
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.82);
    border-bottom: 1px solid rgba(30, 41, 59, 0.72);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1200px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: var(--accent);
    background: linear-gradient(135deg, #334155, #111827);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong {
    font-size: 19px;
    letter-spacing: -0.03em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--soft);
    font-size: 14px;
    font-weight: 600;
}

.desktop-nav a,
.mobile-menu a,
.footer-links a,
.text-link {
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover,
.footer-links a:hover,
.text-link:hover {
    color: var(--text);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.84);
}

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

.mobile-menu {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.92);
}

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

.mobile-menu a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--soft);
    background: rgba(30, 41, 59, 0.46);
}

main {
    padding-top: 68px;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    border-bottom: 1px solid rgba(51, 65, 85, 0.45);
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.82) brightness(0.42);
    transform: scale(1.04);
}

.hero-layer,
.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.46) 100%), linear-gradient(to top, #020617 0%, transparent 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 54px;
    align-items: center;
    width: min(1200px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    padding: 74px 0 96px;
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.sub-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-desc,
.lead,
.sub-hero p {
    max-width: 740px;
    margin: 22px 0 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    line-height: 1.2;
}

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

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    color: #111827;
    background: var(--text);
}

.ghost-btn {
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.62);
}

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

.hero-poster {
    display: block;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.68);
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.34);
}

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

.page-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 76px;
}

.search-panel,
.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    margin-bottom: 42px;
    padding: 16px;
    border: 1px solid rgba(51, 65, 85, 0.62);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.filter-panel {
    grid-template-columns: minmax(0, 1fr) 170px 170px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.5);
}

.search-box span {
    color: var(--accent);
    font-size: 20px;
}

.search-box input,
select {
    width: 100%;
    min-height: 48px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

select {
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.72);
}

.section-block {
    margin-top: 64px;
}

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

.section-head h2,
.site-footer h2,
.player-section h2,
.detail-content h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.section-head a,
.text-link {
    color: var(--accent);
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.68);
    border-radius: 24px;
    background: #0f172a;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.06);
}

.category-tile span {
    position: absolute;
    inset: auto 18px 18px 18px;
}

.category-tile strong,
.category-tile em {
    display: block;
}

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

.category-tile em {
    margin-top: 8px;
    color: var(--soft);
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.68);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.64);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(148, 163, 184, 0.34);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.32);
    transform: translateY(-4px);
}

.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-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 9px;
    border: 1px solid rgba(251, 191, 36, 0.24);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(2, 6, 23, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-meta {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
}

.card-body h3 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.35;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 10px 0 14px;
    overflow: hidden;
    color: var(--soft);
    font-size: 13px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card.compact .card-body h3 {
    font-size: 15px;
}

.movie-card.compact .card-desc {
    display: none;
}

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

.rank-list.tall {
    grid-template-columns: 1fr;
    align-content: start;
}

.rank-item {
    display: grid;
    grid-template-columns: 42px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(51, 65, 85, 0.62);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
}

.rank-no {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 900;
}

.rank-item img {
    width: 54px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-item strong,
.rank-item em {
    display: block;
}

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

.rank-item em {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.sub-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 72px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.45);
    background: radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.12), transparent 28rem), linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.sub-hero > div {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.68);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.68);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: rgba(51, 65, 85, 0.72);
}

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

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

.category-card h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.category-card p {
    margin: 0 0 16px;
    color: var(--soft);
    line-height: 1.8;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid rgba(51, 65, 85, 0.45);
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 76px;
}

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

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

.breadcrumb em {
    color: var(--text);
    font-style: normal;
}

.detail-top {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
}

.detail-poster {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 26px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.detail-copy .tag-row {
    margin: 22px 0 28px;
}

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

.player-section {
    padding: 22px;
    border: 1px solid rgba(51, 65, 85, 0.68);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.player-section h2 {
    margin-bottom: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--text);
    background: linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.08));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    color: #111827;
    background: rgba(241, 245, 249, 0.92);
    font-size: 32px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.42);
}

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

.detail-content article,
.info-grid {
    padding: 24px;
    border: 1px solid rgba(51, 65, 85, 0.68);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.64);
}

.detail-content article p {
    margin: 16px 0 0;
    color: var(--soft);
    line-height: 1.9;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    grid-column: 1 / -1;
}

.info-grid p {
    margin: 0;
    padding: 16px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.42);
}

.info-grid strong,
.info-grid span {
    display: block;
}

.info-grid strong {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

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

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

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 18px;
    border: 1px solid rgba(51, 65, 85, 0.68);
    border-radius: 18px;
    color: var(--soft);
    text-align: center;
    background: rgba(15, 23, 42, 0.62);
}

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

.site-footer {
    border-top: 1px solid rgba(51, 65, 85, 0.58);
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 38px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 36px;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 8px 12px;
    border: 1px solid rgba(51, 65, 85, 0.68);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.52);
}

.copyright {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 34px;
    border-top: 1px solid rgba(51, 65, 85, 0.45);
    text-align: center;
}

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-content,
    .detail-top,
    .ranking-columns,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        max-width: 280px;
    }

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

    .category-overview,
    .rank-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        height: 62px;
    }

    main {
        padding-top: 62px;
    }

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

    .hero,
    .hero-content {
        min-height: 760px;
    }

    .hero-content {
        display: flex;
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 28px;
        padding: 46px 0 96px;
    }

    .hero h1,
    .sub-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero-desc,
    .lead,
    .sub-hero p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .card-body {
        padding: 13px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-inner {
        padding-top: 28px;
    }

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

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    .category-grid,
    .movie-grid,
    .compact-grid,
    .rank-card-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-poster,
    .detail-poster {
        max-width: 220px;
    }
}
