:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.95);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --amber: #f59e0b;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.25), transparent 34rem),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.header-inner {
    max-width: 1280px;
    height: 70px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
}

.brand-text strong,
.footer-logo {
    display: block;
    font-size: 22px;
    font-weight: 850;
    letter-spacing: 0.03em;
}

.brand-text em {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link,
.search-toggle,
.mobile-toggle {
    color: #cbd5e1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.search-toggle:hover,
.mobile-toggle:hover {
    color: var(--cyan);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    padding: 10px;
    margin-top: 14px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-link,
.mobile-sub-link,
.mobile-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
}

.dropdown-link:hover,
.mobile-sub-link:hover,
.mobile-link:hover {
    color: var(--cyan);
    background: rgba(148, 163, 184, 0.12);
}

.mobile-toggle {
    display: none;
    font-size: 26px;
}

.header-search {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: none;
}

.header-search.open {
    display: block;
    padding-bottom: 18px;
}

.search-form,
.inline-filter,
.local-filter {
    display: flex;
    gap: 12px;
}

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

.search-form input:focus,
.inline-filter input:focus,
.local-filter input:focus,
.local-filter select:focus {
    border-color: rgba(34, 211, 238, 0.8);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.search-form button,
.inline-filter button {
    min-width: 110px;
    border-radius: 16px;
    color: #00111a;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 12px 24px 20px;
}

.mobile-panel.open {
    display: block;
}

.mobile-sub-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-backdrop::before,
.detail-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.84) 42%, rgba(2, 6, 23, 0.34) 100%),
        linear-gradient(0deg, #020617 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding: 90px 0 160px;
}

.hero-kicker,
.movie-meta-row,
.detail-meta,
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-kicker span,
.hero-meta span,
.detail-meta span,
.movie-meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.22);
    border: 1px solid rgba(34, 211, 238, 0.25);
}

.hero-kicker span:first-child {
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
}

.hero-content h1,
.inner-hero h1,
.detail-info h1 {
    margin: 18px 0;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 0.96;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-content p,
.inner-hero p,
.detail-one-line {
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags a {
    padding: 7px 11px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    font-size: 13px;
}

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

.primary-button,
.secondary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 12px 34px rgba(34, 211, 238, 0.25);
}

.secondary-button,
.ghost-button,
.text-link {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.text-link:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.55);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 120px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 18px;
    transform: translateX(-50%);
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: white;
    font-size: 28px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
}

.hero-dots {
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.35);
}

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

.hero-feature-strip {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 3;
    width: min(1180px, calc(100% - 48px));
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    transform: translateX(-50%);
}

.section-wrap {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 74px 0 0;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading span,
.inner-hero span {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--cyan);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
}

.section-heading h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

.split-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.split-heading > a,
.category-showcase-head > a {
    color: var(--cyan);
    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));
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    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 22px 54px rgba(0, 0, 0, 0.35);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

.poster-link img,
.mini-card img,
.category-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.mini-card:hover img,
.category-overview-card:hover .category-cover img {
    transform: scale(1.05);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    color: #00111a;
    background: var(--cyan);
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.movie-meta-row {
    gap: 6px;
    font-size: 12px;
}

.movie-meta-row span {
    min-height: 24px;
    padding: 0 8px;
}

.movie-card h2 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 850;
}

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

.movie-card p {
    min-height: 4.9em;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-grid,
.ranking-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mini-grid.small {
    grid-template-columns: 1fr;
}

.mini-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
    overflow: hidden;
}

.mini-card img {
    width: 72px;
    height: 96px;
    border-radius: 12px;
}

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

.mini-info strong {
    font-weight: 850;
    line-height: 1.35;
}

.mini-info em {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.mini-rank {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: 7px;
    border-radius: 999px;
    color: #00111a;
    font-weight: 900;
    background: var(--cyan);
}

.search-panel,
.category-showcase-card,
.content-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: var(--shadow);
}

.global-search-results {
    display: none;
    margin-top: 12px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.94);
    overflow: hidden;
}

.global-search-results.open {
    display: grid;
}

.search-result {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
}

.search-result:last-child {
    border-bottom: none;
}

.search-result img {
    width: 52px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
}

.search-result strong,
.search-result span {
    display: block;
}

.search-result span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.category-showcase-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.category-showcase-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.category-showcase-head h2,
.category-overview-body h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 900;
}

.category-showcase-head p,
.category-overview-body p {
    color: var(--muted);
    line-height: 1.7;
}

.inner-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.2), transparent 36rem), rgba(2, 6, 23, 0.92);
    border-bottom: 1px solid var(--line);
}

.inner-hero > div {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 70px 0;
}

.inner-hero h1 {
    max-width: 900px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.66);
}

.category-cover {
    position: relative;
    min-height: 300px;
    border-radius: 18px;
    overflow: hidden;
}

.category-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 60%);
}

.category-cover span {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    font-size: 24px;
    font-weight: 900;
}

.local-filter {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
}

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

.empty-state {
    display: none;
    padding: 40px;
    text-align: center;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.66);
}

.empty-state.open {
    display: block;
}

.detail-hero {
    min-height: 620px;
}

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

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(1px) saturate(1.05);
}

.detail-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 54px 0 74px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    color: #cbd5e1;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    max-width: 860px;
}

.detail-meta {
    margin-top: 22px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: white;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.28));
    cursor: pointer;
}

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

.play-circle {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #00111a;
    font-size: 34px;
    background: var(--cyan);
    box-shadow: 0 0 48px rgba(34, 211, 238, 0.42);
}

.player-overlay strong {
    font-size: clamp(20px, 3vw, 36px);
    font-weight: 900;
}

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

.content-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
    font-weight: 900;
}

.content-card p {
    color: #cbd5e1;
    line-height: 1.9;
}

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

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

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

.footer-brand p,
.footer-links a,
.footer-bottom {
    color: var(--muted);
}

.footer-brand p {
    max-width: 520px;
    margin-top: 14px;
    line-height: 1.75;
}

.footer-links h2 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 850;
}

.footer-links a {
    display: block;
    margin-top: 9px;
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px 0 34px;
    border-top: 1px solid var(--line);
}

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

    .hero-feature-strip,
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-overview-grid,
    .category-showcase-grid,
    .article-section {
        grid-template-columns: 1fr;
    }

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-shell {
        min-height: 920px;
    }

    .hero-content {
        width: calc(100% - 40px);
        margin: 0 20px;
        padding: 70px 0 350px;
    }

    .hero-controls {
        bottom: 260px;
    }

    .hero-feature-strip {
        grid-template-columns: 1fr;
        bottom: 24px;
    }

    .movie-grid,
    .category-grid,
    .ranking-grid,
    .mini-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .section-wrap,
    .inner-hero > div,
    .detail-content,
    .footer-inner,
    .footer-bottom {
        width: calc(100% - 32px);
    }

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

    .local-filter,
    .search-form,
    .inline-filter {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .category-overview-card,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 520px) {
    .brand-text em {
        display: none;
    }

    .hero-content h1,
    .inner-hero h1,
    .detail-info h1 {
        font-size: 38px;
    }

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

    .category-cover {
        min-height: 240px;
    }

    .player-frame {
        border-radius: 18px;
    }
}
