* {
    box-sizing: border-box;
}

:root {
    --bg: #07090c;
    --bg-soft: #0b1018;
    --panel: #12171e;
    --panel-strong: #1d2530;
    --panel-glass: rgba(18, 23, 30, 0.74);
    --line: rgba(255, 255, 255, 0.08);
    --text: #f8fafc;
    --muted: #9ca3af;
    --muted-strong: #cbd5e1;
    --accent: #e6a800;
    --accent-bright: #ffc61a;
    --primary: #0056e0;
    --primary-strong: #0043ad;
    --danger: #ff5353;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 12% 12%, rgba(0, 86, 224, 0.22), transparent 28rem),
        radial-gradient(circle at 88% 8%, rgba(230, 168, 0, 0.16), transparent 26rem),
        linear-gradient(180deg, var(--bg) 0%, #0a0f16 48%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 9, 12, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.nav-shell {
    width: min(1280px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 32px rgba(230, 168, 0, 0.22);
}

.brand-name {
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 600;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.text-link:hover,
.section-head a:hover {
    color: var(--accent-bright);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-nav a {
    padding: 12px;
    border-radius: 12px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.03);
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--bg-soft);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1000ms ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.05);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 9, 12, 0.92) 0%, rgba(7, 9, 12, 0.66) 48%, rgba(7, 9, 12, 0.26) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(7, 9, 12, 0.72) 28%, transparent 74%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: end;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    padding-bottom: 86px;
}

.hero-copy {
    max-width: 780px;
    animation: slideUp 650ms ease both;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    background: rgba(230, 168, 0, 0.82);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-line {
    max-width: 780px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.8;
}

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

.hero-actions.slim {
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    box-shadow: 0 14px 34px rgba(0, 86, 224, 0.32);
}

.btn.ghost {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(18, 23, 30, 0.72);
    backdrop-filter: blur(8px);
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.42);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.active {
    width: 48px;
    background: var(--accent-bright);
}

.home-search {
    width: min(1280px, calc(100% - 32px));
    margin: -32px auto 0;
    position: relative;
    z-index: 6;
}

.home-search-inner,
.filter-panel {
    border: 1px solid rgba(230, 168, 0, 0.2);
    border-radius: 22px;
    background: rgba(18, 23, 30, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
}

.home-search span {
    color: var(--accent-bright);
    font-weight: 800;
}

.home-search input,
.filter-row input,
.filter-row select {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(7, 9, 12, 0.7);
    padding: 0 14px;
    outline: none;
}

.home-search a,
.filter-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    background: var(--primary);
}

.content-section,
.split-section,
.category-page-grid,
.detail-main,
.page-main {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.content-section {
    padding: 80px 0 0;
}

.content-section.flush {
    padding-top: 30px;
}

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

.section-head.compact {
    margin-bottom: 18px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--accent-bright);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-head h2,
.filter-panel h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    letter-spacing: -0.03em;
}

.section-head a,
.text-link {
    color: var(--muted-strong);
    font-weight: 800;
}

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

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.24);
}

.movie-cover img,
.side-cover img,
.category-tile img,
.category-page-cover img,
.detail-poster img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-cover img,
.side-cover img,
.category-tile img {
    transition: transform 340ms ease;
}

.movie-card:hover .movie-cover img,
.side-card:hover .side-cover img,
.category-tile:hover img {
    transform: scale(1.08);
}

.cover-shade,
.category-tile span,
.category-page-cover span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 64%);
}

.card-duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.card-duration {
    right: 10px;
    bottom: 10px;
    padding: 4px 9px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--danger));
}

.movie-info {
    padding: 12px 2px 0;
}

