/* ─────────── Кастомные лобби (CyberShoke-style) ─────────── */

/* Hero */
.ql-lobby-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(100deg, #12151c 0%, #1a2130 55%, #22405e 100%);
    min-height: 240px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.ql-lobby-hero::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(120% 120% at 80% 40%, rgba(60,130,220,.25), transparent 60%);
    pointer-events: none;
}
.ql-lobby-hero__inner { position: relative; z-index: 1; padding: 32px 40px; }
.ql-lobby-hero__eyebrow { font-size: 12px; letter-spacing: .12em; color: #7fa8d8; font-weight: 700; margin-bottom: 10px; }
.ql-lobby-hero__title { font-size: 34px; line-height: 1.1; font-weight: 800; margin: 0 0 22px; color: #fff; }
.ql-lobby-hero__cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(90deg,#3b82f6,#2563eb);
    color: #fff; border: none; border-radius: 12px;
    padding: 14px 28px; font-size: 15px; font-weight: 700;
    cursor: pointer; text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease;
}
.ql-lobby-hero__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(37,99,235,.4); color:#fff; }

/* Список */
.ql-lobby-list { background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; overflow: hidden; }
.ql-lobby-list__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.06); flex-wrap: wrap; gap: 12px; }
.ql-lobby-filter { display: flex; gap: 14px; }
.ql-lobby-filter label { font-size: 12px; color: rgba(255,255,255,.6); display: flex; flex-direction: column; gap: 4px; }
.ql-input--sm { padding: 6px 10px; font-size: 13px; }
.ql-lobby-list__count { font-size: 13px; color: rgba(255,255,255,.7); }

