:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --brand: #34d399;
    --brand-strong: #10b981;
    --brand-soft: rgba(16, 185, 129, 0.14);
    --orange: #f59e0b;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.16), transparent 32rem),
        radial-gradient(circle at 88% 12%, rgba(14, 165, 233, 0.14), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #08111f 46%, #020617 100%);
    color: var(--text);
    font-family: Inter, 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,
select {
    font: inherit;
}

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

.nav-wrap {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #34d399, #0ea5e9);
    color: #00140d;
    font-weight: 900;
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.28);
}

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

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

.desktop-nav > a,
.nav-dropdown > button,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.active,
.nav-dropdown > button:hover,
.mobile-nav a:hover,
.mobile-nav a.active {
    background: var(--brand-soft);
    color: var(--brand);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown button {
    border: 0;
    cursor: pointer;
    background: transparent;
}

.nav-dropdown div {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 220px;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
}

.nav-dropdown:hover div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.nav-dropdown div a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted-strong);
}

.nav-dropdown div a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.quick-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 320px;
}

.quick-search input,
.home-search-panel input,
.toolbar-panel input,
.toolbar-panel select {
    width: 100%;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: white;
    padding: 12px 16px;
}

.quick-search input:focus,
.home-search-panel input:focus,
.toolbar-panel input:focus,
.toolbar-panel select:focus {
    border-color: rgba(52, 211, 153, 0.62);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.quick-search button,
.home-search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    color: #02130d;
    font-weight: 800;
    background: linear-gradient(135deg, #34d399, #a7f3d0);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.mobile-nav {
    display: none;
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto 14px;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

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

main {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    margin-top: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 36px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

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

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) brightness(0.62);
}

.hero-backdrop,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.66) 48%, rgba(2, 6, 23, 0.2) 100%),
        radial-gradient(circle at 30% 25%, rgba(16, 185, 129, 0.2), transparent 32rem);
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 92px 72px;
}

.hero-kicker,
.section-heading p,
.page-hero p,
.feature-panel p {
    margin: 0 0 12px;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero span,
.detail-one-line {
    max-width: 660px;
    margin: 22px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #d1fae5;
    padding: 6px 10px;
    font-size: 12px;
}

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

.primary-button,
.ghost-button {
    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, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #03140e;
    background: linear-gradient(135deg, #34d399, #a7f3d0);
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-dots {
    position: absolute;
    left: 72px;
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 9px;
}

.hero-dots button {
    width: 32px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.28);
}

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

.home-search-panel,
.toolbar-panel,
.page-hero,
.content-section,
.category-block,
.watch-section,
.detail-content-layout {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.3);
}

.home-search-panel {
    margin-top: 28px;
    padding: 28px;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
}

.home-search-panel h2,
.content-section h2,
.page-hero h1,
.category-block h2,
.detail-article h2,
.detail-side h2,
.ranking-aside h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.home-search-panel p,
.category-block p,
.detail-article p,
.feature-panel span {
    color: var(--muted-strong);
}

.home-search-panel form {
    display: flex;
    gap: 10px;
}

.content-section {
    margin-top: 28px;
    padding: 28px;
}

.no-top-space {
    margin-top: 16px;
}

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

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.section-heading a,
.category-block-head a {
    color: var(--brand);
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #111827;
}

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

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

.category-tile span {
    position: absolute;
    inset: auto 16px 16px;
    z-index: 2;
}

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

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

.category-tile em {
    color: var(--muted-strong);
    font-size: 13px;
    font-style: normal;
}

.split-section {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: 28px;
}

.feature-panel {
    min-height: 100%;
    border-radius: 24px;
    padding: 34px;
    background:
        radial-gradient(circle at 85% 10%, rgba(52, 211, 153, 0.28), transparent 22rem),
        linear-gradient(145deg, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.88));
}

.feature-panel h2 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 50px);
}

.feature-panel .primary-button {
    margin-top: 26px;
}

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

.mini-card {
    position: relative;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 84px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.35);
    transition: 0.2s ease;
}

.mini-card:hover {
    border-color: rgba(52, 211, 153, 0.42);
    transform: translateX(4px);
}

.mini-card img {
    width: 112px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card strong {
    font-size: 15px;
    line-height: 1.3;
}

.mini-card em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.mini-rank {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #fef3c7);
    color: #1e1400;
    font-size: 12px;
    font-weight: 900;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.4);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.82) 100%);
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.92);
    color: #03140e;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #fef3c7);
    color: #1e1400;
    font-size: 13px;
}

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

