/* ==========================================================================
   Казино стримеров — базовые стили
   Мобайл-фёрст: базовый блок = 360px, дальше min-width 600 / 900 / 1200
   ========================================================================== */

:root {
    --bg:          #0e1116;
    --surface:     #151a22;
    --surface-2:   #1d242f;
    --surface-3:   #252e3b;
    --line:        #2a323f;
    --line-soft:   #1f2732;

    --text:        #e9edf4;
    --text-dim:    #b6c0d0;
    --muted:       #8b97ab;

    --accent:      #7b61ff;
    --accent-hi:   #9b86ff;
    --accent-soft: rgba(123, 97, 255, .14);
    --live:        #ff3b5c;
    --gold:        #f5c451;
    --ok:          #3ecf8e;

    --radius:      14px;
    --radius-sm:   9px;
    --gap:         16px;
    --maxw:        1200px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Golos Text", "Onest",
            Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo,
            Consolas, monospace;

    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 2px solid var(--accent-hi);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ── контейнер и сетка ─────────────────────────────────── */

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 14px;
}

.section { padding-block: 34px; }
.section-tight { padding-block: 22px; }

.eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 8px;
}

/* ── типографика ───────────────────────────────────────── */

h1, h2, h3, h4 {
    line-height: 1.18;
    letter-spacing: -.02em;
    margin: 0 0 14px;
    font-weight: 800;
}

h1 { font-size: clamp(26px, 6.4vw, 46px); }
h2 { font-size: clamp(21px, 4.4vw, 31px); margin-top: 8px; }
h3 { font-size: clamp(18px, 3.4vw, 22px); }
h4 { font-size: 17px; }

p { margin: 0 0 15px; }

.lead {
    font-size: clamp(16px, 3.6vw, 19px);
    color: var(--text-dim);
}

.prose { color: var(--text-dim); }
.prose h2 { color: var(--text); margin-top: 32px; }
.prose h3 { color: var(--text); margin-top: 24px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose figure { margin: 22px 0; }
.prose figure img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
}
.prose figcaption {
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
    text-align: center;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── шапка ─────────────────────────────────────────────── */

.header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(14, 17, 22, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -.01em;
    text-decoration: none;
}
.logo:hover { text-decoration: none; }

.logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--live));
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex: none;
}

.burger {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    flex: none;
}
.burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
}
.burger span::before,
.burger span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s ease;
}
.burger span::before { top: -6px; }
.burger span::after  { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

.nav {
    display: none;
    border-top: 1px solid var(--line-soft);
    padding-block: 8px 14px;
}
.nav.is-open { display: block; }

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    display: block;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 15px;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.is-active { color: var(--text); background: var(--accent-soft); }

/* ── кнопки ────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    transition: transform .12s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hi); }

.btn-ghost {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 9px 13px; font-size: 14px; }

/* ── хлебные крошки ────────────────────────────────────── */

.crumbs {
    font-size: 13px;
    color: var(--muted);
    padding-block: 12px 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text-dim); }
.crumbs span[aria-current] { color: var(--text-dim); }
.crumbs .sep { opacity: .5; }

/* ── герой ─────────────────────────────────────────────── */

.hero {
    position: relative;
    padding-block: 26px 8px;
    border-bottom: 1px solid var(--line-soft);
    background:
        radial-gradient(1000px 400px at 12% -12%, rgba(123, 97, 255, .18), transparent 62%),
        radial-gradient(700px 340px at 92% 0%, rgba(255, 59, 92, .10), transparent 60%);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 18px 0 6px;
    padding: 0;
    list-style: none;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.stat b {
    display: block;
    font-family: var(--mono);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text);
}
.stat span {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .02em;
}

