:root {
    --bg: #160f18;
    --bg-2: #1d1422;
    --card: #221829;
    --line: rgba(255,255,255,.08);
    --text: #f3eef7;
    --muted: #a899b4;
    --accent: #e85d9c;
    --accent-2: #ff8fb8;
    --gold: #f0c36a;
    --kp: #ff6a00;
    --imdb: #f5c518;
    --radius: 16px;
    --font: "Manrope", system-ui, sans-serif;
    --display: "Oswald", Impact, sans-serif;
    --shadow: 0 20px 60px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(900px 420px at 10% -10%, rgba(232,93,156,.18), transparent 55%),
        radial-gradient(700px 380px at 100% 0%, rgba(240,195,106,.08), transparent 50%),
        linear-gradient(180deg, #1a1220 0%, var(--bg) 35%, #100b12 100%);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.wrap { min-height: 100vh; display: flex; flex-direction: column; }
.content { flex: 1; width: min(1280px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 50px; }

/* Header */
.header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 18px;
    padding: 14px 22px;
    background: rgba(18, 12, 22, .9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.logo {
    font-family: var(--display);
    font-size: 1.85rem;
    letter-spacing: .04em;
    white-space: nowrap;
    text-transform: none;
}
.logo span { color: var(--accent); }

.nav { flex: 1; display: flex; justify-content: center; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; align-items: center; }
.nav__item { position: relative; }
.nav__link {
    display: inline-flex; align-items: center;
    padding: 10px 12px; border: 0; background: transparent; color: var(--muted);
    font-weight: 700; cursor: pointer; border-radius: 10px;
}
.nav__link:hover, .nav__item:hover > .nav__link { color: var(--text); background: rgba(255,255,255,.04); }

.mega {
    position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-30%);
    display: none; gap: 8px;
    min-width: 640px; padding: 16px;
    background: #1b1322; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow);
}
.nav__item:hover .mega, .nav__item:focus-within .mega { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); }
.mega__col { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; }
.mega__col a {
    display: block; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 600;
}
.mega__col a:hover { background: rgba(232,93,156,.12); color: var(--text); }
.mega__head { padding: 8px 10px 4px; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.search {
    display: flex; align-items: center; gap: 8px;
    min-width: min(340px, 34vw);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 6px 5px 16px;
}
.search input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text);
}
.search button {
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #b83474);
    color: #fff; cursor: pointer; font-size: 1.05rem;
}
.burger {
    display: none; width: 42px; height: 42px; border-radius: 12px;
    border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
}
.mobile-nav {
    display: none; flex-direction: column; gap: 4px; padding: 12px 16px 16px;
    background: #1b1322; border-bottom: 1px solid var(--line);
}
.mobile-nav a { padding: 12px; border-radius: 10px; color: var(--muted); font-weight: 700; }
.mobile-nav a:hover { background: rgba(255,255,255,.04); color: #fff; }
.mobile-nav__sub { padding-left: 22px !important; font-size: .9rem; font-weight: 600 !important; opacity: .85; }

/* Hero */
.hero {
    position: relative; overflow: hidden;
    border-radius: 24px; margin-bottom: 28px;
    min-height: 300px;
    display: grid; align-items: end;
    padding: 38px;
    background:
        linear-gradient(120deg, rgba(22,15,24,.2), rgba(22,15,24,.75)),
        radial-gradient(800px 300px at 80% 20%, rgba(232,93,156,.25), transparent 60%),
        linear-gradient(135deg, #2a1830, #160f18 55%, #24101f);
    background-size: cover;
    background-position: center top;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: rise .55s ease both;
    transition: background-image .45s ease;
}
.hero h1 {
    margin: 0 0 10px;
    font-family: var(--display);
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: .95;
    letter-spacing: .03em;
    max-width: 14ch;
}
.hero p { margin: 0; max-width: 52ch; color: #d8c9e0; line-height: 1.6; font-size: 1.05rem; }

/* Sections */
.sect { margin-bottom: 34px; animation: rise .5s ease both; }
.sect__header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-bottom: 16px; flex-wrap: wrap;
}
.sect__title {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--display); font-size: 1.7rem; letter-spacing: .04em;
}
.sect__title::after {
    content: "›"; color: var(--accent); font-size: 1.4rem; line-height: 1;
}
.sect__tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.sect__tabs button {
    border: 1px solid var(--line); background: transparent; color: var(--muted);
    padding: 9px 14px; border-radius: 999px; cursor: pointer; font-weight: 700;
}
.sect__tabs button.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #b83474);
    border-color: transparent;
}

.grid {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid transparent;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
    transform: translateY(-5px);
    border-color: rgba(232,93,156,.35);
    box-shadow: var(--shadow);
}
.card__poster {
    position: relative; display: block; aspect-ratio: 2/3;
    background: linear-gradient(160deg, #2a2033, #151018);
}
.card__poster img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .35s ease;
}
.card:hover .card__poster img { transform: scale(1.06); }
.card__poster::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(10,6,12,.92) 100%);
}
.card__play {
    position: absolute; inset: 0; z-index: 2;
    display: grid; place-items: center;
    opacity: 0; transition: opacity .2s ease;
    color: #fff; font-size: 2rem; text-shadow: 0 8px 20px rgba(0,0,0,.6);
}
.card:hover .card__play { opacity: 1; }
.card__meta {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 12px;
}
.card__title {
    margin: 0 0 4px;
    font-size: .92rem; font-weight: 800; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__year { color: var(--muted); font-size: .8rem; margin-bottom: 6px; }
.card__rates { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; font-weight: 800; }
.card__rates .kp { color: var(--kp); }
.card__rates .kp:not(:empty)::before { content: "KP "; opacity: .85; font-size: .68rem; }
.card__rates .imdb { color: var(--imdb); }
.card__rates .imdb:not(:empty)::before { content: "IMDB "; opacity: .85; font-size: .68rem; color: #c9a40f; }
.card__placeholder {
    width: 100%; height: 100%; display: grid; place-items: center;
    color: #6d6075; letter-spacing: .08em; font-size: .75rem;
}

/* SEO text */
.seo {
    margin-top: 40px; padding: 28px;
    border-radius: 20px; border: 1px solid var(--line);
    background: rgba(255,255,255,.02);
}
.seo h1, .seo h2 {
    font-family: var(--display); letter-spacing: .03em; margin: 0 0 12px;
}
.seo h1 { font-size: 1.8rem; }
.seo h2 { font-size: 1.35rem; margin-top: 22px; }
.seo p, .seo li { color: var(--muted); line-height: 1.7; }
.seo ul { padding-left: 18px; }
.seo a { color: var(--accent-2); }

/* Watch / search */
.page-head { margin-bottom: 18px; }
.page-head h1 {
    margin: 0 0 8px; font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: .03em;
}
.page-head p { margin: 0; color: var(--muted); }
.alert {
    padding: 14px 16px; border-radius: 14px; margin-bottom: 16px;
    border: 1px solid rgba(255,120,140,.35); background: rgba(255,120,140,.08); color: #ffd0d8;
    white-space: pre-wrap;
}
.empty {
    padding: 42px 20px; text-align: center; color: var(--muted);
    border: 1px dashed var(--line); border-radius: var(--radius);
}
.skeleton-grid {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px;
}
.skeleton {
    aspect-ratio: 2/3; border-radius: 14px;
    background: linear-gradient(90deg, #221829 20%, #2c2134 50%, #221829 80%);
    background-size: 200% 100%; animation: shimmer 1.1s linear infinite;
}

.watch { display: grid; grid-template-columns: 260px 1fr; gap: 22px; }
.watch__poster { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.watch__poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.watch__meta { margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.watch__meta li {
    list-style: none; padding: 10px 12px; border-radius: 12px;
    background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: .9rem;
}
.watch__meta span { display: block; color: var(--muted); font-size: .72rem; margin-bottom: 2px; }
.player {
    border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
    background: #000; box-shadow: var(--shadow);
}
.player-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px; background: #17101c; border-bottom: 1px solid var(--line); }
.player-tabs button {
    border: 1px solid var(--line); background: transparent; color: var(--text);
    border-radius: 999px; padding: 9px 14px; cursor: pointer; font-weight: 700;
}
.player-tabs button.is-active { background: linear-gradient(135deg, var(--accent), #b83474); border-color: transparent; }
.player-stage, .player-stage iframe, .player-stage video-player { width: 100%; min-height: 440px; border: 0; display: block; background: #000; }

.footer {
    margin-top: auto; padding: 28px 22px; text-align: center;
    border-top: 1px solid var(--line); color: var(--muted);
}
.footer__brand {
    font-family: var(--display); letter-spacing: .05em; color: var(--text);
    margin-bottom: 8px; font-size: 1.3rem;
}
.footer p { margin: 0 auto; max-width: 70ch; line-height: 1.6; font-size: .9rem; }

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1100px) {
    .grid, .skeleton-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .nav { display: none; }
    .burger { display: inline-flex; align-items: center; justify-content: center; }
    .mobile-nav.is-open { display: flex; }
    .search { min-width: 0; flex: 1; }
}
@media (max-width: 720px) {
    .grid, .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .watch { grid-template-columns: 1fr; }
    .player-stage, .player-stage iframe, .player-stage video-player { min-height: 230px; }
    .header { flex-wrap: wrap; }
    .logo { order: 1; }
    .burger { order: 2; margin-left: auto; }
    .search { order: 3; width: 100%; }
}
