:root {
    color-scheme: dark;
    --bg: #05050a;
    --surface: rgba(17, 24, 39, 0.78);
    --surface-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(255, 255, 255, 0.12);
    --text: #f8fafc;
    --muted: #a1a1aa;
    --soft: #d4d4d8;
    --brand: #facc15;
    --brand-2: #ec4899;
    --brand-3: #8b5cf6;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(147, 51, 234, 0.28), transparent 34rem),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.20), transparent 30rem),
        linear-gradient(180deg, #05050a 0%, #090910 45%, #020204 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.is-menu-open {
    overflow: hidden;
}

a {
    color: inherit;
}

img {
    background: rgba(255, 255, 255, 0.04);
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: min(1280px, calc(100% - 2rem));
    min-height: 4.5rem;
    margin: 0 auto;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #111827;
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.25);
}

.logo-text {
    white-space: nowrap;
    font-size: 1.05rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-link {
    border-radius: 999px;
    padding: 0.65rem 0.95rem;
    color: var(--soft);
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.10);
    color: var(--brand);
}

.header-search,
.search-strip {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.header-search input,
.search-strip input,
.movie-filter-form input,
.movie-filter-form select {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.header-search input {
    width: 11rem;
    padding: 0.7rem 0.2rem 0.7rem 1rem;
}

.header-search button,
.search-strip button {
    border: 0;
    padding: 0.72rem 1.05rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #111827;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
    width: 1.2rem;
    height: 2px;
    border-radius: 1rem;
    background: var(--text);
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    isolation: isolate;
}

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

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.60) 42%, rgba(0, 0, 0, 0.18) 100%),
        linear-gradient(0deg, #05050a 0%, rgba(5, 5, 10, 0.20) 42%, rgba(5, 5, 10, 0.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    width: min(1280px, calc(100% - 2rem));
    min-height: 72vh;
    margin: 0 auto;
    flex-direction: column;
    justify-content: center;
    max-width: 1280px;
    padding: 5rem 0 6rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 1rem;
    border: 1px solid rgba(250, 204, 21, 0.35);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    background: rgba(250, 204, 21, 0.10);
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    max-width: 820px;
    font-size: clamp(2.4rem, 7vw, 5.6rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 690px;
    margin-top: 1.25rem;
    color: var(--soft);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-meta,
.footer-links,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.hero-tags {
    margin-top: 1.3rem;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: rgba(255, 255, 255, 0.08);
    color: #f4f4f5;
    font-size: 0.82rem;
}

.hero-actions {
    margin-top: 2rem;
}

.primary-button,
.ghost-button,
.section-action,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    padding: 0.85rem 1.35rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #111827;
    box-shadow: 0 18px 40px rgba(236, 72, 153, 0.22);
}

.ghost-button,
.section-action,
.text-link {
    border: 1px solid var(--line);
    padding: 0.78rem 1.15rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.section-action:hover,
.text-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.hero-controls {
    position: absolute;
    right: max(1rem, calc((100vw - 1280px) / 2));
    bottom: 5.4rem;
    z-index: 5;
    display: flex;
    gap: 0.75rem;
}

.hero-controls button,
.hero-dot {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.46);
    color: var(--text);
    backdrop-filter: blur(10px);
}

.hero-controls button {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    font-size: 2rem;
    line-height: 1;
}

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

.hero-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    padding: 0;
}

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

.quick-search-panel,
.section,
.page-hero {
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 440px);
    gap: 1.5rem;
    align-items: center;
    margin-top: -2.5rem;
    border: 1px solid var(--line);
    border-radius: 1.5rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 8;
    backdrop-filter: blur(18px);
}

.quick-search-panel h2,
.section-head h2,
.detail-text-grid h2,
.category-panel h2 {
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.quick-search-panel p,
.section-head p,
.page-hero p,
.card-body p,
.category-panel p,
.detail-line,
.detail-text-grid p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.search-strip input {
    width: 100%;
    padding: 0.95rem 1.1rem;
}

.section {
    padding: 4rem 0 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.category-tile,
.category-panel,
.movie-card,
.compact-card,
.detail-text-grid article {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.20);
    backdrop-filter: blur(14px);
}

.category-tile {
    display: flex;
    min-height: 13rem;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 1.25rem;
    padding: 1rem;
    overflow: hidden;
}

.tile-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.tile-covers img,
.category-cover-wall img {
    aspect-ratio: 2 / 3;
    border-radius: 0.65rem;
    object-fit: cover;
}

.category-tile strong {
    font-size: 1.1rem;
}

.category-tile span {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.15rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.34);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

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

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

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

.rank-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    border-radius: 999px;
    padding: 0.32rem 0.65rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #111827;
    font-size: 0.75rem;
    font-weight: 900;
}

.card-body {
    padding: 0.9rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 700;
}

.card-body h3 {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.65rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.35;
}

.card-body p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 4.7rem;
    margin-top: 0.65rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 0.86rem;
}

.tag-row {
    margin-top: 0.75rem;
}

.tag-row span {
    padding: 0.24rem 0.55rem;
    font-size: 0.72rem;
}

