:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --danger: #ef4444;
    --shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

html {
    scroll-behavior: smooth;
}

body.site-body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 26%),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

img {
    display: block;
}

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

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--amber), #ef4444);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.25);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link,
.mobile-link {
    color: var(--muted-2);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 9px 15px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--text);
    background: rgba(245, 158, 11, 0.16);
}

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

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

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

.mobile-link {
    padding: 12px 14px;
}

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

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-bg-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 68% 34%, rgba(245, 158, 11, 0.28), transparent 28%),
        radial-gradient(circle at 15% 72%, rgba(14, 165, 233, 0.16), transparent 28%);
}

.hero-stage {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    align-items: center;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 46px;
    padding: 70px 0;
}

.hero-slide.active {
    display: grid;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 13px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 999px;
    color: var(--amber-light);
    background: rgba(245, 158, 11, 0.1);
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero h1 span {
    display: block;
    color: var(--amber-light);
}

.hero-desc {
    max-width: 690px;
    margin: 22px 0 0;
    color: var(--muted-2);
    font-size: 18px;
    line-height: 1.75;
}

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

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

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    box-shadow: 0 16px 38px rgba(245, 158, 11, 0.24);
}

.btn-secondary,
.btn-ghost {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-tags a,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: var(--muted-2);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.58);
}

.hero-tags a {
    min-height: 34px;
    padding: 0 13px;
    font-size: 13px;
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.5);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.88));
}

.hero-poster-info {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
}

.hero-poster-info strong {
    display: block;
    font-size: 24px;
    line-height: 1.2;
}

.hero-poster-info small {
    color: var(--muted-2);
}

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

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

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

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

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

.section-title h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-title p,
.page-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(15, 23, 42, 0.96);
}

.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.45s ease;
}

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

.year-badge,
.play-badge,
.detail-year {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text);
    backdrop-filter: blur(10px);
}

.year-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.play-badge {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: var(--amber-light);
}

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

.movie-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 850;
}

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

.movie-meta,
.movie-line,
.rank-meta {
    color: var(--muted);
}

.movie-meta {
    margin: 8px 0 0;
    font-size: 12px;
}

.movie-line {
    margin: 9px 0 0;
    min-height: 42px;
    font-size: 13px;
    line-height: 1.6;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

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

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

.category-card {
    min-height: 170px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.12), transparent 48%),
        rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.38);
}

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

.category-card p {
    color: var(--muted);
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(150px, 0.6fr));
    gap: 12px;
    margin: 24px 0 26px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.55);
}

.empty-state {
    display: none;
    padding: 38px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
}

.empty-state.show {
    display: block;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 70px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 12px;
    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;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.38);
}

.rank-num {
    color: var(--amber-light);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 70px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.rank-title {
    min-width: 0;
    font-weight: 800;
}

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

.page-title {
    max-width: 800px;
}

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

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
    padding: 34px 0 60px;
}

.player-card,
.detail-side,
.content-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
}

.player-card {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    background: #000;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5));
    cursor: pointer;
}

.play-layer.hidden-player {
    display: none;
}

.big-play {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #111827;
    background: var(--amber-light);
    font-size: 28px;
    box-shadow: 0 22px 48px rgba(245, 158, 11, 0.25);
}

.player-info,
.content-card {
    padding: 24px;
}

.player-info h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.detail-lead {
    margin: 16px 0 0;
    color: var(--muted-2);
    font-size: 17px;
    line-height: 1.8;
}

.detail-side {
    overflow: hidden;
}

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

.detail-side-body {
    padding: 20px;
}

.detail-side dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.detail-side div {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    color: var(--text);
}

.content-card {
    margin-top: 22px;
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 850;
}

.content-card p {
    color: var(--muted-2);
    line-height: 1.9;
    white-space: pre-line;
}

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

.compact-card .movie-line {
    min-height: auto;
}

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

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

.footer-inner p {
    max-width: 520px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    justify-content: flex-end;
    gap: 10px;
    max-width: 420px;
}

.footer-links a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-2);
}

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero,
    .hero-stage {
        min-height: auto;
    }

    .hero-slide,
    .hero-slide.active {
        display: grid;
        grid-template-columns: 1fr;
        padding: 42px 0 78px;
        gap: 28px;
    }

    .hero-poster-card {
        max-width: 340px;
        margin: 0 auto;
    }

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

    .movie-grid,
    .category-grid,
    .rank-layout,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .rank-item {
        grid-template-columns: 42px 58px minmax(0, 1fr);
    }

    .rank-meta {
        display: none;
    }

    .detail-side {
        display: block;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .category-grid,
    .rank-layout,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero-actions {
        display: grid;
    }

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