:root {
    --bg: #06130b;
    --bg-soft: #0b1f12;
    --bg-card: #102519;
    --bg-card-strong: #15351f;
    --green-deep: #14532d;
    --green: #15803d;
    --green-light: #22c55e;
    --green-pale: #dcfce7;
    --text: #f8fafc;
    --muted: #b6c7b8;
    --line: rgba(220, 252, 231, 0.14);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 22px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 36rem), var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

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

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

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--green-light), var(--green-deep));
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.25);
}

.brand-text {
    font-size: 20px;
    white-space: nowrap;
}

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

.nav-link {
    color: var(--muted);
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--green-pale);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(20, 83, 45, 0.36);
}

.header-search input,
.catalog-toolbar input,
.panel-tools input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input::placeholder,
.catalog-toolbar input::placeholder,
.panel-tools input::placeholder {
    color: rgba(220, 252, 231, 0.58);
}

.header-search button {
    border: 0;
    border-radius: 999px;
    padding: 7px 14px;
    color: #06230f;
    background: var(--green-pale);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(220, 252, 231, 0.08);
}

.mobile-panel {
    display: none;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(8, 33, 18, 0.96);
}

.mobile-panel a {
    display: block;
    padding: 11px 12px;
    color: var(--muted);
    border-radius: 12px;
}

.mobile-panel a:hover {
    color: var(--text);
    background: rgba(220, 252, 231, 0.08);
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #06130b;
}

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

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

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

.hero-bg,
.page-hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) brightness(0.64);
}

.hero-mask,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 19, 11, 0.95) 0%, rgba(6, 19, 11, 0.72) 44%, rgba(6, 19, 11, 0.34) 100%),
        linear-gradient(0deg, #06130b 0%, rgba(6, 19, 11, 0) 36%);
}

.hero-inner {
    position: relative;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 360px;
    align-items: center;
    gap: 58px;
    padding-top: 32px;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--green-pale);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(42px, 8vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--green-pale);
    font-size: 19px;
}

.hero-tags,
.movie-meta,
.info-list,
.player-actions,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

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

.hero-tags span,
.movie-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(220, 252, 231, 0.14);
    border-radius: 999px;
    color: var(--green-pale);
    background: rgba(220, 252, 231, 0.08);
    font-size: 13px;
}

.hero-actions {
    margin-top: 32px;
}

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

.primary-btn {
    color: #06230f;
    background: linear-gradient(135deg, #dcfce7, #22c55e);
    box-shadow: 0 18px 45px rgba(34, 197, 94, 0.26);
}

.ghost-btn {
    border: 1px solid rgba(220, 252, 231, 0.24);
    color: var(--green-pale);
    background: rgba(220, 252, 231, 0.08);
}

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

.hero-poster {
    position: relative;
    display: block;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    border: 1px solid rgba(220, 252, 231, 0.18);
}

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

.hero-poster span,
.play-chip,
.rank-badge {
    position: absolute;
    border-radius: 999px;
    font-weight: 800;
}

.hero-poster span {
    left: 18px;
    bottom: 18px;
    padding: 8px 14px;
    color: #06230f;
    background: var(--green-pale);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 1px solid rgba(220, 252, 231, 0.24);
    border-radius: 50%;
    background: rgba(6, 19, 11, 0.46);
    font-size: 36px;
    line-height: 1;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(220, 252, 231, 0.38);
}

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

.search-panel {
    position: relative;
    z-index: 3;
    margin-top: -60px;
}

.search-panel-inner,
.catalog-toolbar,
.article-card,
.watch-card,
.side-card,
.category-card-large,
.category-tile,
.movie-card,
.site-footer {
    border: 1px solid var(--line);
    background: rgba(16, 37, 25, 0.78);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.search-panel-inner {
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: 28px;
    align-items: center;
    padding: 26px;
    border-radius: var(--radius);
}

.search-panel h2,
.article-card h2,
.watch-card h2,
.side-card h2,
.category-card-body h2 {
    margin: 0;
    font-size: 24px;
}

.search-panel p,
.category-card-body p,
.site-footer p,
.movie-line {
    color: var(--muted);
}

.panel-tools input,
.catalog-toolbar input {
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(6, 19, 11, 0.58);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.filter-row button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--green-pale);
    background: rgba(220, 252, 231, 0.07);
}

.filter-row button.is-active,
.filter-row button:hover {
    color: #06230f;
    border-color: transparent;
    background: var(--green-pale);
}

.content-section {
    padding: 72px 0;
}

.section-muted {
    background: linear-gradient(180deg, rgba(20, 83, 45, 0.12), rgba(6, 19, 11, 0));
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.section-link,
.text-link {
    color: var(--green-pale);
    border: 1px solid var(--line);
}

.movie-grid,
.rank-grid,
.category-grid,
.category-list-grid,
.mini-feature-grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-5px);
    border-color: rgba(220, 252, 231, 0.28);
    background: rgba(21, 53, 31, 0.92);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(220, 252, 231, 0.06);
}

