:root {
    color-scheme: dark;
    --site-bg: #020617;
    --panel: #0f172a;
    --panel-soft: #1e293b;
    --line: #334155;
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --yellow: #eab308;
    --radius: 1rem;
}

html {
    scroll-behavior: smooth;
}

body.site-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.18), transparent 34rem),
        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;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(51, 65, 85, 0.9);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 5rem;
    gap: 1rem;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.28);
}

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

.brand-copy strong {
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand-copy small {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.65rem 1rem;
    border-radius: 0.75rem;
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(51, 65, 85, 0.9);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-search input,
.mobile-nav input,
.filter-controls input,
.filter-controls select {
    border: 1px solid #475569;
    border-radius: 0.8rem;
    background: rgba(30, 41, 59, 0.96);
    color: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 16rem;
    padding: 0.65rem 0.9rem;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.22);
}

.header-search button,
.mobile-nav button {
    padding: 0.65rem 0.9rem;
    border-radius: 0.8rem;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    color: #fff;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    padding: 0.55rem 0.8rem;
    border-radius: 0.75rem;
    background: rgba(30, 41, 59, 0.92);
    color: #fff;
}

.mobile-nav {
    display: none;
    padding: 1rem 0 1.25rem;
    border-top: 1px solid rgba(51, 65, 85, 0.78);
}

.mobile-nav.is-open {
    display: grid;
    gap: 0.65rem;
}

.mobile-nav a,
.mobile-nav form {
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.65);
    color: #cbd5e1;
}

.mobile-nav form {
    display: flex;
    gap: 0.5rem;
}

.mobile-nav input {
    flex: 1;
    padding: 0.65rem 0.8rem;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 45%, rgba(6, 182, 212, 0.18), transparent 22rem),
        linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    height: 100%;
}

.hero-copy {
    max-width: 44rem;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.4rem;
    padding: 0.55rem 1rem;
    border: 1px solid rgba(6, 182, 212, 0.28);
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.16);
    color: #22d3ee;
    font-size: 0.9rem;
    font-weight: 800;
    backdrop-filter: blur(7px);
}

.hero-copy h1,
.page-hero h1 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
    max-width: 45rem;
    color: #cbd5e1;
    font-size: 1.15rem;
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 1.4rem 0 2rem;
}

.hero-meta span {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.72);
    color: #e2e8f0;
    font-weight: 700;
}

.hero-actions,
.center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.75rem 1.35rem;
    border-radius: 0.8rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    color: #fff;
    box-shadow: 0 16px 40px rgba(6, 182, 212, 0.25);
}

.ghost-btn {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
}

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

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

.hero-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    background: #475569;
    transition: all 0.25s ease;
}

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

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

.section-heading h2 {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.section-heading h2 span {
    display: inline-block;
    width: 0.5rem;
    height: 2.1rem;
    margin-right: 1rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--cyan), var(--blue));
}

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

.panel-section {
    padding: 2rem;
    border: 1px solid rgba(51, 65, 85, 0.78);
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92));
}

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

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

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.88);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card-link:hover {
    transform: translateY(-4px) scale(1.015);
    border-color: rgba(6, 182, 212, 0.85);
    box-shadow: 0 22px 45px rgba(2, 6, 23, 0.45);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

.poster-frame img,
.compact-card img,
.rank-row img,
.category-thumb-grid img,
.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-frame img {
    transition: transform 0.5s ease;
}

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

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

.rating-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.3rem 0.52rem;
    border-radius: 0.45rem;
    background: var(--yellow);
    color: #111827;
    font-size: 0.8rem;
    font-weight: 900;
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    background: var(--cyan);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: all 0.25s ease;
}

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

.card-body {
    display: grid;
    gap: 0.45rem;
    padding: 0.95rem;
}

.card-body strong {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body em,
.card-body span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-style: normal;
    line-height: 1.5;
}

.category-stack {
    display: grid;
    gap: 2rem;
}

.category-preview {
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
}

.category-preview:last-child {
    border-bottom: 0;
}

.preview-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.preview-title h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
}

.preview-title a {
    color: #22d3ee;
    font-size: 0.95rem;
    font-weight: 700;
}

.rank-list {
    display: grid;
    gap: 0.9rem;
}

.rank-row a {
    display: grid;
    grid-template-columns: auto 6rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.86);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.rank-row a:hover {
    transform: translateX(0.25rem);
    border-color: rgba(6, 182, 212, 0.7);
    background: rgba(51, 65, 85, 0.88);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    font-weight: 900;
}

.rank-row img {
    aspect-ratio: 16 / 10;
    border-radius: 0.75rem;
}

.rank-info {
    display: grid;
    min-width: 0;
    gap: 0.3rem;
}