.ranking-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.compact-card {
    display: grid;
    grid-template-columns: auto 4.1rem 1fr;
    gap: 0.85rem;
    align-items: center;
    border-radius: 1rem;
    padding: 0.7rem;
}

.compact-card img {
    width: 4.1rem;
    aspect-ratio: 2 / 3;
    border-radius: 0.7rem;
    object-fit: cover;
}

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

.compact-card strong {
    font-weight: 850;
}

.compact-card em {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-style: normal;
}

.list-rank {
    color: var(--brand);
    font-size: 1.2rem;
    font-weight: 900;
}

.page-hero {
    display: grid;
    min-height: 24rem;
    place-items: end start;
    border: 1px solid var(--line);
    border-radius: 0 0 1.8rem 1.8rem;
    padding: 5rem 2rem 3rem;
    background:
        radial-gradient(circle at 20% 10%, rgba(236, 72, 153, 0.32), transparent 28rem),
        radial-gradient(circle at 90% 0%, rgba(250, 204, 21, 0.18), transparent 22rem),
        linear-gradient(135deg, rgba(88, 28, 135, 0.86), rgba(17, 24, 39, 0.94));
    box-shadow: var(--shadow);
}

.small-hero {
    min-height: 18rem;
}

.ranking-hero {
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.28), transparent 30rem),
        linear-gradient(135deg, rgba(127, 29, 29, 0.88), rgba(17, 24, 39, 0.95));
}

.movie-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 12rem 10rem;
    gap: 0.85rem;
    margin-bottom: 1.4rem;
}

.movie-filter-form input,
.movie-filter-form select {
    min-height: 3rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.08);
}

.movie-filter-form select option {
    background: #111827;
    color: var(--text);
}

.empty-state {
    display: none;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.empty-state.is-visible {
    display: block;
}

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

.category-panel {
    display: grid;
    grid-template-columns: 12rem 1fr;
    gap: 1.2rem;
    border-radius: 1.2rem;
    padding: 1rem;
}

.category-cover-wall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}

.category-sample {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0;
}

.category-sample span {
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--soft);
    font-size: 0.8rem;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 33rem;
}

.detail-bg,
.detail-mask {
    position: absolute;
    inset: 0;
}

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.1);
    transform: scale(1.06);
}

.detail-mask {
    background:
        linear-gradient(90deg, rgba(5, 5, 10, 0.95), rgba(5, 5, 10, 0.58)),
        linear-gradient(0deg, var(--bg) 0%, rgba(5, 5, 10, 0.18) 100%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 2rem;
    align-items: end;
    width: min(1280px, calc(100% - 2rem));
    min-height: 33rem;
    margin: 0 auto;
    padding: 5rem 0 3rem;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1.25rem;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    gap: 0.55rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.detail-line {
    max-width: 820px;
    margin-top: 1rem;
    font-size: 1.08rem;
}

.detail-meta {
    margin-top: 1rem;
}

.detail-tags {
    margin: 1rem 0 1.5rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.4rem;
    background: #000;
    box-shadow: var(--shadow);
}

.player-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.9rem;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    display: grid;
    width: 5rem;
    height: 5rem;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #111827;
    font-size: 2.2rem;
    box-shadow: 0 20px 60px rgba(236, 72, 153, 0.28);
}

.detail-text-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.detail-text-grid article {
    border-radius: 1.25rem;
    padding: 1.35rem;
}

.detail-text-grid p {
    margin-top: 0.85rem;
    color: var(--soft);
}

.site-footer {
    margin-top: 5rem;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.28);
}

.footer-inner {
    display: grid;
    gap: 0.8rem;
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0;
}

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

.copyright {
    font-size: 0.82rem;
}

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

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

@media (max-width: 860px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav.is-open {
        position: fixed;
        top: 4.5rem;
        right: 1rem;
        left: 1rem;
        display: grid;
        gap: 0.5rem;
        border: 1px solid var(--line);
        border-radius: 1rem;
        padding: 0.85rem;
        background: rgba(5, 5, 10, 0.96);
        box-shadow: var(--shadow);
    }

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

    .quick-search-panel,
    .detail-inner,
    .category-panel,
    .detail-text-grid {
        grid-template-columns: 1fr;
    }

    .quick-search-panel {
        margin-top: 1rem;
    }

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

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

    .detail-inner {
        align-items: start;
    }

    .detail-poster {
        max-width: 13rem;
    }
}

@media (max-width: 560px) {
    .header-inner {
        width: min(100% - 1rem, 1280px);
    }

    .logo-text {
        font-size: 0.95rem;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.4rem;
        line-height: 1.05;
    }

    .hero-controls {
        display: none;
    }

    .quick-search-panel,
    .section,
    .page-hero,
    .detail-inner {
        width: min(100% - 1rem, 1280px);
    }

    .category-grid,
    .movie-grid,
    .compact-grid,
    .related-grid,
    .ranking-list {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .card-body {
        padding: 0.75rem;
    }

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

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

    .compact-card {
        grid-template-columns: 3.4rem 1fr;
    }

    .compact-card .list-rank {
        display: none;
    }

    .compact-card img {
        width: 3.4rem;
    }
}
