:root {
    color-scheme: dark;
    --page-bg: #08111f;
    --panel-bg: rgba(15, 23, 42, 0.78);
    --panel-soft: rgba(30, 41, 59, 0.58);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #eab308;
    --accent-strong: #facc15;
    --blue: #2563eb;
}

html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 34rem), linear-gradient(180deg, #0f172a 0%, #172554 48%, #020617 100%);
    min-height: 100vh;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-shell {
    min-height: 100vh;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.94));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 35px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(12px);
}

.site-nav-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fde68a;
}

.logo-mark {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #111827;
    box-shadow: 0 10px 30px rgba(234, 179, 8, 0.38);
}

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

.nav-links a,
.mobile-panel a {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0 0.95rem;
    border-radius: 0.75rem;
    color: #d1d5db;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.88);
}

.nav-toggle {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    color: #ffffff;
    background: rgba(30, 64, 175, 0.55);
}

.mobile-panel {
    display: none;
    padding: 0 0 1rem;
}

.mobile-panel.is-open {
    display: grid;
    gap: 0.5rem;
}

.container {
    width: min(80rem, calc(100% - 2rem));
    margin: 0 auto;
}

.page-pad {
    padding: 4rem 0;
}

.hero {
    position: relative;
    min-height: 34rem;
    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-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.64) 46%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.15));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3rem 0 4rem;
}

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

.hero-badge,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    background: var(--accent);
    color: #111827;
    font-weight: 800;
    padding: 0.25rem 0.8rem;
    font-size: 0.82rem;
}

.hero h1 {
    margin-top: 1rem;
    font-size: clamp(2.2rem, 6vw, 4.7rem);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.hero p {
    margin-top: 1rem;
    max-width: 48rem;
    color: #e5e7eb;
    font-size: clamp(1rem, 2vw, 1.35rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.primary-button,
.soft-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0 1.3rem;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: linear-gradient(90deg, #eab308, #facc15);
    color: #111827;
    box-shadow: 0 16px 36px rgba(234, 179, 8, 0.25);
}

.soft-button {
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.primary-button:hover,
.soft-button:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 2.8rem;
    height: 2.8rem;
    transform: translateY(-50%);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.44);
    font-size: 1.35rem;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

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

.hero-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
    font-size: clamp(1.6rem, 4vw, 2.15rem);
    font-weight: 900;
}

.section-title::before {
    content: "";
    width: 0.45rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--accent);
}

.section-lead {
    margin: -0.7rem 0 1.8rem;
    max-width: 54rem;
    color: var(--muted);
    line-height: 1.8;
}

.panel {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(30, 64, 175, 0.25));
    border: 1px solid var(--line);
    border-radius: 1.4rem;
    box-shadow: 0 20px 55px rgba(2, 6, 23, 0.28);
}

.search-panel {
    padding: 1rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 12rem 12rem;
    gap: 0.8rem;
}

.search-input,
.filter-select {
    min-height: 3rem;
    width: 100%;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.74);
    color: #ffffff;
    padding: 0 1rem;
    outline: none;
}

.search-input:focus,
.filter-select:focus {
    border-color: rgba(250, 204, 21, 0.75);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
}

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

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

.movie-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-0.45rem);
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(250, 204, 21, 0.3);
    box-shadow: 0 22px 42px rgba(234, 179, 8, 0.15);
}

.poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #020617;
}

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

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

.movie-card:hover .poster img,
.related-card:hover img,
.rank-card:hover img {
    transform: scale(1.08);
}

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 48%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster::after {
    opacity: 1;
}

.poster-meta {
    position: absolute;
    right: 0.6rem;
    top: 0.6rem;
    z-index: 2;
    border-radius: 0.45rem;
    background: rgba(0, 0, 0, 0.62);
    color: #ffffff;
    padding: 0.18rem 0.5rem;
    font-size: 0.75rem;
}

.card-body {
    padding: 1rem;
}

.card-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover .card-title,
.related-card:hover .related-title,
.rank-card:hover .rank-title {
    color: var(--accent-strong);
}

.card-desc {
    margin-top: 0.55rem;
    min-height: 2.8rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
    color: #94a3b8;
    font-size: 0.78rem;
}

.card-meta span,
.detail-meta span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
    padding: 0.25rem 0.65rem;
}

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

.category-card {
    display: flex;
    min-height: 10rem;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.15rem;
    color: #ffffff;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.64), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-0.35rem);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.28);
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 900;
}

.category-card p {
    margin-top: 0.75rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.65;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 7.2rem minmax(0, 1fr);
    gap: 1rem;
    overflow: hidden;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 0.7rem;
}

.rank-poster {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 0.75rem;
}

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

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    margin-bottom: 0.45rem;
    border-radius: 999px;
    background: var(--accent);
    color: #111827;
    font-weight: 900;
}

.rank-title,
.related-title {
    color: #ffffff;
    font-weight: 800;
    line-height: 1.4;
}

.rank-desc {
    color: var(--muted);
    margin-top: 0.45rem;
    font-size: 0.9rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 1.5rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1.2rem;
    background: #000000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(15, 23, 42, 0.04));
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

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

.play-button {
    width: 5.2rem;
    height: 5.2rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 204, 21, 0.93);
    color: #111827;
    font-size: 2rem;
    box-shadow: 0 16px 40px rgba(250, 204, 21, 0.34);
    transition: transform 0.2s ease;
}

.play-overlay:hover .play-button {
    transform: scale(1.06);
}

.detail-card {
    padding: 1.4rem;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1.2rem;
}

.detail-card h1 {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    line-height: 1.18;
    font-weight: 900;
}

.detail-section {
    margin-top: 1.3rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.detail-section h2 {
    margin-bottom: 0.65rem;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
}

.detail-section p {
    color: #d1d5db;
    line-height: 1.85;
    white-space: pre-line;
}

.related-list {
    display: grid;
    gap: 0.8rem;
}

.related-card {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    overflow: hidden;
    padding: 0.55rem;
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.related-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 0.7rem;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.related-card p {
    color: #94a3b8;
    font-size: 0.82rem;
    margin-top: 0.35rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.3rem;
    color: #94a3b8;
    font-size: 0.92rem;
}

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

.no-results {
    display: none;
    padding: 2rem;
    text-align: center;
    color: #cbd5e1;
}

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

.footer {
    margin-top: 3rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), #020617);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem 0;
    color: #94a3b8;
}

.footer h2,
.footer h3 {
    color: #ffffff;
    font-weight: 900;
    margin-bottom: 0.75rem;
}

.footer p,
.footer a {
    color: #94a3b8;
    line-height: 1.75;
}

.footer a:hover {
    color: #facc15;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 1.2rem 0;
    color: #64748b;
    text-align: center;
    font-size: 0.88rem;
}

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

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

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

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

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        min-height: 31rem;
    }

    .hero-content {
        padding: 2.25rem 0 4rem;
    }

    .hero-control {
        display: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

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

    .card-body {
        padding: 0.8rem;
    }

    .rank-list {
        grid-template-columns: 1fr;
    }

    .rank-card,
    .related-card {
        grid-template-columns: 6rem minmax(0, 1fr);
    }

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

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