.movie-title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: white;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 42px;
    margin: 10px 0 0;
    overflow: hidden;
    color: var(--muted-strong);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span:nth-child(n+4) {
    display: none;
}

.page-hero {
    margin-top: 28px;
    padding: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.small-hero,
.category-hero,
.ranking-hero {
    background:
        radial-gradient(circle at 85% 10%, rgba(52, 211, 153, 0.18), transparent 24rem),
        linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.72));
}

.toolbar-panel {
    margin-top: 16px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 210px;
    gap: 12px;
}

.wide-toolbar {
    grid-template-columns: 1fr 220px;
}

.category-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-top: 28px;
}

.category-block {
    padding: 24px;
}

.category-block-head {
    margin-bottom: 18px;
}

.category-block-head h2 {
    font-size: 28px;
}

.ranking-layout {
    align-items: start;
    margin-top: 28px;
}

.ranking-main,
.ranking-aside {
    min-width: 0;
}

.ranking-aside {
    position: sticky;
    top: 100px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 22px;
    background: rgba(15, 23, 42, 0.78);
}

.ranking-aside h2 {
    margin-bottom: 16px;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    margin-top: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 36px;
    background: #0f172a;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) brightness(0.55);
}

.detail-wrap {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    min-height: 560px;
    padding: 54px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

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

.breadcrumb em {
    color: white;
    font-style: normal;
}

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

.detail-meta span {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 7px 12px;
    font-size: 13px;
}

.watch-section {
    margin-top: 28px;
    padding: 16px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.player-shell video {
    display: block;
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    cursor: pointer;
    color: white;
    background:
        radial-gradient(circle at 50% 42%, rgba(52, 211, 153, 0.26), transparent 18rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, #34d399, #a7f3d0);
    color: #03140e;
    font-size: 34px;
    font-weight: 900;
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.38);
}

.play-overlay strong {
    font-size: 18px;
    letter-spacing: 0.04em;
}

.player-shell.is-playing .play-overlay {
    display: none;
}

.detail-content-layout {
    margin-top: 28px;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 32px;
}

.detail-article {
    min-width: 0;
}

.detail-article h2 {
    margin-top: 0;
    font-size: 28px;
}

.detail-article h2:not(:first-child) {
    margin-top: 34px;
}

.detail-article p {
    font-size: 17px;
}

.detail-side {
    min-width: 0;
}

.detail-side h2 {
    margin-bottom: 16px;
}

.page-movie-list .movie-card.is-hidden {
    display: none;
}

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

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

    .quick-search {
        min-width: 260px;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .hero-carousel {
        min-height: 560px;
        border-radius: 26px;
    }

    .hero-copy {
        padding: 64px 28px;
    }

    .hero-dots {
        left: 28px;
    }

    .home-search-panel,
    .split-section,
    .detail-wrap,
    .detail-content-layout,
    .toolbar-panel,
    .wide-toolbar,
    .category-overview,
    .ranking-layout {
        grid-template-columns: 1fr;
    }

    .home-search-panel form {
        flex-direction: column;
    }

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

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

    .detail-wrap {
        padding: 30px;
    }

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

    .ranking-aside {
        position: static;
    }
}

@media (max-width: 640px) {
    .nav-wrap,
    .mobile-nav,
    main {
        width: min(100% - 20px, 1380px);
    }

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

    .mobile-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-carousel {
        min-height: 520px;
        margin-top: 14px;
    }

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

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

    .content-section,
    .page-hero,
    .home-search-panel,
    .category-block,
    .detail-content-layout {
        padding: 18px;
        border-radius: 22px;
    }

    .page-hero {
        align-items: start;
    }

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

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

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

    .movie-title {
        font-size: 14px;
        min-height: 38px;
    }

    .movie-card-body p,
    .tag-row {
        display: none;
    }

    .mini-card {
        grid-template-columns: 96px 1fr;
    }

    .mini-card img {
        width: 96px;
    }

    .detail-wrap {
        min-height: auto;
        padding: 22px;
    }

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

    .detail-hero {
        min-height: auto;
    }

    .watch-section {
        padding: 8px;
    }

    .player-shell {
        border-radius: 16px;
    }
}
