:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.88);
    --bg-card-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(34, 211, 238, 0.30);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-light: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --cyan-soft: rgba(34, 211, 238, 0.14);
    --violet: #8b5cf6;
    --shadow: 0 22px 55px rgba(0, 0, 0, 0.32);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.16), transparent 28rem),
        radial-gradient(circle at 82% 8%, rgba(139, 92, 246, 0.14), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 54%, #020617 100%);
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    border-bottom: 1px solid transparent;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.24));
}

.site-header.is-scrolled {
    background: rgba(2, 6, 23, 0.96);
    border-bottom-color: var(--line);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 182px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 0 34px rgba(34, 211, 238, 0.28);
    font-size: 15px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    border-radius: 12px;
    color: var(--muted-light);
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-link {
    padding: 10px 12px;
    font-size: 14px;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #67e8f9;
    background: var(--cyan-soft);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input,
.mobile-search input {
    width: 168px;
    border: 0;
    outline: 0;
    padding: 10px 12px 10px 16px;
    color: var(--text);
    background: transparent;
}

.header-search button,
.mobile-search button {
    border: 0;
    padding: 10px 16px;
    color: #001018;
    background: var(--cyan);
    font-weight: 700;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.98);
    box-shadow: var(--shadow);
}

.mobile-link {
    display: block;
    padding: 13px 14px;
    margin-bottom: 4px;
}

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

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

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide.is-active .hero-image {
    animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
    from {
        transform: scale(1.02);
    }
    to {
        transform: scale(1.08);
    }
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.66) 44%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 48%, rgba(2, 6, 23, 0.64) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 140px 0 72px;
}

.hero-copy {
    width: min(760px, 100%);
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #67e8f9;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    margin: 18px 0 18px;
    font-size: clamp(40px, 8vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 650px;
    margin: 0 0 24px;
    color: var(--muted-light);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.72;
}

.hero-meta,
.detail-meta,
.card-meta-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.card-meta-inline span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.70);
    border: 1px solid var(--line);
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.button-primary,
.button-ghost,
.section-more,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.button-primary,
.filter-button {
    border: 0;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.22);
}

.button-primary,
.button-ghost {
    min-height: 48px;
    padding: 0 20px;
}

.button-ghost,
.section-more {
    border: 1px solid var(--line-strong);
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(12px);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(10px);
}

.hero-control:hover {
    background: rgba(34, 211, 238, 0.20);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 28px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.38);
}

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

.quick-panel {
    position: relative;
    margin-top: -38px;
    z-index: 5;
}

.quick-panel-inner,
.page-hero,
.filter-panel,
.content-panel,
.player-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-panel-inner {
    padding: 20px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    align-items: center;
}

.big-search {
    display: flex;
    min-height: 56px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.54);
}

.big-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 18px;
    color: var(--text);
    background: transparent;
    font-size: 16px;
}

.big-search button {
    border: 0;
    padding: 0 24px;
    color: #001018;
    background: var(--cyan);
    font-weight: 900;
}

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

.quick-links a {
    padding: 10px 13px;
    border-radius: 12px;
    color: var(--muted-light);
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid var(--line);
}

.quick-links a:hover {
    color: var(--cyan);
    border-color: var(--line-strong);
}

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

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

.section-heading h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-more {
    min-width: 102px;
    min-height: 42px;
    padding: 0 16px;
    white-space: nowrap;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: var(--line-strong);
    background: var(--bg-card-strong);
}

.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.35s ease, opacity 0.35s ease;
}

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

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #001018;
    background: var(--cyan);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #fde68a);
    font-style: normal;
    font-weight: 900;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--cyan);
}

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.movie-desc {
    min-height: 40px;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span,
.detail-tags span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.10);
    border: 1px solid rgba(34, 211, 238, 0.18);
    font-size: 12px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 172px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.20), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.category-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
}

.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--muted-light);
    line-height: 1.7;
}