.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);
}

.play-chip {
    right: 10px;
    bottom: 10px;
    padding: 5px 10px;
    color: #06230f;
    background: var(--green-pale);
    font-size: 12px;
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    color: #06230f;
    background: linear-gradient(135deg, #fef9c3, #22c55e);
}

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

.movie-title {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.movie-line {
    display: -webkit-box;
    min-height: 44px;
    margin: 8px 0 12px;
    overflow: hidden;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    gap: 7px;
    margin-bottom: 10px;
}

.movie-meta span {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 12px;
}

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

.movie-card-compact {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 142px;
}

.movie-card-compact .poster-link img {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card-compact .movie-line {
    min-height: 0;
    -webkit-line-clamp: 2;
}

.category-tile {
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 22px;
    border-radius: 24px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(6, 19, 11, 0.94) 72%);
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 1;
}

.category-tile span {
    font-size: 24px;
    font-weight: 900;
}

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

.category-card-large {
    overflow: hidden;
    border-radius: 24px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 160px;
    overflow: hidden;
}

.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.92), rgba(6, 19, 11, 0.98));
}

.simple-hero,
.category-hero,
.rank-hero {
    padding: 110px 0 70px;
}

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

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

.category-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 44px;
    align-items: center;
}

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

.mini-feature {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--line);
}

.mini-feature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-feature span {
    position: absolute;
    inset: auto 12px 12px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(6, 19, 11, 0.78);
    font-size: 13px;
    font-weight: 700;
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 22px;
}

.catalog-toolbar .filter-row {
    margin-top: 0;
}

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

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

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

.detail-top {
    position: relative;
    z-index: 2;
    padding: 96px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 26px;
    color: var(--green-pale);
}

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

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.info-list {
    margin: 24px 0;
}

.info-list div {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(220, 252, 231, 0.06);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: var(--green-pale);
}

.large-tags {
    margin-bottom: 28px;
}

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

.main-column,
.side-column,
.side-list {
    display: grid;
    gap: 22px;
    align-content: start;
}

.watch-card,
.article-card,
.side-card {
    padding: 24px;
    border-radius: 24px;
}

.player-frame {
    position: relative;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(220, 252, 231, 0.18);
    background: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    color: #06230f;
    background: var(--green-pale);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.36);
    font-size: 30px;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-actions {
    margin-top: 18px;
}

.button-reset {
    border: 0;
    cursor: pointer;
}

.article-card p {
    margin: 14px 0 0;
    color: var(--green-pale);
    font-size: 17px;
}

.neighbor-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.neighbor-links h2 {
    width: 100%;
}

.neighbor-links a {
    color: var(--green-pale);
}

.side-list .movie-card-compact {
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 120px;
}

.side-list .movie-meta,
.side-list .tag-row {
    display: none;
}

.site-footer {
    margin-top: 40px;
    border-width: 1px 0 0;
    border-radius: 0;
    background: #07150d;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--green-pale);
}

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

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

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

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

    .hero-inner,
    .category-hero-inner,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 320px;
    }

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

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 22px, var(--max));
    }

    .nav-shell {
        min-height: 64px;
    }

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

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

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        align-content: center;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: clamp(36px, 11vw, 54px);
    }

    .hero p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel {
        margin-top: 0;
    }

    .search-panel-inner,
    .catalog-toolbar,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 46px 0;
    }

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

    .movie-grid,
    .catalog-grid,
    .rank-grid,
    .rank-list-page,
    .category-grid,
    .category-list-grid,
    .mini-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-card-compact,
    .side-list .movie-card-compact {
        grid-template-columns: 76px minmax(0, 1fr);
    }

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

    .movie-line {
        font-size: 13px;
    }

    .category-cover {
        min-height: 120px;
    }

    .detail-top {
        padding: 70px 0 46px;
    }

    .detail-poster {
        max-width: 240px;
    }

    .watch-card,
    .article-card,
    .side-card {
        padding: 18px;
    }
}

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

    .hero-poster {
        display: none;
    }

    .movie-card:not(.movie-card-compact) {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .movie-card:not(.movie-card-compact) .poster-link img {
        height: 100%;
        aspect-ratio: auto;
    }
}
