:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-solid: #0f172a;
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --blue: #2563eb;
    --pink: #f472b6;
    --shadow: 0 20px 60px rgba(2, 6, 23, 0.55);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 36rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #071024 42%, #020617 100%);
}

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;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 35px rgba(2, 6, 23, 0.35);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 25px rgba(34, 211, 238, 0.24);
}

.brand-text {
    font-size: 19px;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: var(--soft);
    padding: 9px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.12);
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.62);
}

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

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #020617;
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.16) 46%, rgba(2, 6, 23, 0.52) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 96px 0 130px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-shadow: 0 20px 60px rgba(2, 6, 23, 0.52);
}

.hero-desc,
.page-hero p,
.section-heading p,
.category-card p,
.footer-inner p,
.movie-info p,
.wide-content p,
.detail-article p,
.lead-text {
    color: var(--soft);
    line-height: 1.75;
}

.hero-desc {
    max-width: 700px;
    margin: 22px 0 0;
    font-size: clamp(16px, 2vw, 21px);
}

.hero-tags,
.movie-meta,
.tag-row,
.hero-actions,
.hero-quick-links,
.quick-filters,
.detail-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.62);
    font-size: 12px;
}

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

.btn,
.hero-search button,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn {
    padding: 0 20px;
}

.btn-primary,
.hero-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
}

.btn-ghost,
.section-more,
.text-link {
    color: #cffafe;
    border: 1px solid rgba(34, 211, 238, 0.3);
    background: rgba(15, 23, 42, 0.48);
}

.btn:hover,
.hero-search button:hover,
.section-more:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-search-card {
    position: absolute;
    left: 50%;
    bottom: 38px;
    z-index: 3;
    width: min(1240px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

.hero-search input,
.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 46px;
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    outline: none;
    background: rgba(2, 6, 23, 0.72);
}

.hero-search input,
.filter-row input {
    padding: 0 16px;
}

.filter-row select {
    padding: 0 12px;
}

.hero-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
    border-color: rgba(34, 211, 238, 0.62);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}

.hero-search button {
    min-width: 96px;
    border: 0;
    cursor: pointer;
}

.hero-quick-links a,
.side-links a,
.quick-filters button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.65);
}

.hero-quick-links a:hover,
.side-links a:hover,
.quick-filters button:hover,
.quick-filters button.is-active {
    color: #ffffff;
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(34, 211, 238, 0.12);
}

.hero-dots {
    position: absolute;
    right: max(22px, calc((100% - 1240px) / 2));
    bottom: 128px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.42);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--cyan);
}

.page-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.page-top {
    padding-top: 46px;
}

.content-section {
    margin: 54px 0;
}

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

.section-heading h2,
.category-card h2,
.ranking-side h2,
.detail-side h2,
.detail-article h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.025em;
}

.section-heading p {
    margin: 8px 0 0;
}

.section-more,
.text-link {
    min-width: 108px;
    padding: 0 16px;
}

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

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

.movie-card,
.wide-card,
.category-card,
.glass-panel,
.filter-panel,
.page-hero,
.player-shell,
.detail-article,
.detail-side,
.ranking-side {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.64);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
    backdrop-filter: blur(14px);
}

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.36);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(37, 99, 235, 0.15));
}

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

.movie-card:hover .movie-poster img,
.wide-card:hover .wide-cover img,
.category-card:hover .category-cover-stack img {
    transform: scale(1.06);
}

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

.poster-play {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    background: rgba(34, 211, 238, 0.88);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ec4899);
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.25);
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-info h3 a:hover,
.wide-content h3 a:hover,
.category-card h2 a:hover {
    color: var(--cyan);
}

.movie-info p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
}

.movie-meta {
    gap: 6px;
}

.movie-meta span {
    min-height: 24px;
    padding: 3px 8px;
    color: var(--muted);
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    min-height: 23px;
    padding: 3px 8px;
    color: #bae6fd;
    background: rgba(34, 211, 238, 0.08);
}

.movie-card-compact .movie-info p {
    min-height: 42px;
    -webkit-line-clamp: 2;
}

.glass-panel,
.filter-panel,
.page-hero {
    border-radius: var(--radius);
    padding: 30px;
}

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

.category-tile {
    min-height: 128px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 60%),
        rgba(2, 6, 23, 0.38);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-tile span {
    font-size: 18px;
    font-weight: 800;
}

.category-tile small {
    color: var(--muted);
    line-height: 1.6;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 34px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 36rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.62));
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -90px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    filter: blur(12px);
}

.small-hero h1,
.channel-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.small-hero p,
.channel-hero p {
    max-width: 760px;
}

.category-list {
    display: grid;
    gap: 18px;
    margin-bottom: 54px;
}

.category-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: center;
    padding: 18px;
    border-radius: 24px;
    overflow: hidden;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    min-height: 176px;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.62);
}

.category-cover-stack img {
    min-height: 176px;
}

.category-card .btn {
    margin-top: 12px;
}

.filter-panel {
    margin-bottom: 54px;
    border-radius: 24px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 160px 160px;
    gap: 12px;
    margin-bottom: 14px;
}

.quick-filters {
    margin-bottom: 18px;
}

.quick-filters button {
    cursor: pointer;
}

.filter-result {
    min-height: 26px;
    margin-bottom: 14px;
    color: var(--muted);
}

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

.wide-list,
.side-movies {
    display: grid;
    gap: 14px;
}

.wide-card {
    position: relative;
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    overflow: hidden;
}

.wide-cover {
    position: relative;
    height: 132px;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
}

.wide-content h3 {
    margin: 8px 0;
    font-size: 18px;
}

.wide-content p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.wide-rank {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #ec4899);
}

.ranking-side,
.detail-side {
    align-self: start;
    position: sticky;
    top: 92px;
    padding: 20px;
    border-radius: 22px;
}

.side-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

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

.breadcrumbs a:hover {
    color: var(--cyan);
}

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

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

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.2), transparent 34%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
}

.player-overlay.is-hidden {
    display: none;
}

.play-circle {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.45);
}

.detail-article {
    margin-top: 20px;
    padding: 28px;
    border-radius: 24px;
}

.detail-article h1 {
    margin: 14px 0;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.detail-article section {
    margin-top: 28px;
}

.detail-article h2 {
    margin-bottom: 10px;
    font-size: 24px;
}

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

.detail-tags {
    margin-top: 18px;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.86);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 28px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: flex-end;
}

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

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

.is-filtered-out {
    display: none !important;
}

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

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

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

    .ranking-side,
    .detail-side {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 76vh;
    }

    .hero-content {
        padding-top: 96px;
        padding-bottom: 230px;
    }

    .hero-search-card {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 170px;
    }

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

    .movie-grid,
    .large-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

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

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

    .filter-row {
        grid-template-columns: 1fr 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .page-wrap,
    .hero-content,
    .hero-search-card,
    .footer-inner,
    .mobile-nav {
        width: min(100% - 24px, 1240px);
    }

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

    .hero h1,
    .hero h2,
    .page-hero h1 {
        font-size: 38px;
    }

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

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

    .glass-panel,
    .filter-panel,
    .page-hero,
    .detail-article {
        padding: 20px;
    }

    .wide-card {
        grid-template-columns: 82px 1fr;
    }

    .wide-cover {
        height: 118px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
