/* ============================================================
   ЕКРАНИ — вход, лоби, профил, магазин, портфейл, класация
   ============================================================ */

/* ---------------- Вход / регистрация ---------------- */
.auth {
  min-height: 100%;
  display: grid; place-items: center;
  padding: var(--sp-4);
}
.auth-card { width: min(460px, 100%); }
.auth-logo {
  text-align: center; margin-bottom: var(--sp-5);
}
.auth-logo .suits { font-size: 2.6rem; letter-spacing: .16em; }
.auth-logo .suits .r { color: #e0344f; }
.auth-logo h1 { margin: var(--sp-2) 0 4px; font-size: 1.6rem; letter-spacing: .06em; }
.auth-tabs { margin-bottom: var(--sp-4); }
.auth .legal { font-size: .78rem; color: var(--text-mut); text-align: center; margin-top: var(--sp-4); }

/* ---------------- Лоби ---------------- */
.hero {
  border-radius: var(--r-xl); padding: var(--sp-5);
  background: var(--felt);
  color: #fff; position: relative; overflow: hidden;
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-2);
}
.hero::after {
  content: "♠ ♥ ♦ ♣"; position: absolute; right: -6px; bottom: -16px;
  font-size: 4.4rem; opacity: .14; letter-spacing: .1em;
}
.hero h1 { font-size: 1.5rem; margin-bottom: 4px; }
.hero p { opacity: .9; margin: 0; }

/* Промо лента */
.promo-strip { display: flex; gap: var(--sp-3); overflow-x: auto; padding-bottom: 6px; margin-bottom: var(--sp-4); }
.promo-card {
  flex: 0 0 auto; width: 250px; border-radius: var(--r-lg); padding: var(--sp-4);
  color: #fff; cursor: pointer; position: relative; overflow: hidden; min-height: 118px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  box-shadow: var(--shadow-1); border: 0;
  text-align: left;
}
.promo-card .t { font-weight: 900; font-size: 1rem; }
.promo-card .s { font-size: .82rem; opacity: .92; }
.promo-card .tag { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.4);
  border-radius: 99px; padding: 3px 10px; font-size: .7rem; font-weight: 900; }

/* ---------------- ГЛАВНАТА ИГРА: БЕЛОТ ---------------- */
.belot-hero {
  display: block; width: 100%; text-align: left; padding: 0; cursor: pointer;
  border: 2px solid var(--brand); border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(160deg, #17805a 0%, #0d4d36 55%, #072a1e 100%);
  color: #fff; box-shadow: var(--shadow-2); position: relative;
  transition: transform var(--dur) var(--ease);
}
.belot-hero:active { transform: scale(.985); }
.belot-hero .bh-live {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: rgba(0,0,0,.45); border-radius: 99px; padding: 5px 12px;
  font-size: .74rem; font-weight: 900;
}
.belot-hero .bh-live i { display: inline-block; width: 8px; height: 8px; border-radius: 99px;
  background: #3ddc84; margin-right: 6px; }
.belot-hero .bh-art {
  height: 128px; display: grid; place-content: center;
  background: radial-gradient(90% 120% at 50% 0%, rgba(255,255,255,.16), transparent 70%);
  position: relative;
}
.belot-hero .bh-art::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 12px, transparent 12px 24px);
}
.belot-hero .bh-art svg { filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); position: relative; z-index: 1; }
.belot-hero .bh-body { padding: var(--sp-4) var(--sp-4) var(--sp-5); }
.belot-hero .bh-kicker { font-size: .7rem; font-weight: 900; letter-spacing: .16em; opacity: .75; }
.belot-hero h2 { font-size: 1.7rem; margin: 2px 0 6px; }
.belot-hero p { opacity: .9; font-size: .92rem; margin-bottom: var(--sp-3); }
.belot-hero .badge { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.25); color: #fff; }
.belot-hero .badge.gold { background: var(--gold); border-color: transparent; color: #23180a; }
.belot-hero .bh-cta {
  margin-top: var(--sp-3); background: var(--gold); color: #23180a;
  border-radius: var(--r-md); min-height: var(--tap);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.08rem; letter-spacing: .02em;
  box-shadow: 0 4px 0 rgba(0,0,0,.25);
}

/* Бързи залози под Белот */
.quick-stakes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: var(--sp-3) 0 var(--sp-5); }
.quick-stakes .qs {
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  color: var(--text); min-height: 58px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
}
.quick-stakes .qs b { font-size: .98rem; }
.quick-stakes .qs span { font-size: .66rem; color: var(--text-mut); }
.quick-stakes .qs:disabled { opacity: .4; cursor: not-allowed; }
.quick-stakes .qs.more { background: var(--surface-2); border-style: dashed; }

