:root {
    color-scheme: dark;
    --bg-deep: #020617;
    --bg-main: #0f172a;
    --bg-soft: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.78);
    --line: rgba(148, 163, 184, 0.22);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #10b981;
    --accent-strong: #059669;
    --cyan: #22d3ee;
    --gold: #fbbf24;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --shadow-card: 0 22px 55px rgba(2, 6, 23, 0.36);
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.17), transparent 35rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.13), transparent 34rem),
        linear-gradient(180deg, #0f172a 0%, #111827 42%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 35px rgba(2, 6, 23, 0.4);
    backdrop-filter: blur(16px);
}

.nav-shell {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
}

.brand-text,
.footer-brand span:last-child {
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #34d399, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-links > a,
.nav-dropdown > button {
    color: #dbeafe;
    border: 0;
    background: transparent;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav-links > a:hover,
.nav-links > a.is-active,
.nav-dropdown:hover > button {
    color: #34d399;
}

.nav-dropdown {
    position: relative;
}

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

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: grid;
    gap: 6px;
}

.nav-dropdown-menu a {
    padding: 9px 10px;
    border-radius: 12px;
    color: var(--soft);
}

.nav-dropdown-menu a:hover {
    color: white;
    background: rgba(16, 185, 129, 0.16);
}

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

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: #e2e8f0;
}

.mobile-menu {
    display: none;
    width: min(100% - 32px, var(--max));
    margin: 0 auto 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
}

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

.mobile-menu a:hover {
    color: #fff;
    background: rgba(16, 185, 129, 0.14);
}

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

main {
    overflow: hidden;
}

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

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

.hero-slide {
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 120px 0 180px;
}

.eyebrow,
.inner-hero span,
.section-heading span,
.quick-search span {
    display: inline-flex;
    color: #67e8f9;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 14px 0 16px;
    font-size: clamp(2.4rem, 7vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content h2 {
    margin-top: 0;
}

.hero-content p {
    max-width: 620px;
    color: var(--soft);
    font-size: 1.1rem;
}

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

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

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.25);
}

.ghost-button {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(2, 6, 23, 0.42);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #fff;
    background: rgba(2, 6, 23, 0.46);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: max(16px, calc((100vw - var(--max)) / 2));
}

.hero-next {
    right: max(16px, calc((100vw - var(--max)) / 2));
}

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

.hero-dots button {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
}

.hero-dots button.is-active {
    background: #34d399;
}

.hero-panel {
    position: absolute;
    right: max(20px, calc((100vw - var(--max)) / 2));
    bottom: 86px;
    z-index: 6;
    width: 360px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
}

.hero-panel h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.quick-search,
.category-strip,
.content-section,
.listing-section,
.inner-layout,
.detail-content,
.player-section {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
}

.quick-search {
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: -42px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    box-shadow: var(--shadow-card);
}

.quick-search h2 {
    margin: 6px 0 0;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
}

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

.home-search-form input,
.filter-search input,
.filter-selects select {
    width: 100%;
    min-height: 48px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    background: rgba(15, 23, 42, 0.82);
    padding: 0 16px;
}

.home-search-form button {
    min-width: 96px;
    border: 0;
    border-radius: 16px;
    color: white;
    font-weight: 800;
    background: var(--accent-strong);
}

.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 34px 0 0;
}

.category-strip a {
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.11);
    padding: 9px 16px;
}

.content-section,
.listing-section,
.inner-layout,
.player-section {
    padding: 72px 0 0;
}

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

.section-heading h2,
.category-overview-head h2 {
    margin: 4px 0 0;
    font-size: clamp(1.6rem, 3vw, 2.45rem);
    line-height: 1.15;
}

.section-heading a {
    color: #34d399;
    font-weight: 800;
}

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

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

.listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.22);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: var(--shadow-card);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.72));
    opacity: 0.84;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: rgba(16, 185, 129, 0.9);
    transform: translate(-50%, -50%) scale(0.78);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.region-badge,
.year-badge {
    position: absolute;
    top: 12px;
    z-index: 3;
    padding: 4px 9px;
    border-radius: 9px;
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
}

.region-badge {
    left: 12px;
    background: rgba(5, 150, 105, 0.92);
}

