/* ============ Баланс в шапке ============ */
.balance {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  border-radius: 21px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 15px;
  transition: border-color .15s;
}
.balance:hover { border-color: var(--green); }
.balance b { font-variant-numeric: tabular-nums; }
.balance__plus {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}
.coin { flex: none; }
.coin--lg { width: 28px; height: 28px; font-size: 14px; }
.coin--xl { width: 44px; height: 44px; font-size: 22px; }
.btn--login { height: 42px; }

/* ============ Окно входа ============ */
.auth { gap: 14px; }
.auth__head { display: flex; align-items: center; gap: 12px; }
.auth__head h3 { flex: 1; margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.auth__icon {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.auth__icon img { width: 32px; height: 32px; object-fit: contain; }
.x--box { border: 1px solid var(--border); border-radius: 12px; width: 40px; height: 40px; }
.auth__tabs { margin-bottom: 4px; }
.auth__tabs button { height: 46px; font-size: 15px; }
.auth__tabs button.is-active { color: var(--accent); border: 1px solid var(--border); }
.lbl { color: var(--text) !important; font-size: 15px !important; font-weight: 700 !important; }
.lbl__row { display: flex; justify-content: space-between; align-items: baseline; }
.lbl__row em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--muted); }
.auth input:not([type=checkbox]) { height: 52px; }
.pw { position: relative; }
.pw input { padding-right: 48px !important; }
.pw__eye {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--muted);
}
.pw__eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pw__eye.is-on { color: var(--accent); }
.link {
  color: var(--accent);
  font-weight: 700;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}
.link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.auth__forgot { align-self: flex-end; font-size: 14px; margin-top: -4px; text-decoration: none; color: var(--text); }
.auth__forgot:hover { color: var(--accent); }
.m .check {
  position: relative;
  display: flex; flex-direction: row; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check i {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  display: grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.check input:checked + i { background: var(--accent); border-color: var(--accent); }
.check input:checked + i::after {
  content: "";
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-1px) rotate(45deg);
}
.check input:focus-visible + i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.captcha { min-height: 65px; display: flex; justify-content: center; }
.auth__err {
  display: none;
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, #e5484d 14%, transparent);
  color: #ff6b6f;
  font-size: 14px;
  font-weight: 600;
}
[data-theme="light"] .auth__err { color: #c9262b; }
.auth__err.is-show { display: block; }
.auth__dev {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--green) 60%, transparent);
  background: color-mix(in srgb, var(--green) 10%, transparent);
  font-size: 13.5px;
}
.auth__text { margin: 0; color: var(--muted); }
.auth__text b { color: var(--text); }
.auth__links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.btn--block { width: 100%; height: 54px; font-size: 16px; border-radius: 14px; }
.btn--primary.btn--block { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--green))); border: 0; }
.btn:disabled { opacity: .6; cursor: default; filter: none; }
.btn--ghost { background: transparent; }
.code-input { font-size: 26px !important; font-weight: 800 !important; letter-spacing: .5em; text-align: center; }
.rules { max-height: 55vh; overflow: auto; line-height: 1.6; }

/* ============ Пополнение ============ */
.topup__now { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.topup__now b { color: var(--text); }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.presets button {
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-weight: 800;
  font-size: 16px;
}
.presets button:hover { border-color: var(--accent); }
.presets button.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.topup__sum { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); }
.topup__sum div { display: flex; justify-content: space-between; color: var(--muted); }
.topup__sum b { color: var(--text); }
.topup__sum div:last-child { padding-top: 8px; border-top: 1px solid var(--border); }
.topup__sum div:last-child b { color: var(--accent); font-size: 18px; }

.empty { max-width: 440px; margin: 60px auto; text-align: center; }
.empty h2 { font-size: 28px; margin: 0 0 8px; }
.empty p { color: var(--muted); margin: 0 0 20px; }
.empty__icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--accent); }
.empty__icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .header__right { gap: 8px; }
  .balance { height: 38px; font-size: 14px; gap: 6px; padding: 0 4px; }
  .balance .coin--lg, .balance__plus { width: 26px; height: 26px; }
  .avatar, .burger { width: 38px; height: 38px; }
  .btn--login { height: 38px; }
  .auth__head h3 { font-size: 21px; }
}

/* ============ Промокод в пополнении ============ */
.offer {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, #e5212f 45%, var(--border));
  background:
    radial-gradient(80% 140% at 0% 50%, rgba(229, 33, 47, .22), transparent 70%),
    linear-gradient(90deg, rgba(31, 79, 216, .10), transparent 60%),
    var(--bg);
  text-align: left;
  transition: border-color .15s, transform .15s;
}
.offer:hover { border-color: #e5212f; transform: translateY(-1px); }
.offer.is-on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.offer__icon { width: 52px; height: 52px; flex: none; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(229, 33, 47, .35)); }
.offer__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.offer__title { font-size: 13px; color: var(--muted); font-weight: 600; }
.offer__code { font-size: 18px; font-weight: 800; letter-spacing: .04em; }
.offer__pct {
  flex: none;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--green);
  color: #0a0a0c;
  font-weight: 800;
  font-size: 18px;
}
.promo-ok {
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--green) 12%, transparent);
  color: var(--text);
  font-size: 14px;
}
.promo-ok .link { font-size: 13px; margin-left: 4px; }
.topup__sum b.plus { color: var(--green); }
.m .coupon input { border: 0; background: transparent; padding: 0 4px; height: auto; }