/* Вариант C — компактни бутончета за другите игри */
.compact-games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .compact-games { grid-template-columns: repeat(3, 1fr); } }
.compact-games .cg {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  padding: 10px; min-height: 60px; cursor: pointer; color: var(--text); text-align: left;
}
.compact-games .cg-ic {
  width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-content: center;
  background: linear-gradient(140deg, var(--hue, #16b877), rgba(0,0,0,.5));
}
.compact-games .cg-nm { font-weight: 800; font-size: .9rem; line-height: 1.15; flex: 1; }
.compact-games .cg-on { font-size: .72rem; color: var(--text-mut); font-weight: 800; }

/* Плочки за игрите — Вариант A (едри карти) */
.game-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 620px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
.game-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden; cursor: pointer; text-align: left;
  padding: 0; color: var(--text); box-shadow: var(--shadow-1);
  transition: transform var(--dur) var(--ease);
}
.game-card:active { transform: scale(.975); }
.game-card .art {
  height: 96px; display: grid; place-content: center; font-size: 2.6rem;
  background: linear-gradient(140deg, var(--hue, #16b877), rgba(0,0,0,.55));
  color: #fff;
}
.game-card .info { padding: var(--sp-3); }
.game-card .nm { font-weight: 900; font-size: 1.05rem; }
.game-card .ds { font-size: .8rem; color: var(--text-mut); min-height: 2.2em; }
.game-card .meta { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.game-card .live { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.5);
  color: #fff; border-radius: 99px; padding: 3px 9px; font-size: .68rem; font-weight: 900; }
.game-card .live i { display: inline-block; width: 7px; height: 7px; border-radius: 99px;
  background: #3ddc84; margin-right: 5px; }

/* Вариант B — списък с редове */
.game-list .list-item .art {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-content: center;
  font-size: 1.7rem; color: #fff; background: linear-gradient(140deg, var(--hue, #16b877), rgba(0,0,0,.5));
  flex: 0 0 auto;
}

/* Вариант C — едър фокус върху Белот */
.game-focus {
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-2);
  background: var(--surface); border: 1px solid var(--line); margin-bottom: var(--sp-3);
  cursor: pointer; text-align: left; width: 100%; color: var(--text); padding: 0;
}
.game-focus .art { height: 150px; display: grid; place-content: center; font-size: 3.6rem; color: #fff;
  background: linear-gradient(140deg, var(--hue, #16b877), rgba(0,0,0,.6)); }
.game-focus .info { padding: var(--sp-4); }
.game-focus .btn { margin-top: var(--sp-3); }

/* Маси / стаи */
.room {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); width: 100%; text-align: left; color: var(--text); cursor: pointer;
}
.room .seats { display: flex; gap: 4px; }
.room .dot2 { width: 14px; height: 14px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line); }
.room .dot2.on { background: var(--brand); border-color: var(--brand); }

/* ---------------- Профил ---------------- */
.pf-banner {
  height: 138px; border-radius: var(--r-xl); position: relative; margin-bottom: 58px;
  display: grid; place-content: center; font-size: 2.6rem; color: rgba(255,255,255,.85);
  box-shadow: var(--shadow-1); overflow: hidden;
  background-size: cover; background-position: center;
}
.pf-banner .edit {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.45); color: #fff; border: 1px solid rgba(255,255,255,.3);
  border-radius: 99px; padding: 6px 14px; font-weight: 800; font-size: .8rem; cursor: pointer;
}
.pf-ava-wrap { position: absolute; bottom: -46px; left: 50%; transform: translateX(-50%); text-align: center; }
.pf-ava-wrap .ava { border-width: 4px; border-color: var(--surface); }
.pf-name { text-align: center; }
.pf-name .n { font-size: 1.35rem; font-weight: 900; }
.pf-title { font-size: .85rem; color: var(--gold); font-weight: 800; }
.pf-xp { margin: var(--sp-4) 0; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
@media (min-width: 560px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }

.hist-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.hist-row .g { width: 38px; height: 38px; border-radius: 10px; display: grid; place-content: center;
  background: var(--surface-2); font-size: 1.1rem; }

/* ---------------- Магазин ---------------- */
.shop-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: var(--sp-4); }
.shop-tabs button {
  flex: 0 0 auto; min-height: 44px; padding: 0 16px; border-radius: 99px;
  background: var(--surface-2); border: 2px solid transparent; color: var(--text-dim);
  font-weight: 800; cursor: pointer; white-space: nowrap;
}
.shop-tabs button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }

.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
@media (min-width: 620px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
.shop-item {
  border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  padding: var(--sp-3); display: flex; flex-direction: column; gap: 8px; align-items: center;
  text-align: center; cursor: pointer; color: var(--text);
}
.shop-item[data-tier="rare"]   { border-color: #34c6ff44; }
.shop-item[data-tier="epic"]   { border-color: #b57bff66; }
.shop-item[data-tier="legend"] { border-color: var(--gold); box-shadow: 0 0 18px rgba(255,197,49,.18); }
.shop-item .prev {
  width: 100%; height: 92px; border-radius: var(--r-md); display: grid; place-items: center;
  overflow: hidden; background: var(--surface-2);
}
.shop-item .nm { font-weight: 800; font-size: .92rem; }
.shop-item .price { font-weight: 900; font-size: .9rem; }
.shop-item.owned { opacity: .96; }
.shop-item .tag-own { color: var(--brand); font-weight: 900; font-size: .8rem; }
.shop-item .tag-eq { background: var(--brand); color: var(--brand-ink); border-radius: 99px;
  padding: 2px 10px; font-size: .74rem; font-weight: 900; }

.felt-prev { width: 100%; height: 100%; border-radius: var(--r-md); }
.banner-prev { width: 100%; height: 100%; border-radius: var(--r-md); display: grid; place-content: center;
  font-size: 1.4rem; color: rgba(255,255,255,.9); }

/* VIP блок */
.vip-card {
  border-radius: var(--r-xl); padding: var(--sp-5); color: #23180a;
  background: linear-gradient(140deg, #ffe08a, #d9a212);
  box-shadow: var(--shadow-2);
}
.vip-card ul { margin: var(--sp-3) 0; padding-left: 1.1em; }
.vip-card li { margin-bottom: 4px; font-weight: 700; }

/* ---------------- Портфейл ---------------- */
.pack {
  border: 2px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4);
  background: var(--surface); display: flex; flex-direction: column; gap: 6px; align-items: center;
  position: relative; cursor: pointer; color: var(--text); text-align: center;
}
.pack.best { border-color: var(--gold); box-shadow: 0 0 20px rgba(255,197,49,.2); }
.pack .amt { font-size: 1.25rem; font-weight: 900; }
.pack .badge-top { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #23180a; border-radius: 99px; padding: 3px 12px;
  font-size: .72rem; font-weight: 900; white-space: nowrap; }

/* ---------------- Класация ---------------- */
.lb-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3);
  border-bottom: 1px solid var(--line); }
.lb-row .rank { width: 34px; text-align: center; font-weight: 900; font-size: 1.05rem; }
.lb-row.me { background: var(--brand-soft); border-radius: var(--r-md); }
.lb-row .rank.g1 { color: var(--gold); } .lb-row .rank.g2 { color: #c9d3cd; } .lb-row .rank.g3 { color: #cd7f32; }

/* ---------------- Колело на късмета ---------------- */
.wheel-screen {
  display: grid; place-items: center; gap: var(--sp-5); text-align: center;
  width: min(460px, 100%); margin: 0 auto;
}
.timer-box {
  display: inline-flex; gap: 8px; align-items: center; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 99px; padding: 10px 20px; font-weight: 900;
  text-align: center;
}
.prize-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: 100%; }
.prize-list .p { display: flex; align-items: center; gap: 8px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  font-size: .84rem; font-weight: 700; text-align: left; }
.prize-list .p i { width: 12px; height: 12px; border-radius: 4px; flex: 0 0 auto; }

/* Дневен бонус */
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.streak .d {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 2px; text-align: center;
  font-size: .7rem; font-weight: 800; background: var(--surface);
}
.streak .d.on { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.streak .d .c { font-size: .66rem; opacity: .85; display: block; }

/* ---------------- Преглед на картите ---------------- */
.card-scroll { overflow-x: auto; padding-bottom: 6px; }
.card-row { display: flex; gap: 6px; }
.skin-chip {
  border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  padding: 8px; cursor: pointer; color: var(--text); position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 78px;
}
.skin-chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.skin-chip .sc-nm { font-size: .74rem; font-weight: 800; white-space: nowrap; }
.skin-chip .sc-lock { position: absolute; top: 4px; right: 6px; font-size: .8rem; }

/* ---------------- Игра с приятели ---------------- */
.play-friends {
  display: flex; align-items: center; gap: 12px; width: 100%; cursor: pointer;
  background: linear-gradient(135deg, #2b3f8f, #16224d); color: #fff;
  border: 2px solid #4a63c9; border-radius: var(--r-lg);
  padding: var(--sp-4); margin: var(--sp-3) 0; text-align: left;
  box-shadow: var(--shadow-1);
}
.play-friends:active { transform: scale(.985); }
.play-friends .pf-ic { font-size: 1.9rem; }
.play-friends .small { opacity: .85; }

.seat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.seat-card {
  border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  padding: var(--sp-3); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
}
.seat-card.mine { border-color: var(--brand); background: var(--brand-soft); }
.seat-card.bot { opacity: .8; border-style: dashed; }

.chat-list { display: flex; flex-direction: column; gap: 4px; max-height: 160px; overflow-y: auto;
  background: var(--surface-2); border-radius: var(--r-md); padding: 8px; margin-bottom: 8px; }
.chat-msg { font-size: .88rem; }
.chat-msg b { color: var(--brand); }

.deal-result {
  background: rgba(0,0,0,.55); border: 1px solid var(--gold); border-radius: var(--r-md);
  padding: var(--sp-3); margin-bottom: var(--sp-2); color: #fff; max-height: 46vh; overflow-y: auto;
}
.deal-result h3 { font-size: 1rem; margin-bottom: 6px; }
.deal-result .scoretable td, .deal-result .scoretable th { padding: 4px 8px; font-size: .84rem; border-color: rgba(255,255,255,.15); }
.contract-badge { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); }

/* ---------------- Споделяне ---------------- */
.addr-row { display: flex; flex-direction: column; gap: 10px; margin: var(--sp-3) 0; }
.addr-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
code.addr {
  flex: 1; min-width: 200px;
  background: var(--surface-2); border: 2px dashed var(--brand); border-radius: var(--r-md);
  padding: 12px 14px; font-size: 1.05rem; font-weight: 800; color: var(--brand);
  word-break: break-all; font-family: "Consolas", "Courier New", monospace;
}

/* ---------------- Помощ ---------------- */
.acc { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: var(--sp-3); background: var(--surface); }
.acc > summary { padding: var(--sp-4); font-weight: 800; cursor: pointer; list-style: none; min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: "▾"; transition: transform .2s; }
.acc[open] > summary::after { transform: rotate(180deg); }
.acc .body { padding: 0 var(--sp-4) var(--sp-4); color: var(--text-dim); }
.acc .body table { width: 100%; border-collapse: collapse; margin: var(--sp-2) 0; }
.acc .body td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