/* ── бейджи и чипы ─────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    color: var(--text-dim);
    background: var(--surface-2);
    white-space: nowrap;
}
.badge-kick    { color: #a7f36a; border-color: rgba(167, 243, 106, .32); background: rgba(167, 243, 106, .09); }
.badge-youtube { color: #ff7a7a; border-color: rgba(255, 122, 122, .32); background: rgba(255, 122, 122, .09); }
.badge-wasd    { color: #8fb4ff; border-color: rgba(143, 180, 255, .32); background: rgba(143, 180, 255, .09); }
.badge-top     { color: var(--gold); border-color: rgba(245, 196, 81, .34); background: rgba(245, 196, 81, .08); }

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.chip-own { border-color: rgba(123, 97, 255, .45); background: var(--accent-soft); color: var(--text); }

/* ── карточки ──────────────────────────────────────────── */

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 15px;
    transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--surface-3); }

/* карточка стримера — «нижняя треть» стрима: акцентная полоса слева */
.card-streamer { padding-left: 18px; }
.card-streamer::before {
    content: "";
    position: absolute;
    left: 0; top: 14px; bottom: 14px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--accent), var(--live));
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.card-title a { color: var(--text); }

.card-nick {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

.card-meta {
    font-size: 13px;
    color: var(--muted);
    margin: 10px 0 0;
}

.card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
}

/* ── таблица «стример → казино» ────────────────────────── */

.matrix { margin-top: 14px; }

.matrix-row {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px 14px;
    margin-bottom: 10px;
}

.matrix-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.matrix-name {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -.01em;
    color: var(--text);
}
.matrix-name:hover { color: var(--accent-hi); text-decoration: none; }

.matrix-count {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

/* ── таблица данных ────────────────────────────────────── */

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 520px;
}
table.data th,
table.data td {
    padding: 11px 13px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}
table.data th {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    background: var(--surface-2);
    white-space: nowrap;
}
table.data tr:last-child td { border-bottom: 0; }
table.data td b { color: var(--text); }
.num { font-family: var(--mono); color: var(--text-dim); }

/* ── логотипы казино ───────────────────────────────────── */

.logo-tile {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
}
.logo-tile:hover { border-color: var(--accent); text-decoration: none; }
.logo-tile img {
    width: 76px;
    height: 38px;
    object-fit: contain;
    flex: none;
}
.logo-tile-body { min-width: 0; }
.logo-tile-name { font-weight: 700; font-size: 15px; }
.logo-tile-meta { font-size: 12px; color: var(--muted); }

/* ── блок призыва ──────────────────────────────────────── */

.cta {
    background: linear-gradient(135deg, rgba(123, 97, 255, .16), rgba(255, 59, 92, .10));
    border: 1px solid rgba(123, 97, 255, .34);
    border-radius: var(--radius);
    padding: 17px;
    margin: 22px 0;
}
.cta h3 { margin-bottom: 6px; }
.cta p { color: var(--text-dim); margin-bottom: 14px; font-size: 15px; }

/* ── FAQ ───────────────────────────────────────────────── */

.faq { margin-top: 10px; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    margin-bottom: 9px;
}
.faq summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-family: var(--mono);
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    flex: none;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 11px 0 0; color: var(--text-dim); font-size: 15px; }

/* ── поиск / фильтр ────────────────────────────────────── */

.filter {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 16px;
}

.field {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;      /* 16px — иначе iOS зумит при фокусе */
    font-family: inherit;
}
.field::placeholder { color: var(--muted); }
.field:focus { border-color: var(--accent); outline: none; }

select.field { appearance: none; background-image: none; }

.filter-empty {
    display: none;
    padding: 22px 14px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}
.filter-empty.is-shown { display: block; }

/* ── оглавление ────────────────────────────────────────── */

.toc {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 20px 0;
}
.toc-title {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 9px;
}
.toc ol { margin: 0; padding-left: 18px; }
.toc li { margin-bottom: 6px; font-size: 15px; }

/* ── подвал ────────────────────────────────────────────── */

.footer {
    margin-top: 40px;
    border-top: 1px solid var(--line-soft);
    background: var(--surface);
    padding-block: 26px 34px;
    font-size: 14px;
    color: var(--muted);
}
.footer-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 22px;
}
.footer h4 {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
    font-weight: 600;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 7px; }
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--text); }

.age {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--live);
    color: var(--live);
    font-weight: 800;
    font-size: 13px;
    flex: none;
}

