:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: #0f172a;
    --line: rgba(30, 64, 175, 0.35);
    --line-soft: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --amber-soft: #fbbf24;
    --blue: #2563eb;
    --cyan: #0891b2;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.58);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 10% -10%, rgba(37, 99, 235, 0.28), transparent 28rem),
        radial-gradient(circle at 90% 5%, rgba(8, 145, 178, 0.20), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 40%, #020617 100%);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 70%);
    z-index: -1;
}

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    color: #0f172a;
    background: linear-gradient(135deg, var(--amber), #facc15);
    box-shadow: 0 16px 45px rgba(245, 158, 11, 0.25);
    font-size: 16px;
}

.brand strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand em {
    display: block;
    margin-top: 2px;
    color: #93c5fd;
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-soft);
    transform: translateY(-1px);
}

.nav-link-soft {
    color: #bfdbfe;
    font-size: 14px;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #f8fafc;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid var(--line-soft);
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    color: #dbeafe;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.2s ease;
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide::before,
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
}

.hero-slide::before {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.25) 100%);
}

.hero-slide::after {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.74) 30%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    min-height: 72vh;
    padding: 108px 0 72px;
}

.hero-copy {
    max-width: 700px;
}

.eyebrow,
.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--amber-soft);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(34px, 7vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
    max-width: 660px;
    margin: 20px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn,
.section-more,
.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--amber), #facc15);
    color: #0f172a;
    box-shadow: 0 18px 50px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.68);
    border-color: var(--line);
}

.btn:hover,
.section-more:hover,
.filter-btn:hover {
    transform: translateY(-2px);
}

.hero-chips,
.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hero-chips span,
.card-tags span,
.detail-tags span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(147, 197, 253, 0.22);
    color: #bfdbfe;
    font-size: 13px;
}

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

.hero-dot {
    width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.42);
    cursor: pointer;
}

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

.quick-search {
    position: relative;
    z-index: 4;
    margin-top: -36px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel input,
.search-panel select,
.filter-input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    outline: none;
    background: rgba(2, 6, 23, 0.72);
    color: #f8fafc;
}

.search-panel input:focus,
.search-panel select:focus,
.filter-input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.section-block {
    padding: 64px 0 18px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-title > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title span {
    color: var(--amber-soft);
    font-size: 24px;
}

.section-title h2,
.section-title h1,
.panel h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.2;
}

.section-more {
    color: #f8fafc;
    border-color: var(--line);
    background: rgba(30, 41, 59, 0.72);
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.28);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 22px 64px rgba(37, 99, 235, 0.24);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
}

.poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.26), transparent 38%), linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.38));
    opacity: 0.72;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster::before {
    opacity: 0.38;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.85), transparent 48%);
}

.poster-badge,
.poster-year {
    position: absolute;
    top: 10px;
    max-width: calc(100% - 20px);
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.74);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 10px;
}

.poster-year {
    right: 10px;
    color: #0f172a;
    background: rgba(251, 191, 36, 0.92);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: rgba(245, 158, 11, 0.92);
    color: #0f172a;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.card-content strong {
    display: -webkit-box;
    overflow: hidden;
    color: #f8fafc;
    font-size: 17px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    color: #93c5fd;
    font-size: 13px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 24px;
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.82));
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -52px;
    bottom: -52px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.18);
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--amber);
    box-shadow: 0 20px 62px rgba(37, 99, 235, 0.22);
}

.category-icon {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 14px;
    font-size: 42px;
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #cbd5e1;
    line-height: 1.65;
}

.page-hero {
    padding: 70px 0 34px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.18)),
        radial-gradient(circle at 90% 0%, rgba(245, 158, 11, 0.22), transparent 22rem);
    border-bottom: 1px solid var(--line);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    margin: 28px 0 0;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-btn {
    min-height: 38px;
    padding: 0 14px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.76);
    border-color: var(--line-soft);
}

.filter-btn.is-active {
    color: #0f172a;
    background: var(--amber-soft);
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 54px 110px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(3px);
    border-color: rgba(245, 158, 11, 0.68);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.25);
    color: #bfdbfe;
    font-weight: 900;
}

.rank-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
}

.rank-title strong {
    display: block;
    margin-bottom: 5px;
    font-size: 17px;
}

.rank-title span,
.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

.panel {
    padding: 28px;
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 34px 0 68px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.video-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--amber), #facc15);
    color: #0f172a;
    box-shadow: 0 18px 58px rgba(245, 158, 11, 0.28);
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-button span {
    margin-left: 5px;
    font-size: 34px;
}

.player-button:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.player-button.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.detail-title {
    padding: 26px 0 4px;
}

.detail-title h1 {
    font-size: clamp(30px, 5vw, 48px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    color: #bfdbfe;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.68);
    border: 1px solid var(--line-soft);
}

.article-block {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.article-block h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.article-block p {
    margin: 0;
    color: #dbeafe;
    font-size: 16px;
    line-height: 1.9;
}

.side-card {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 14px;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-item {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.34);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
    transform: translateX(2px);
    border-color: var(--amber);
}

.related-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
}

.related-item strong {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-item span {
    color: var(--muted);
    font-size: 12px;
}

.empty-state {
    display: none;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 22px;
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 48px 0;
}

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

.site-footer p,
.site-footer li {
    color: var(--muted);
    line-height: 1.75;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: var(--amber-soft);
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: #64748b;
    border-top: 1px solid var(--line-soft);
}

.footer-bottom p {
    margin: 0;
}

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

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

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

    .side-card {
        position: static;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 650px;
    }

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

    .rank-item {
        grid-template-columns: 42px 90px 1fr;
    }

    .rank-meta {
        display: none;
    }

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .hero h1,
    .hero h2,
    .page-hero h1 {
        font-size: 34px;
    }

    .hero p,
    .page-hero p {
        font-size: 15px;
    }

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

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

    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .related-item {
        grid-template-columns: 100px 1fr;
    }
}
