:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --brand: #34d399;
    --brand-strong: #10b981;
    --brand-soft: rgba(52, 211, 153, 0.16);
    --blue: #38bdf8;
    --pink: #f472b6;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 8%, rgba(16, 185, 129, 0.18), transparent 35%),
        radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.14), transparent 32%),
        linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--blue));
    color: #022c22;
    box-shadow: 0 10px 32px rgba(16, 185, 129, 0.35);
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg::after,
.detail-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.35) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.98));
}

.hero-bg img,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.15) contrast(1.05);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 106px 0 128px;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 18px;
    max-width: 760px;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 1.03;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    font-size: clamp(36px, 5vw, 70px);
}

.hero-lead,
.page-hero p,
.detail-lead {
    max-width: 760px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 21px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: 999px;
    background: var(--brand-soft);
    color: #bbf7d0;
    font-size: 12px;
}

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

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

.primary-button {
    background: linear-gradient(135deg, var(--brand), var(--blue));
    color: #022c22;
    box-shadow: 0 18px 42px rgba(16, 185, 129, 0.28);
}

.secondary-button {
    border: 1px solid rgba(52, 211, 153, 0.32);
    background: rgba(15, 23, 42, 0.72);
    color: #d1fae5;
}

.ghost-button {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-tile:hover {
    transform: translateY(-3px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(56, 189, 248, 0.16)),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.hero-poster img {
    height: 500px;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: inline-flex;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.7);
    color: var(--text);
    font-weight: 900;
    backdrop-filter: blur(14px);
}

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 30px;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

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

.hero-quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: 680px;
}

.hero-quick-links a {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
    color: var(--muted-strong);
    font-size: 13px;
    backdrop-filter: blur(12px);
}

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

.section-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

.movie-grid,
.ranking-grid,
.category-grid {
    display: grid;
    gap: 18px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.82)),
        rgba(15, 23, 42, 0.9);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(52, 211, 153, 0.42);
    box-shadow: 0 22px 52px rgba(16, 185, 129, 0.14);
}

.poster-card {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(56, 189, 248, 0.12)),
        #0f172a;
}

.poster-card img,
.category-thumbs img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-card::after {
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    content: "";
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.94);
    color: #022c22;
    font-size: 14px;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: #1f1300;
    font-weight: 900;
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-card-body h2 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.3;
}

.movie-card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
}

.is-compact .movie-card-body h2 {
    font-size: 16px;
}

.is-compact .movie-card-body p {
    display: none;
}

.rank-section {
    padding: 84px 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(52, 211, 153, 0.18), transparent 30%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.category-tile {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    overflow: hidden;
    min-height: 190px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
    border-color: rgba(52, 211, 153, 0.45);
}

.category-tile h2 {
    margin: 8px 0;
    font-size: 26px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    min-height: 150px;
}

.category-thumbs img {
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.12);
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.page-hero {
    padding: 96px 0 66px;
    background:
        radial-gradient(circle at 18% 18%, rgba(52, 211, 153, 0.22), transparent 32%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
}

.small-hero h1,
.ranking-hero h1 {
    max-width: 880px;
    margin: 14px 0;
    font-size: clamp(36px, 5vw, 64px);
}

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

.breadcrumb a {
    color: #a7f3d0;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
}

.large-filter {
    grid-template-columns: 1fr 170px 150px 160px 170px;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(52, 211, 153, 0.65);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-head {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 48px;
    align-items: end;
    padding: 86px 0 76px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.13);
    color: var(--muted-strong);
    font-size: 13px;
}

.watch-section {
    padding: 52px 0;
    background: #030712;
    border-bottom: 1px solid var(--line);
}

.watch-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.watch-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    align-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at center, rgba(52, 211, 153, 0.16), transparent 36%),
        rgba(2, 6, 23, 0.46);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.watch-play {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--blue));
    color: #022c22;
    font-size: 28px;
    box-shadow: 0 22px 54px rgba(16, 185, 129, 0.35);
}

.watch-layer strong {
    font-size: clamp(22px, 4vw, 38px);
    text-align: center;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 34px;
    padding: 72px 0 24px;
}

.detail-article,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    padding: 24px;
}

.detail-article h2,
.detail-side h2 {
    margin: 10px 0 16px;
    font-size: 28px;
}

.detail-article p {
    color: var(--muted-strong);
    margin: 0 0 18px;
}

.info-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.info-panel div,
.side-links a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.38);
}

.info-panel strong,
.side-links small {
    color: var(--brand);
}

.side-links {
    display: grid;
    gap: 10px;
}

.side-links a:hover {
    border-color: rgba(52, 211, 153, 0.38);
}

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

.site-footer {
    padding: 58px 0 24px;
    border-top: 1px solid var(--line);
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.site-footer p,
.footer-bottom {
    color: var(--muted);
}

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

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 14px;
}

.image-off {
    display: none !important;
}

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

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

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

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

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

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

    .nav-toggle {
        display: inline-block;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(2, 6, 23, 0.96);
    }

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

    .hero {
        min-height: 820px;
    }

    .hero-content {
        gap: 26px;
        padding: 86px 0 150px;
    }

    .hero-poster {
        min-height: 380px;
    }

    .hero-poster img {
        height: 380px;
    }

    .hero-controls {
        align-items: flex-start;
        flex-direction: column;
        bottom: 20px;
    }

    .hero-quick-links {
        justify-content: flex-start;
    }

    .movie-grid,
    .compact-grid,
    .ranking-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-tile {
        grid-template-columns: 1fr;
    }

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

    .detail-head {
        padding-top: 54px;
    }

    .watch-card {
        border-radius: 18px;
    }

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