.rank-info strong {
    overflow: hidden;
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-info em,
.rank-info small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.85rem;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-score {
    color: #facc15;
    font-weight: 900;
}

.center-actions {
    justify-content: center;
    margin-top: 2rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    color: #22d3ee;
}

.breadcrumb strong {
    color: #e2e8f0;
}

.page-hero {
    margin-bottom: 2rem;
    padding: clamp(2rem, 6vw, 4rem);
    border: 1px solid rgba(6, 182, 212, 0.18);
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.84));
}

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

.category-card a {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    min-height: 12rem;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.78);
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.92);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card a:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.76);
}

.category-thumb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(2, 6, 23, 0.6);
}

.category-thumb-grid img {
    min-height: 0;
    border-radius: 0.55rem;
}

.category-card-body {
    display: grid;
    align-content: center;
    gap: 0.65rem;
    padding: 1.5rem;
}

.category-card-body strong {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 900;
}

.category-card-body em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.65;
}

.category-card-body span {
    color: #22d3ee;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    gap: 1.5rem;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 1.1rem;
    background: rgba(15, 23, 42, 0.85);
}

.filter-controls input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1rem;
}

.filter-controls select {
    width: 12rem;
    padding: 0.85rem 1rem;
}

.empty-state {
    padding: 2rem;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 1rem;
    color: var(--muted);
    text-align: center;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.8fr);
    gap: 2rem;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 1.5rem;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.75);
    border-radius: 1.25rem;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-cover-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(6, 182, 212, 0.24), rgba(0, 0, 0, 0.72)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.88));
}

.player-start {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    font-size: 2.1rem;
    box-shadow: 0 20px 55px rgba(6, 182, 212, 0.38);
    transform: translateX(0.12rem);
}

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

.detail-panel,
.side-card {
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.94);
}

.detail-panel {
    padding: clamp(1.2rem, 4vw, 2rem);
}

.detail-panel h1 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.72);
    color: #cbd5e1;
}

.detail-meta span {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.88);
}

.score-pill {
    background: linear-gradient(90deg, #eab308, #f97316) !important;
    color: #fff;
    font-weight: 900;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.8rem;
}

.tag-cloud a {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.14);
    color: #67e8f9;
    font-size: 0.88rem;
}

.text-block {
    margin-top: 1.6rem;
}

.text-block h2,
.side-card h2 {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 900;
}

.text-block h2::before,
.side-card h2::before {
    content: "";
    display: inline-block;
    width: 0.28rem;
    height: 1.35rem;
    margin-right: 0.65rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.text-block p {
    color: #cbd5e1;
    line-height: 1.9;
}

.detail-side {
    position: sticky;
    top: 6.5rem;
    display: grid;
    gap: 1rem;
}

.side-card {
    padding: 1.25rem;
}

.side-card dl {
    display: grid;
    gap: 0;
}

.side-card dt,
.side-card dd {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.58);
}

.side-card dt {
    float: left;
    color: var(--muted);
}

.side-card dd {
    margin-left: 5rem;
    color: #fff;
    text-align: right;
}

.side-card dd a {
    color: #22d3ee;
}

.side-card dt:last-of-type,
.side-card dd:last-of-type {
    border-bottom: 0;
}

.side-poster {
    overflow: hidden;
    padding: 0;
}

.side-poster img {
    aspect-ratio: 3 / 4;
}

.related-section {
    margin-top: 3rem;
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(30, 41, 59, 0.9);
    background: linear-gradient(180deg, #0f172a, #020617);
    color: #cbd5e1;
}

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

.footer-grid h2 {
    margin-bottom: 0.9rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
}

.footer-grid p,
.footer-grid a {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

.footer-grid a:hover {
    color: #22d3ee;
}

.footer-grid ul {
    display: grid;
    gap: 0.45rem;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(51, 65, 85, 0.65);
    color: #64748b;
    text-align: center;
    font-size: 0.9rem;
}

[hidden] {
    display: none !important;
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

@media (min-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

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

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

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 767px) {
    .header-row {
        min-height: 4.25rem;
    }

    .brand-copy small {
        display: none;
    }

    .hero-carousel {
        height: auto;
        min-height: 560px;
    }

    .hero-slide img {
        opacity: 0.62;
    }

    .hero-layer {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.96));
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 6rem;
    }

    .section-heading {
        display: grid;
        align-items: start;
    }

    .panel-section,
    .page-hero {
        padding: 1.25rem;
        border-radius: 1rem;
    }

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

    .category-thumb-grid {
        min-height: 12rem;
    }

    .filter-controls {
        display: grid;
    }

    .filter-controls select {
        width: 100%;
    }

    .rank-row a {
        grid-template-columns: auto 4.5rem minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
    }

    .rank-info small {
        display: none;
    }

    .hero-actions,
    .center-actions {
        align-items: stretch;
    }

    .primary-btn,
    .ghost-btn {
        flex: 1 1 100%;
    }
}
