:root {
    --night-950: #080b10;
    --night-900: #0d1117;
    --night-850: #111820;
    --night-800: #161b22;
    --night-700: #21262d;
    --night-600: #30363d;
    --night-300: #c9d1d9;
    --night-200: #e6edf3;
    --night-100: #f0f6fc;
    --moss-700: #3a5937;
    --moss-600: #4d7348;
    --moss-500: #65945f;
    --moss-300: #a8c99f;
    --swamp-900: #121a16;
    --swamp-800: #1a2620;
    --swamp-700: #243329;
    --gold: #e7c873;
    --danger: #d06060;
    --shadow-swamp: 0 4px 20px rgba(45, 64, 51, .3);
    --shadow-deep: 0 24px 60px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--night-900);
    color: var(--night-100);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 17, 23, .95);
    border-bottom: 1px solid var(--swamp-700);
    backdrop-filter: blur(6px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 22px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--moss-300);
    background: linear-gradient(135deg, var(--swamp-800), var(--moss-700));
    box-shadow: var(--shadow-swamp);
    font-weight: 800;
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    color: var(--moss-300);
    font-size: 20px;
    line-height: 1.1;
    white-space: nowrap;
}

.brand-text small {
    color: #8b949e;
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: var(--night-300);
    font-weight: 600;
    transition: color .2s ease, transform .2s ease;
}

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

.nav-link:hover {
    transform: translateY(-1px);
}

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

.mobile-nav {
    display: none;
    padding: 12px 22px 18px;
    border-top: 1px solid var(--swamp-700);
    background: rgba(13, 17, 23, .98);
}

.mobile-nav .nav-link {
    display: block;
    padding: 10px 0;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    max-height: 820px;
    overflow: hidden;
    background: var(--night-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity .8s ease, transform 1.2s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 30%, rgba(101, 148, 95, .24), transparent 34%),
        linear-gradient(to top, var(--night-900) 0%, rgba(13, 17, 23, .84) 38%, rgba(13, 17, 23, .32) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 22px 86px;
    display: flex;
    align-items: flex-end;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 14px;
    border: 1px solid rgba(168, 201, 159, .35);
    border-radius: 999px;
    color: var(--moss-300);
    background: rgba(26, 38, 32, .62);
    backdrop-filter: blur(4px);
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 26px;
    color: var(--night-200);
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

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

.btn-primary {
    color: #fff;
    background: var(--moss-600);
    box-shadow: var(--shadow-swamp);
}

.btn-primary:hover {
    background: var(--moss-500);
}

.btn-ghost {
    color: var(--night-200);
    border: 1px solid var(--swamp-700);
    background: rgba(13, 17, 23, .62);
}

.btn-ghost:hover {
    color: var(--moss-300);
    border-color: var(--moss-700);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    right: 32px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(240, 246, 252, .3);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--moss-300);
}

.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 22px 80px;
}

.page-main.wide {
    max-width: 1380px;
}

.section-block {
    margin-bottom: 68px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: var(--moss-300);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-heading p {
    max-width: 780px;
    margin: 8px 0 0;
    color: #8b949e;
}

.section-more {
    flex-shrink: 0;
    color: var(--moss-300);
    font-weight: 700;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(36, 51, 41, .82);
    border-radius: 18px;
    background: var(--night-800);
    box-shadow: var(--shadow-swamp);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 201, 159, .45);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--night-700);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent 58%);
    opacity: .75;
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%) scale(.9);
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(77, 115, 72, .88);
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-num {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--night-950);
    background: var(--gold);
    font-size: 15px;
}

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

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #8b949e;
    font-size: 13px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: var(--night-100);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--moss-300);
}

.movie-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--night-300);
    font-size: 14px;
}

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

.tag-row span,
.meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--moss-300);
    background: var(--swamp-800);
    font-size: 12px;
}

.tag-row .heat {
    margin-left: auto;
    color: var(--gold);
}

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

.category-card {
    min-height: 150px;
    padding: 20px;
    border: 1px solid var(--swamp-700);
    border-radius: 18px;
    background:
        radial-gradient(circle at 20% 20%, rgba(101, 148, 95, .2), transparent 34%),
        var(--night-800);
    box-shadow: var(--shadow-swamp);
    transition: transform .2s ease, border-color .2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--moss-700);
}

.category-card strong {
    display: block;
    color: var(--night-100);
    font-size: 20px;
}

.category-card p {
    margin: 10px 0 0;
    color: #8b949e;
    font-size: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 190px 190px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--swamp-700);
    border-radius: 18px;
    background: rgba(22, 27, 34, .82);
    box-shadow: var(--shadow-swamp);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #8b949e;
    font-size: 13px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--swamp-700);
    border-radius: 12px;
    padding: 0 14px;
    color: var(--night-100);
    background: var(--night-900);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--moss-600);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    color: #8b949e;
    font-size: 14px;
}

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

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

.detail-panel,
.side-panel {
    border: 1px solid var(--swamp-700);
    border-radius: 22px;
    background: var(--night-800);
    box-shadow: var(--shadow-swamp);
    overflow: hidden;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-wrap video {
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .22));
    cursor: pointer;
    z-index: 3;
}

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

.play-layer span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--moss-600);
    box-shadow: var(--shadow-deep);
    font-size: 28px;
}

.detail-body {
    padding: 26px;
}

.detail-body h1 {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-body h2,
.side-panel h2 {
    margin: 24px 0 12px;
    color: var(--moss-300);
    font-size: 24px;
}

.detail-body p {
    margin: 0 0 14px;
    color: var(--night-200);
    font-size: 16px;
}

.side-panel {
    padding: 18px;
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: var(--swamp-900);
    transition: background .2s ease, transform .2s ease;
}

.side-item:hover {
    transform: translateX(3px);
    background: var(--swamp-800);
}

.side-item img {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    object-fit: cover;
}

.side-item strong {
    display: block;
    color: var(--night-100);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-item span {
    display: block;
    margin-top: 4px;
    color: #8b949e;
    font-size: 13px;
}

.site-footer {
    border-top: 1px solid var(--swamp-700);
    background: var(--night-950);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: #8b949e;
}

.footer-inner strong,
.footer-inner a {
    color: var(--moss-300);
}

.footer-inner p {
    margin: 6px 0 0;
}

.empty-state {
    display: none;
    padding: 36px;
    border: 1px solid var(--swamp-700);
    border-radius: 18px;
    color: #8b949e;
    background: var(--night-800);
    text-align: center;
}

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

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

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

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

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

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

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

    .hero {
        min-height: 560px;
        height: 78vh;
    }

    .hero-content {
        padding: 56px 18px 80px;
    }

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

    .hero-dots {
        left: 18px;
        right: auto;
    }

    .page-main {
        padding: 36px 18px 64px;
    }

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

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

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

    .movie-card h3 {
        font-size: 16px;
    }

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

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

    .side-item {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}

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