.disclaimer {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.6;
}

/* ── утилиты ───────────────────────────────────────────── */

.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.skip {
    position: absolute;
    left: -9999px;
}
.skip:focus {
    left: 10px;
    top: 10px;
    z-index: 200;
    background: var(--accent);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
}

/* ── таблица-лестница: на телефоне строки складываются в карточки ────────
   Разметка: <table class="data tiers"> + у каждой td атрибут data-l="Метка".
   До 768px thead прячется, строка превращается в блок, метка берётся
   из data-l — прокрутки по горизонтали нет. С 768px — обычная таблица,
   числа не переносятся, при нехватке ширины работает .table-scroll. */
.tier-wrap { margin: 18px 0; }

table.data.tiers { min-width: 0; }
table.data.tiers .num,
table.data.tiers th { white-space: nowrap; }

@media (max-width: 767px) {
    /* строки-карточки: горизонтальная прокрутка не нужна */
    .tier-wrap .table-scroll { overflow-x: visible; }

    table.data.tiers,
    table.data.tiers tbody,
    table.data.tiers tr,
    table.data.tiers td { display: block; width: 100%; }

    table.data.tiers thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

    table.data.tiers tr {
        border-bottom: 1px solid var(--line);
        padding: 4px 0 8px;
    }
    table.data.tiers tr:last-child { border-bottom: 0; }

    table.data.tiers td {
        border-bottom: 0;
        padding: 4px 13px;
        display: flex;
        gap: 12px;
        align-items: baseline;
        justify-content: space-between;
        text-align: right;
    }
    table.data.tiers td::before {
        content: attr(data-l);
        flex: none;
        font-family: var(--mono);
        font-size: 11px;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--muted);
        text-align: left;
    }
    /* первая ячейка строки — заголовок карточки */
    table.data.tiers td:first-child {
        display: block;
        text-align: left;
        font-weight: 700;
        font-size: 15px;
        padding-top: 10px;
        color: var(--text);
    }
    table.data.tiers td:first-child::before { content: none; }
}

/* ==========================================================================
   ≥ 600px — крупные телефоны в альбомной, небольшие планшеты
   ========================================================================== */
@media (min-width: 600px) {
    .wrap { padding-inline: 20px; }
    .section { padding-block: 44px; }
    .hero-stats { grid-template-columns: repeat(4, 1fr); }
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
    .cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; }
    .cta-body { flex: 1; }
    .cta p { margin-bottom: 0; }
    .btn-block { display: inline-flex; width: auto; }
}

/* ==========================================================================
   ≥ 900px — планшеты и небольшие ноутбуки: горизонтальное меню
   ========================================================================== */
@media (min-width: 900px) {
    .burger { display: none; }

    .header-bar { min-height: 66px; }

    .nav {
        display: block;
        border-top: 0;
        padding: 0;
    }
    .nav-list { flex-direction: row; gap: 4px; align-items: center; }
    .nav-link { padding: 9px 13px; font-size: 15px; }

    .header-bar { flex-wrap: nowrap; }

    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }

    .footer-cols { grid-template-columns: repeat(4, 1fr); }

    .filter { flex-direction: row; }
    .filter .field { flex: 1; }

    .layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 28px;
        align-items: start;
    }
    .aside { position: sticky; top: 82px; }

    /* матрица разворачивается в две колонки */
    .matrix-row {
        display: grid;
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 16px;
        align-items: center;
    }
    .matrix-row-head { margin-bottom: 0; flex-direction: column; align-items: flex-start; gap: 3px; }
}

/* ==========================================================================
   ≥ 1200px — десктоп
   ========================================================================== */
@media (min-width: 1200px) {
    .wrap { padding-inline: 28px; }
    .section { padding-block: 54px; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .hero { padding-block: 44px 16px; }
    .matrix-row { grid-template-columns: 250px minmax(0, 1fr); }
}

/* ==========================================================================
   Печать
   ========================================================================== */
@media print {
    .header, .footer, .cta, .burger { display: none; }
    body { background: #fff; color: #000; }
}