.category-card span {
    display: inline-flex;
    margin-top: 18px;
    color: var(--cyan);
    font-weight: 800;
}

.page-main {
    padding-top: 110px;
    padding-bottom: 76px;
}

.page-hero {
    padding: clamp(28px, 5vw, 52px);
    margin-bottom: 28px;
}

.page-hero h1,
.detail-header h1 {
    max-width: 920px;
    margin: 10px 0 14px;
    font-size: clamp(32px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-hero p,
.detail-lead {
    max-width: 860px;
    margin: 0;
    color: var(--muted-light);
    line-height: 1.78;
    font-size: 17px;
}

.filter-panel {
    padding: 18px;
    margin-bottom: 24px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 180px 180px 118px;
    gap: 12px;
}

.filter-grid input,
.filter-grid select {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    color: var(--text);
    background: rgba(2, 6, 23, 0.56);
    padding: 0 14px;
}

.filter-button {
    min-height: 46px;
}

.no-results {
    display: none;
    padding: 28px;
    color: var(--muted-light);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.76);
}

.no-results.is-visible {
    display: block;
}

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

.ranking-list {
    display: grid;
    gap: 14px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 72px 86px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.82);
}

.ranking-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #001018;
    background: var(--cyan);
    font-size: 20px;
    font-weight: 900;
}

.ranking-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
}

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

.ranking-info h3 {
    margin: 0 0 8px;
    font-size: 19px;
}

.ranking-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.ranking-action {
    padding: 10px 14px;
    border-radius: 12px;
    color: #001018;
    background: var(--cyan);
    font-weight: 900;
    white-space: nowrap;
}

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

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

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

.player-panel {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    filter: blur(1px);
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.16), rgba(2, 6, 23, 0.62));
}

.player-start {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 999px;
    padding: 15px 24px;
    color: #001018;
    background: var(--cyan);
    box-shadow: 0 22px 45px rgba(34, 211, 238, 0.30);
    font-weight: 900;
}

.player-start span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--cyan);
    background: #001018;
}

.detail-header {
    padding: 22px;
}

.detail-meta {
    margin: 18px 0 0;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.detail-side {
    display: grid;
    gap: 18px;
}

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

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

.content-panel {
    padding: 24px;
    margin-top: 24px;
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-panel p {
    margin: 0 0 16px;
    color: var(--muted-light);
    line-height: 1.9;
    font-size: 16px;
}

.content-panel p:last-child {
    margin-bottom: 0;
}

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

.side-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.82);
}

.side-card img {
    width: 72px;
    height: 98px;
    object-fit: cover;
    border-radius: 12px;
}

.side-card h3 {
    margin: 2px 0 8px;
    font-size: 15px;
    line-height: 1.35;
}

.side-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
}

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

.footer-inner p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.75;
}

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

.footer-links a {
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-light);
}

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

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

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

    .desktop-nav {
        display: none;
    }

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

    .header-search {
        margin-left: auto;
    }

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

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

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

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

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

@media (max-width: 720px) {
    .header-inner {
        width: min(100% - 24px, 1280px);
        height: 66px;
    }

    .brand {
        min-width: 0;
    }

    .brand-subtitle,
    .header-search {
        display: none;
    }

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

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        padding-bottom: 66px;
    }

    .hero-control {
        display: none;
    }

    .quick-panel {
        margin-top: -24px;
    }

    .big-search {
        flex-direction: column;
        border-radius: 18px;
    }

    .big-search input,
    .big-search button {
        width: 100%;
        min-height: 50px;
    }

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

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

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

    .page-main {
        padding-top: 88px;
    }

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

    .ranking-item {
        grid-template-columns: 46px 70px 1fr;
    }

    .ranking-action {
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .movie-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

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

    .movie-card h3 {
        font-size: 14px;
    }

    .movie-desc,
    .tag-row {
        display: none;
    }
}