.year-badge {
    right: 12px;
    background: rgba(2, 6, 23, 0.72);
}

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

.movie-card-body h2 {
    margin: 0 0 8px;
    font-size: 1.02rem;
    line-height: 1.35;
}

.movie-card-body h2 a:hover {
    color: #34d399;
}

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 0.8rem;
}

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

.tag-row span {
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.12);
    padding: 4px 9px;
    font-size: 0.74rem;
}

.rank-section {
    position: relative;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: auto 70px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 96px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.52);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.38);
}

.rank-num {
    color: var(--gold);
    font-weight: 900;
}

.rank-item img {
    width: 70px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    line-height: 1.25;
}

.rank-text em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.82rem;
    font-style: normal;
}

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

.category-tile,
.category-overview-block {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.76));
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.2);
}

.category-tile {
    padding: 18px;
}

.category-tile a:first-child {
    display: grid;
    gap: 8px;
}

.category-tile span {
    color: #34d399;
    font-weight: 900;
}

.category-tile strong {
    color: var(--soft);
    font-size: 0.92rem;
    font-weight: 500;
}

.category-sample {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.category-sample a {
    color: var(--muted);
    font-size: 0.86rem;
}

.category-sample a:hover {
    color: white;
}

.inner-hero {
    position: relative;
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 96px 0 34px;
}

.inner-hero h1 {
    margin: 10px 0 12px;
    font-size: clamp(2.2rem, 6vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.inner-hero p {
    max-width: 760px;
    color: var(--soft);
    font-size: 1.06rem;
}

.category-overview-block {
    padding: 26px;
}

.category-overview-block + .category-overview-block {
    margin-top: 28px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 16px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.62);
}

.filter-search span {
    display: none;
}

.filter-selects {
    display: flex;
    gap: 12px;
}

.filter-selects select {
    min-width: 150px;
}

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

.detail-hero {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 76px 0 36px;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: var(--shadow-card);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: #34d399;
}

.detail-info h1 {
    margin: 12px 0 16px;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.detail-lead {
    max-width: 740px;
    color: var(--soft);
    font-size: 1.08rem;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.detail-meta-grid div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.55);
}

.detail-meta-grid span,
.detail-meta-grid strong {
    display: block;
}

.detail-meta-grid span {
    color: var(--muted);
    font-size: 0.78rem;
}

.detail-meta-grid strong {
    margin-top: 4px;
}

.detail-tags {
    margin-bottom: 24px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-xl);
    background: black;
    box-shadow: var(--shadow-card);
}

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

.play-panel {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: white;
    text-align: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.78));
}

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

.big-play {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    box-shadow: 0 20px 46px rgba(16, 185, 129, 0.32);
}

.play-panel strong {
    font-size: clamp(1.4rem, 4vw, 2.6rem);
}

.play-panel em {
    color: #bbf7d0;
    font-style: normal;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-top: 36px;
}

.detail-content article {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(30, 41, 59, 0.56);
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 1.5rem;
}

.detail-content p {
    margin: 0;
    color: var(--soft);
}

.site-footer {
    margin-top: 92px;
    padding: 52px 0 28px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(2, 6, 23, 0.95));
}

.footer-grid {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
}

.footer-grid p {
    max-width: 520px;
    color: var(--muted);
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

.footer-grid a:hover {
    color: #34d399;
}

.footer-bottom {
    width: min(100% - 32px, var(--max));
    margin: 34px auto 0;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: #64748b;
    font-size: 0.9rem;
    text-align: center;
}

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

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

    .hero-panel {
        display: none;
    }

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

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

    .menu-button {
        display: block;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding: 100px 0 130px;
    }

    .quick-search,
    .filter-bar,
    .detail-hero,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .home-search-form,
    .filter-selects {
        flex-direction: column;
    }

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

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

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

@media (max-width: 560px) {
    .hero {
        min-height: 580px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 2.6rem;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search {
        padding: 20px;
    }

    .movie-grid,
    .compact-grid,
    .listing-grid,
    .rank-grid,
    .rank-list-large,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .category-overview-head {
        align-items: start;
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: auto 62px 1fr;
    }

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