.movie-title,
.side-title {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-title:hover,
.side-title:hover {
    color: var(--accent-bright);
}

.movie-line,
.side-copy p {
    display: -webkit-box;
    margin: 8px 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.side-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-meta span,
.detail-meta span {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile strong {
    bottom: 62px;
    font-size: 22px;
}

.category-tile em {
    bottom: 18px;
    color: var(--muted-strong);
    font-size: 13px;
    font-style: normal;
    line-height: 1.5;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    padding-top: 80px;
}

.panel-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-glass);
    box-shadow: var(--shadow);
    padding: 24px;
}

.panel-card.wide {
    min-width: 0;
}

.side-list {
    display: grid;
    gap: 16px;
}

.side-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.side-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: var(--bg-soft);
}

.side-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--danger));
}

.page-main {
    padding-top: 52px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(0, 86, 224, 0.26), rgba(230, 168, 0, 0.16)),
        var(--panel);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin-bottom: 14px;
}

.category-page-grid {
    display: grid;
    gap: 22px;
    padding: 42px 0 0;
}

.category-page-card {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel-glass);
}

.category-page-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
}

.category-page-card h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.category-page-card p {
    margin: 0 0 14px;
    color: var(--muted-strong);
    line-height: 1.8;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.category-samples a {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.06);
}

.filter-panel {
    margin-top: 32px;
    padding: 22px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 0.6fr)) auto;
    gap: 12px;
}

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

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

.top-ranking {
    grid-template-columns: minmax(0, 1fr) 360px;
    padding-top: 36px;
}

.sticky-aside {
    position: sticky;
    top: 88px;
    height: max-content;
}

.detail-main {
    padding-top: 34px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 22px;
}

.crumbs a:hover {
    color: var(--accent-bright);
}

.detail-head {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(0, 86, 224, 0.18), rgba(230, 168, 0, 0.12)),
        var(--panel-glass);
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 24px;
    background: var(--bg-soft);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.34);
}

.detail-copy h1 {
    margin-top: 10px;
}

.detail-meta {
    margin: 18px 0;
}

.player-section {
    padding-top: 34px;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 0;
    border: 0;
    color: #ffffff;
    background: #000000;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

.player-cover.hidden {
    display: none;
}

.play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 88px;
    height: 88px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 34px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    box-shadow: 0 20px 48px rgba(0, 86, 224, 0.34);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-top: 34px;
}

.detail-content article {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel-glass);
    padding: 26px;
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-content p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 2;
}

.rich-tags span:nth-child(odd) {
    background: rgba(0, 86, 224, 0.72);
}

.related-section {
    padding-bottom: 80px;
}

.site-footer {
    margin-top: 86px;
    border-top: 1px solid var(--line);
    background: rgba(7, 9, 12, 0.76);
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 0.6fr;
    gap: 40px;
}

.footer-brand {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    font-size: 16px;
}

.site-footer a:not(.brand) {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.is-hidden {
    display: none !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .top-ranking {
        grid-template-columns: 1fr;
    }

    .sticky-aside {
        position: static;
    }
}

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

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

    .hero {
        min-height: 610px;
    }

    .hero-content {
        padding-bottom: 72px;
    }

    .hero-control {
        display: none;
    }

    .home-search-inner,
    .filter-row,
    .split-section,
    .detail-head,
    .footer-grid,
    .category-page-card {
        grid-template-columns: 1fr;
    }

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

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

    .side-card {
        grid-template-columns: 128px minmax(0, 1fr);
    }

    .page-hero {
        padding: 34px;
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .mobile-nav,
    .content-section,
    .split-section,
    .category-page-grid,
    .detail-main,
    .page-main,
    .footer-grid,
    .footer-bottom,
    .home-search {
        width: min(100% - 24px, 1280px);
    }

    .brand-name {
        font-size: 18px;
    }

    .hero {
        height: 74vh;
        min-height: 560px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

    .content-section,
    .split-section {
        padding-top: 58px;
    }

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

    .category-tile {
        min-height: 190px;
    }

    .side-card {
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 12px;
    }

    .panel-card,
    .detail-head,
    .detail-content article,
    .filter-panel {
        padding: 18px;
    }

    .play-icon {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
