:root {
    --bg: #0f172a;
    --panel: rgba(30, 41, 59, 0.76);
    --panel-strong: #1e293b;
    --line: #334155;
    --text: #ffffff;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #fbbf24;
    --accent-soft: rgba(251, 191, 36, 0.18);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

body {
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 28rem),
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.10), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
}

img {
    max-width: 100%;
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(51, 65, 85, 0.82);
    backdrop-filter: blur(12px);
}

.nav-inner {
    max-width: 1280px;
    height: 4rem;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: #0f172a;
    font-size: 0.8rem;
    box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.13);
}

.brand-name {
    font-size: 1.15rem;
}

.desktop-menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link,
.mobile-nav-link {
    color: var(--soft);
    transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover {
    color: var(--text);
}

.nav-search {
    width: min(18rem, 26vw);
    position: relative;
}

.nav-search input,
.mobile-search input,
.filter-box input,
.filter-box select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(30, 41, 59, 0.88);
    color: var(--text);
    border-radius: 0.75rem;
    padding: 0.68rem 2.5rem 0.68rem 1rem;
    outline: none;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-box input:focus,
.filter-box select:focus {
    border-color: var(--accent);
}

.nav-search button {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    padding: 0.45rem 0.7rem;
}

.mobile-menu-button {
    display: none;
    color: var(--text);
    font-size: 1.4rem;
}

.mobile-menu {
    display: none;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

.mobile-menu.is-open {
    display: grid;
    gap: 0.95rem;
}

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
}

.mobile-search input {
    padding-right: 1rem;
}

.mobile-search button,
.btn,
.hero-button,
.rank-link,
.play-overlay button {
    border: 0;
    background: var(--accent);
    color: #0f172a;
    font-weight: 800;
    border-radius: 0.75rem;
    padding: 0.75rem 1.05rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.mobile-search button:hover,
.btn:hover,
.hero-button:hover,
.rank-link:hover,
.play-overlay button:hover {
    background: #fcd34d;
    transform: translateY(-1px);
}

main,
.page-shell {
    padding-top: 4rem;
}

.hero-slider {
    position: relative;
    height: min(72vh, 640px);
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.8s ease;
}

.hero-slide.is-active img {
    transform: scale(1.06);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0f172a 0%, rgba(15, 23, 42, 0.64) 48%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: max(1.5rem, calc((100vw - 1280px) / 2 + 1.25rem));
    right: 1.25rem;
    bottom: 4.2rem;
    max-width: 56rem;
    z-index: 3;
}

.hero-kicker,
.card-meta,
.detail-meta,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    color: var(--soft);
    font-size: 0.92rem;
}

.hero-kicker span:first-child,
.card-meta span:first-child,
.detail-meta span,
.tag-row span,
.year-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(251, 191, 36, 0.28);
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 1.02;
    max-width: 52rem;
    margin: 1rem 0;
    font-weight: 900;
}

.hero-content p {
    color: var(--soft);
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.75;
    max-width: 48rem;
    margin: 0 0 1.6rem;
}

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

.hero-secondary {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.58);
    border-radius: 0.75rem;
    padding: 0.75rem 1.05rem;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: max(1.5rem, calc((100vw - 1280px) / 2 + 1.25rem));
    bottom: 1.8rem;
    display: flex;
    gap: 0.55rem;
}

.hero-dot {
    width: 2.6rem;
    height: 0.22rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    border: 0;
}

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

.container,
.footer-grid,
.detail-shell {
    width: min(1280px, calc(100vw - 2rem));
    margin: 0 auto;
}

.content-section {
    padding: 3.8rem 0 0;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    font-weight: 900;
    margin: 0;
}

.section-heading p,
.page-title p,
.detail-title p {
    color: var(--muted);
    margin: 0.45rem 0 0;
    line-height: 1.75;
}

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

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

.rail-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
}

.rail-scroll::-webkit-scrollbar {
    display: none;
}

.rail-scroll .movie-card {
    width: 18rem;
    min-width: 18rem;
}

.card-link,
.wide-link,
.category-tile,
.rank-item {
    display: block;
    background: rgba(30, 41, 59, 0.58);
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 1rem;
    overflow: hidden;
    color: var(--text);
    height: 100%;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.10);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.card-link:hover,
.wide-link:hover,
.category-tile:hover,
.rank-item:hover {
    transform: translateY(-4px);
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(251, 191, 36, 0.34);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.poster-wrap img,
.wide-poster img,
.detail-poster img,
.related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-link:hover img,
.wide-link:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.poster-shade,
.play-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.16), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card-link:hover .poster-shade {
    opacity: 1;
}

.poster-summary {
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
    color: var(--text);
    font-size: 0.86rem;
    line-height: 1.55;
    transform: translateY(110%);
    transition: transform 0.25s ease;
}