/* ── карточки лобби (CyberShoke-style) ── */
.ql-lobby-cards { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.ql-lobby-card {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    align-items: center; gap: 18px;
    padding: 12px; border-radius: 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    color: inherit; text-decoration: none;
    transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.ql-lobby-card:hover { transform: translateY(-2px); border-color: rgba(59,130,246,.4); background: rgba(59,130,246,.06); }

/* превью карты — цветной градиент по data-map */
.ql-lobby-card__map {
    position: relative; height: 68px; border-radius: 10px; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 8px 10px;
    background: linear-gradient(135deg,#2a3346,#1a2130);
}
.ql-lobby-card__map::after { content:""; position:absolute; inset:0; background: linear-gradient(0deg, rgba(0,0,0,.45), transparent 70%); }
.ql-lobby-card__map[data-map="de_mirage"]  { background: linear-gradient(135deg,#3a2f1e,#8a6d3a 60%,#c9a45e); }
.ql-lobby-card__map[data-map="de_dust2"]   { background: linear-gradient(135deg,#3a2c17,#a97c3c 60%,#d8a85a); }
.ql-lobby-card__map[data-map="de_inferno"] { background: linear-gradient(135deg,#3a1e17,#8a3a2c 55%,#c25a3a); }
.ql-lobby-card__map[data-map="de_nuke"]    { background: linear-gradient(135deg,#1e2630,#3a4a5a 60%,#6a8090); }
.ql-lobby-card__map[data-map="de_anubis"]  { background: linear-gradient(135deg,#1e2e33,#2c6a6a 60%,#4ea0a0); }
.ql-lobby-card__map[data-map="de_ancient"] { background: linear-gradient(135deg,#1a2e1e,#2c6a3a 60%,#4ea05a); }
.ql-lobby-card__map[data-map="de_train"]   { background: linear-gradient(135deg,#26262c,#4a4a55 60%,#707080); }
.ql-lobby-card__map[data-map="de_overpass"]{ background: linear-gradient(135deg,#1e2833,#3a5a7a 60%,#5a8ab0); }
.ql-lobby-card__mapname { position: relative; z-index: 1; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.ql-lobby-card__mode { position: relative; z-index: 1; align-self: flex-start; font-size: 15px; font-weight: 800; color: #fff; background: rgba(0,0,0,.35); padding: 2px 10px; border-radius: 7px; backdrop-filter: blur(3px); }

/* инфо */
.ql-lobby-card__body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ql-lobby-card__host { display: flex; align-items: center; gap: 10px; }
.ql-lobby-card__ava { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: #2a3346; }
.ql-lobby-card__hostinfo { display: flex; flex-direction: column; min-width: 0; }
.ql-lobby-card__hostname { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-lobby-card__hostrole { font-size: 11px; color: #f2c14e; opacity: .85; }
.ql-lobby-card__hostrole i { font-size: 10px; }
.ql-lobby-card__meta { display: flex; gap: 8px; flex-wrap: wrap; }
.ql-lobby-card__tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.8); }
.ql-lobby-card__tag i { font-size: 11px; opacity: .8; }
.ql-lobby-card__tag--open   { background: rgba(52,211,153,.14); color: #4fd6a0; }
.ql-lobby-card__tag--closed { background: rgba(242,193,78,.14); color: #f2c14e; }

/* слоты + вход */
.ql-lobby-card__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-right: 6px; }
.ql-lobby-card__slots { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-family: 'JetBrains Mono', monospace; color: rgba(255,255,255,.85); }
.ql-lobby-card__slots i { font-size: 12px; opacity: .55; }
.ql-lobby-card__slots strong { color: #fff; }
.ql-lobby-card__slots.is-full strong { color: #f2544d; }
.ql-lobby-card__enter { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #7fb0f5; }
.ql-lobby-card:hover .ql-lobby-card__enter { color: #a9ccff; }

/* empty */
.ql-lobby-empty { padding: 56px 20px; text-align: center; }
.ql-lobby-empty__icon { font-size: 40px; color: rgba(255,255,255,.14); margin-bottom: 14px; }
.ql-lobby-empty__title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.ql-lobby-empty__sub { font-size: 13px; color: rgba(255,255,255,.45); }

@media (max-width: 720px) {
  .ql-lobby-card { grid-template-columns: 90px 1fr; }
  .ql-lobby-card__side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; padding: 8px 6px 0; border-top: 1px solid rgba(255,255,255,.05); }
}

/* ─────────── Модалка ─────────── */
.ql-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.ql-modal[aria-hidden="false"] { display: block; }
.ql-modal__backdrop { position: absolute; inset: 0; background: rgba(6,9,14,.72); backdrop-filter: blur(4px); }
.ql-modal__dialog {
    position: relative;
    max-width: 560px; margin: 6vh auto 0;
    background: #171b24; border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px; padding: 28px;
    max-height: 86vh; overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.ql-modal__close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; color: rgba(255,255,255,.5);
    font-size: 18px; cursor: pointer;
}
.ql-modal__close:hover { color: #fff; }
.ql-modal__title { text-align: center; font-size: 22px; font-weight: 800; margin: 4px 0 6px; }
.ql-modal__subtitle { text-align: center; font-size: 13px; color: rgba(255,255,255,.55); margin: 0 0 22px; }

.ql-access-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.ql-access-card {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px; border-radius: 12px; cursor: pointer;
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
    transition: border-color .12s ease, background .12s ease;
}
.ql-access-card:hover { background: rgba(255,255,255,.05); }
.ql-access-card.is-selected { border-color: #3b82f6; background: rgba(59,130,246,.1); }
.ql-access-card__icon { font-size: 20px; color: #3b82f6; margin-top: 2px; width: 24px; text-align: center; }
.ql-access-card__title { font-weight: 700; margin-bottom: 3px; }
.ql-access-card__desc { font-size: 12.5px; color: rgba(255,255,255,.55); line-height: 1.4; }

.ql-field { margin-bottom: 14px; }
.ql-field label { display: block; font-size: 12px; color: rgba(255,255,255,.6); margin-bottom: 6px; }
.ql-create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 6px; }
.ql-create-mods { display: flex; gap: 20px; margin: 6px 0 20px; }
.ql-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.ql-modal__submit {
    width: 100%; padding: 14px; border: none; border-radius: 12px;
    background: linear-gradient(90deg,#3b82f6,#2563eb); color: #fff;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: box-shadow .12s ease;
}
.ql-modal__submit:hover { box-shadow: 0 8px 24px rgba(37,99,235,.4); }
.ql-modal__error { color: #ef6a6a; font-size: 13px; margin-top: 10px; text-align: center; }

/* ─────────── Старая сетка (список) — оставляем ─────────── */
@media (max-width: 900px) { .ql-lobby-row { grid-template-columns: 120px 50px 30px 70px 1fr 24px; } .ql-lobby-row__region { display:none; } }

/* ════════════ PREMIUM: страница лобби (show) ════════════ */
:root {
  --lb-t1: #3b82f6;   /* синий */
  --lb-t2: #f2544d;   /* красный */
  --lb-ready: #34d399;
  --lb-line: rgba(255,255,255,.08);
  --lb-card: rgba(255,255,255,.035);
}

/* ── HERO ── */
.ql-lb-hero {
  position: relative; border-radius: 20px; overflow: hidden;
  min-height: 220px; margin-bottom: 18px;
  display: flex; align-items: flex-end;
  border: 1px solid var(--lb-line);
}
.ql-lb-hero__bg {
  position: absolute; inset: 0; background: #12161f center/cover no-repeat;
  transform: scale(1.05); filter: saturate(1.05);
}
.ql-lb-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,12,17,.96) 0%, rgba(10,12,17,.55) 55%, rgba(10,12,17,.3) 100%);
}
.ql-lb-hero.is-live .ql-lb-hero__overlay { background: linear-gradient(0deg, rgba(8,30,20,.96), rgba(10,40,26,.5)); }
.ql-lb-hero.is-launching .ql-lb-hero__overlay { background: linear-gradient(0deg, rgba(35,28,8,.96), rgba(45,35,10,.5)); }
.ql-lb-hero__content { position: relative; z-index: 2; width: 100%; padding: 22px 26px; }
.ql-lb-hero__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.ql-lb-hero__eyebrow { font-size: 12px; letter-spacing: .1em; font-weight: 700; color: #8fb4e6; text-transform: uppercase; }
.ql-lb-hero__actions { display: flex; gap: 8px; }
.ql-lb-hero__title { font-size: 32px; font-weight: 800; margin: 0 0 8px; color: #fff; letter-spacing: -.01em; }
.ql-lb-hero__status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255,255,255,.85); margin-bottom: 16px; }
.ql-lb-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lb-ready); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: lbpulse 1.8s infinite; }
@keyframes lbpulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,.5);} 70%{box-shadow:0 0 0 8px rgba(52,211,153,0);} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0);} }

/* чипы */
.ql-lb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ql-lb-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.07); border: 1px solid var(--lb-line);
  color: #fff; backdrop-filter: blur(6px);
}
.ql-lb-chip i { opacity: .8; font-size: 12px; }
.ql-lb-chip.is-off { opacity: .32; text-decoration: line-through; }
.ql-lb-chip--access { background: rgba(59,130,246,.16); border-color: rgba(59,130,246,.4); }

/* ── SCORE-BAR ── */
.ql-lb-scorebar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 12px 20px; margin-bottom: 14px;
  background: var(--lb-card); border: 1px solid var(--lb-line); border-radius: 14px;
}
.ql-lb-scorebar__side { display: flex; align-items: center; gap: 12px; }
.ql-lb-scorebar__side--t1 { justify-content: flex-start; }
.ql-lb-scorebar__side--t2 { justify-content: flex-end; }
.ql-lb-scorebar__label { font-weight: 700; font-size: 14px; opacity: .85; }
.ql-lb-scorebar__count { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; }
.ql-lb-scorebar__side--t1 .ql-lb-scorebar__count { color: var(--lb-t1); }
.ql-lb-scorebar__side--t2 .ql-lb-scorebar__count { color: var(--lb-t2); }
.ql-lb-scorebar__vs { font-weight: 800; font-size: 13px; letter-spacing: .1em; opacity: .4; padding: 4px 10px; border: 1px solid var(--lb-line); border-radius: 8px; }

/* ── TEAMS ── */
.ql-lb-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ql-lb-team { background: var(--lb-card); border: 1px solid var(--lb-line); border-radius: 16px; overflow: hidden; }
.ql-lb-team--t1 { box-shadow: inset 3px 0 0 var(--lb-t1); }
.ql-lb-team--t2 { box-shadow: inset -3px 0 0 var(--lb-t2); }
.ql-lb-team__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--lb-line); }
.ql-lb-team__badge { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.ql-lb-team--t1 .ql-lb-team__badge { background: var(--lb-t1); }
.ql-lb-team--t2 .ql-lb-team__badge { background: var(--lb-t2); }
.ql-lb-team__name { font-weight: 700; font-size: 15px; }
.ql-lb-team__avg { margin-left: auto; font-size: 12px; font-weight: 600; opacity: .55; font-family: 'JetBrains Mono', monospace; }
.ql-lb-slots { padding: 12px; display: flex; flex-direction: column; gap: 10px; }

/* ── SLOT ── */
.ql-lb-slot { position: relative; border-radius: 12px; border: 1px solid var(--lb-line); padding: 14px; transition: border-color .15s, transform .15s; }
.ql-lb-slot--empty {
  display: flex; align-items: center; gap: 12px;
  border-style: dashed; opacity: .8; min-height: 68px;
  background: rgba(255,255,255,.015);
}
.ql-lb-slot--empty:hover { opacity: 1; border-color: rgba(255,255,255,.18); }
.ql-lb-slot__empty-mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.05); color: rgba(255,255,255,.4); }
.ql-lb-slot__empty-text { flex: 1; color: rgba(255,255,255,.4); font-weight: 600; }
.ql-lb-slot__empty-actions { display: flex; gap: 6px; }

.ql-lb-slot--filled { background: rgba(255,255,255,.04); }
.ql-lb-slot--filled:hover { border-color: rgba(255,255,255,.16); }
.ql-lb-slot.is-ready { border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.06); }
.ql-lb-slot.is-bot { background: rgba(160,120,255,.05); }

.ql-lb-slot__head { display: flex; align-items: center; gap: 12px; }
.ql-lb-ava { position: relative; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg,#2a3346,#1a2130); display: grid; place-items: center; }
.ql-lb-ava img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.ql-lb-ava__letter { position: absolute; font-weight: 800; font-size: 20px; color: rgba(255,255,255,.7); }
.ql-lb-ava--bot { background: linear-gradient(135deg,#5b46a8,#3a2d6e); color: #cbb9ff; font-size: 20px; }
.ql-lb-slot__id { flex: 1; min-width: 0; }
.ql-lb-slot__name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-lb-crown { color: #f2c14e; font-size: 12px; }
.ql-lb-ready { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.45); margin-top: 3px; }
.ql-lb-ready--on { color: var(--lb-ready); }

.ql-lb-slot__tags { display: flex; gap: 6px; margin-top: 10px; }
.ql-lb-tag { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .03em; }
.ql-lb-tag--lvl { background: rgba(242,193,78,.15); color: #f2c14e; }
.ql-lb-tag--elo { background: rgba(59,130,246,.15); color: #7fb0f5; }

.ql-lb-slot__stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-top: 10px; }
.ql-lb-stat { text-align: center; padding: 7px 4px; background: rgba(0,0,0,.22); border-radius: 8px; }
.ql-lb-stat__val { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 14px; }
.ql-lb-stat__lbl { font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; opacity: .5; margin-top: 2px; }
.ql-lb-slot__meta { margin-top: 8px; font-size: 11px; opacity: .45; }
.ql-lb-slot__botline { margin-top: 8px; font-size: 12px; color: #b6a3ea; opacity: .8; }

.ql-lb-kick { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 7px; border: none; background: rgba(242,84,77,.14); color: #f2544d; cursor: pointer; display: grid; place-items: center; transition: background .12s; z-index: 3; }
.ql-lb-kick:hover { background: rgba(242,84,77,.28); }

/* ── mini buttons ── */
.ql-lb-mini { border: none; border-radius: 8px; padding: 8px 14px; font-weight: 700; font-size: 12px; cursor: pointer; transition: transform .1s, box-shadow .1s; }
.ql-lb-mini--join { background: linear-gradient(90deg,#3b82f6,#2563eb); color: #fff; }
.ql-lb-mini--join:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37,99,235,.4); }
.ql-lb-mini--bot { background: rgba(160,120,255,.16); color: #cbb9ff; }
.ql-lb-mini--bot:hover { background: rgba(160,120,255,.3); }

/* ── ACTION BAR ── */
.ql-lb-actionbar { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 16px 18px; background: var(--lb-card); border: 1px solid var(--lb-line); border-radius: 14px; flex-wrap: wrap; }
.ql-lb-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--lb-line); background: rgba(255,255,255,.05); color: #fff; border-radius: 10px; padding: 10px 18px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; transition: all .12s; }
.ql-lb-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.ql-lb-btn--ghost { padding: 8px 14px; font-size: 13px; }
.ql-lb-btn--xs { padding: 6px 10px; font-size: 12px; }
.ql-lb-btn--ready.is-active { background: rgba(52,211,153,.16); border-color: rgba(52,211,153,.5); color: var(--lb-ready); }
.ql-lb-btn--ready:not(.is-active) { background: linear-gradient(90deg,#34d399,#10b981); border-color: transparent; color: #04150e; }
.ql-lb-btn--start { background: linear-gradient(90deg,#3b82f6,#2563eb); border-color: transparent; margin-left: auto; }
.ql-lb-btn--start:disabled { opacity: .4; cursor: not-allowed; background: rgba(255,255,255,.06); }
.ql-lb-btn--start:not(:disabled):hover { box-shadow: 0 6px 18px rgba(37,99,235,.45); }
.ql-lb-connect { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: rgba(0,0,0,.3); border-radius: 10px; margin-left: auto; }
.ql-lb-connect__label { font-size: 12px; opacity: .6; }
.ql-lb-connect code { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--lb-ready); }

/* responsive */
@media (max-width: 820px) {
  .ql-lb-teams { grid-template-columns: 1fr; }
  .ql-lb-hero__title { font-size: 24px; }
  .ql-lb-btn--start { margin-left: 0; width: 100%; justify-content: center; }
}