.card-link:hover .poster-summary {
    transform: translateY(0);
}

.year-badge {
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    border-color: rgba(15, 23, 42, 0.72);
    background: rgba(0, 0, 0, 0.72);
    color: var(--text);
    border-radius: 0.5rem;
    padding: 0.25rem 0.52rem;
    font-size: 0.78rem;
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(251, 191, 36, 0.94);
    color: #0f172a;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card h3,
.related-card h3 {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.38;
    margin: 0.85rem 0.85rem 0.3rem;
    font-weight: 750;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p,
.related-card p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0.85rem 0.95rem;
}

.movie-card-wide .wide-link {
    display: grid;
    grid-template-columns: 11rem 1fr;
    min-height: 14rem;
}

.wide-poster {
    position: relative;
    overflow: hidden;
}

.wide-body {
    padding: 1.1rem;
}

.wide-body h3 {
    margin: 0.7rem 0 0.5rem;
    font-size: 1.18rem;
}

.wide-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.tag-row span {
    border-color: rgba(148, 163, 184, 0.24);
    color: var(--muted);
    background: rgba(15, 23, 42, 0.46);
    font-size: 0.78rem;
}

.page-title {
    padding: 7rem 0 1.4rem;
}

.filter-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 12rem;
    gap: 0.85rem;
    margin: 1.4rem 0 1.7rem;
}

.filter-box input {
    padding-right: 1rem;
}

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

.category-tile {
    padding: 1.3rem;
    min-height: 10rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.82));
}

.category-tile h2 {
    margin: 0 0 0.7rem;
    font-size: 1.35rem;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 4.2rem 5.5rem 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem;
}

.rank-no {
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 900;
    text-align: center;
}

.rank-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 0.65rem;
    object-fit: cover;
}

.rank-body h2,
.rank-body h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 850;
}

.rank-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.rank-link {
    white-space: nowrap;
}

.breadcrumbs {
    padding: 6.3rem 0 1.2rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--muted);
}

.breadcrumbs a:hover {
    color: var(--text);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(14rem, 20rem) 1fr;
    gap: 2rem;
    align-items: end;
    padding: 1rem 0 2.4rem;
}

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

.detail-title h1 {
    margin-top: 0.9rem;
}

.detail-title p {
    max-width: 54rem;
}

.detail-block,
.player-block,
.related-block {
    background: rgba(30, 41, 59, 0.58);
    border: 1px solid rgba(51, 65, 85, 0.76);
    border-radius: 1.15rem;
    padding: 1.35rem;
    margin-bottom: 1.4rem;
}

.detail-block h2,
.player-block h2,
.related-block h2 {
    margin: 0 0 0.9rem;
    font-size: 1.35rem;
    font-weight: 900;
}

.detail-block p {
    color: var(--soft);
    line-height: 1.86;
    margin: 0;
}

.player-frame {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.28);
    transition: opacity 0.2s ease;
}

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

.play-overlay button {
    width: 5.2rem;
    height: 5.2rem;
    border-radius: 999px;
    font-size: 1.45rem;
    box-shadow: 0 0 0 12px rgba(251, 191, 36, 0.13);
}

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

.related-card {
    color: var(--text);
}

.related-card figure {
    aspect-ratio: 3 / 4;
    border-radius: 0.9rem;
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(51, 65, 85, 0.72);
}

.site-footer {
    margin-top: 5rem;
    border-top: 1px solid rgba(51, 65, 85, 0.76);
    background: rgba(15, 23, 42, 0.68);
}

.footer-grid {
    padding: 3rem 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
}

.footer-grid p {
    color: var(--muted);
    line-height: 1.75;
    max-width: 34rem;
}

.footer-grid h2 {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.footer-links {
    display: grid;
    gap: 0.65rem;
}

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

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

.no-results {
    display: none;
    color: var(--muted);
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.54);
}

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

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .nav-search {
        width: min(22rem, 44vw);
    }

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

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

    .hero-slider {
        min-height: 560px;
    }

    .movie-grid,
    .movie-grid-wide,
    .category-grid,
    .detail-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-card-wide .wide-link {
        grid-template-columns: 9rem 1fr;
    }

    .rank-item {
        grid-template-columns: 3rem 4.5rem 1fr;
    }

    .rank-link {
        display: none;
    }

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

@media (max-width: 520px) {
    .nav-inner {
        padding: 0 0.9rem;
    }

    .brand-name {
        font-size: 1rem;
    }

    .hero-content {
        bottom: 4rem;
        left: 1rem;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 2.25rem;
    }

    .movie-card-wide .wide-link {
        grid-template-columns: 1fr;
    }

    .wide-poster {
        aspect-ratio: 16 / 10;
    }
}
