:root {
  color-scheme: light;
  --tg-viewport-height: 100dvh;
  --tg-viewport-stable-height: 100dvh;
  --tg-safe-area-top: 0px;
  --tg-safe-area-right: 0px;
  --tg-safe-area-bottom: 0px;
  --tg-safe-area-left: 0px;
  --tg-system-safe-area-top: 0px;
  --tg-system-safe-area-right: 0px;
  --tg-system-safe-area-bottom: 0px;
  --tg-system-safe-area-left: 0px;
  --tg-content-safe-area-top: 0px;
  --tg-content-safe-area-right: 0px;
  --tg-content-safe-area-bottom: 0px;
  --tg-content-safe-area-left: 0px;
  --bg: #f7f8fb;
  --ink: #12151c;
  --muted: #626b7a;
  --line: #d9e0ea;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-wash: rgba(255, 255, 255, 0.92);
  --control: #edf1f7;
  --field-bg: #f9fbff;
  --placeholder-bg: #eef2f7;
  --placeholder-ink: #7b8492;
  --inverse: #12151c;
  --inverse-ink: #ffffff;
  --betbar-bg: rgba(255, 255, 255, 0.96);
  --betbar-line: rgba(18, 21, 28, 0.14);
  --ticket-bg: #ffffff;
  --won-bg: #ddf8e8;
  --lost-bg: #ffe3e8;
  --green: #0b7a53;
  --green-dark: #075a3e;
  --red: #b42334;
  --amber: #d89000;
  --teal: #117c88;
  --violet: #5d45b8;
  --gold: #f2b84b;
  --drawn-start: #23d7bd;
  --drawn-end: #5eead4;
  --drawn-border: rgba(35, 215, 189, 0.92);
  --drawn-glow: rgba(35, 215, 189, 0.46);
  --drawn-ink: #05201d;
  --shadow: 0 18px 48px rgba(16, 17, 20, 0.14);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101216;
  --ink: #f6f8fb;
  --muted: #aeb7c5;
  --line: #303642;
  --panel: #191d23;
  --panel-strong: #202631;
  --panel-wash: rgba(25, 29, 35, 0.94);
  --control: #262c36;
  --field-bg: #1f2530;
  --placeholder-bg: #252b35;
  --placeholder-ink: #8d96a5;
  --inverse: #f6f8fb;
  --inverse-ink: #101216;
  --betbar-bg: rgba(25, 29, 35, 0.96);
  --betbar-line: rgba(246, 248, 251, 0.14);
  --ticket-bg: #202631;
  --won-bg: #103f30;
  --lost-bg: #4b1e26;
  --green: #18a873;
  --green-dark: #0f7651;
  --red: #f07182;
  --amber: #f0b936;
  --teal: #28a0aa;
  --violet: #9a87ff;
  --gold: #ffd36a;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  background:
    linear-gradient(135deg, rgba(17, 124, 136, 0.14), transparent 32rem),
    linear-gradient(315deg, rgba(180, 35, 52, 0.10), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

[data-telegram-mini-app="true"] body {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tg-theme-link-color, var(--teal)) 18%, transparent), transparent 28rem),
    var(--tg-theme-bg-color, var(--bg));
}

[data-telegram-mini-app="true"] .app-shell {
  min-height: var(--tg-viewport-height, 100dvh);
  padding-top: max(10px, var(--tg-safe-area-top));
  padding-right: max(12px, var(--tg-safe-area-right));
  padding-left: max(12px, var(--tg-safe-area-left));
}

[data-telegram-mini-app="true"] .auth-view {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  padding-top: max(56px, calc(var(--tg-safe-area-top) + 28px));
  padding-right: max(18px, var(--tg-safe-area-right));
  padding-bottom: max(36px, calc(var(--tg-safe-area-bottom) + 20px));
  padding-left: max(18px, var(--tg-safe-area-left));
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell,
.admin-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 18px 16px 120px;
  overflow-x: hidden;
  max-width: 100vw;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 0;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.game-brand {
  min-width: 0;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--control);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(16, 17, 20, 0.10);
}

.global-theme-toggle {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  z-index: 80;
}

.theme-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.theme-icon::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: currentColor;
}

[data-theme="dark"] .theme-icon::after {
  inset: -2px 2px 2px 7px;
  background: var(--control);
  box-shadow: -5px 2px 0 currentColor;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.05rem;
}

.lotto-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.16em;
  max-width: none;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo-word {
  font-weight: 950;
}

.logo-seven {
  display: inline-block;
  font-size: 1.48em;
  font-weight: 1000;
  line-height: 0.78;
  letter-spacing: 0;
  color: transparent;
  background:
    linear-gradient(145deg, #ffffff 0%, #23e8ff 24%, #8b5cff 54%, #ff37dc 78%, #23e8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 0 8px rgba(35, 232, 255, 0.46))
    drop-shadow(0 0 14px rgba(255, 55, 220, 0.34));
  transform: skewX(-7deg);
}

[data-theme="light"] .logo-seven {
  background:
    linear-gradient(145deg, #11203a 0%, #0ea5e9 24%, #7c3aed 56%, #db2777 82%, #0891b2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 0 7px rgba(14, 165, 233, 0.26))
    drop-shadow(0 0 11px rgba(219, 39, 119, 0.18));
}

.timer-panel {
  min-width: 116px;
  padding: 10px 12px;
  border: 1px solid var(--inverse);
  background: var(--inverse);
  color: var(--inverse-ink);
  text-align: right;
  box-shadow: var(--shadow);
}

.timer-panel strong {
  display: block;
  margin-top: 3px;
  font-size: 1.45rem;
}

.phase-chip {
  color: #b7f7cf;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-view {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 420px);
  align-items: center;
  gap: 28px;
  width: min(100%, 1060px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 18px 36px;
}

.auth-visual {
  display: grid;
  gap: 22px;
  padding-right: 18px;
}

.auth-visual h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.9;
}

.brand-logo {
  display: grid;
  align-items: start;
  gap: 14px;
}

.brand-logo img {
  width: min(180px, 32vw);
  aspect-ratio: 1;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.brand-logo h1 {
  color: var(--ink);
  text-wrap: balance;
}

.auth-side {
  display: grid;
  gap: 12px;
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-wash);
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-wash) 92%, transparent);
  box-shadow: 0 16px 40px rgba(16, 17, 20, 0.14);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  padding: 0 16px;
}

.auth-tab.active {
  background: var(--inverse);
  color: var(--inverse-ink);
  border-color: var(--inverse);
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  padding: 0 14px;
  outline: 0;
  font-weight: 850;
}

.auth-submit {
  min-height: 52px;
}

.telegram-login-button {
  min-height: 48px;
  border-color: var(--tg-theme-button-color, var(--teal));
  background: color-mix(in srgb, var(--tg-theme-button-color, var(--teal)) 12%, var(--panel));
  color: var(--tg-theme-button-color, var(--teal));
  font-weight: 950;
}

.rules-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-wash);
  box-shadow: 0 10px 28px rgba(16, 17, 20, 0.08);
}

.rules-panel .section-title {
  margin-bottom: 0;
}

.rules-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.rules-grid {
  display: grid;
  gap: 5px;
}

.rules-grid div {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) minmax(78px, 0.9fr) minmax(104px, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
}

.rules-grid div:first-child {
  background: var(--inverse);
  color: var(--inverse-ink);
}

.rules-grid span,
.rules-grid strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rules-grid span {
  color: var(--muted);
  font-weight: 850;
}

.rules-grid div:first-child span {
  color: inherit;
}

.rules-grid strong {
  color: var(--ink);
  font-weight: 950;
}

/* ── Detailed payout table ── */
.payout-detail-list {
  display: grid;
  gap: 8px;
}
.payout-detail-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ticket-bg);
  overflow: hidden;
}
.payout-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--inverse);
  color: var(--inverse-ink);
  font-size: 0.82rem;
  font-weight: 900;
}
.payout-detail-header .pick-label {
  font-size: 0.9rem;
}
.payout-detail-header .pick-desc {
  font-weight: 600;
  opacity: 0.75;
  font-size: 0.75rem;
}
.payout-detail-rows {
  display: grid;
  gap: 0;
}
.payout-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 6px 10px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.payout-row:last-child {
  border-bottom: none;
}
.payout-row .hit-count {
  color: var(--muted);
  font-weight: 600;
}
.payout-row .hit-count strong {
  color: var(--ink);
  font-weight: 900;
}
.payout-row .mult-value {
  font-weight: 950;
  font-size: 0.85rem;
  text-align: right;
  min-width: 48px;
}
.payout-row .mult-value.win {
  color: #22c55e;
}
.payout-row .mult-value.partial {
  color: #eab308;
}
.payout-row .mult-value.lose {
  color: #ef4444;
  opacity: 0.6;
}
.payout-row .mult-value.break-even {
  color: #60a5fa;
}
.payout-row-header {
  background: var(--panel-wash);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
}
.payout-row-header span:first-child {
  color: var(--muted);
}
.payout-row-header span:last-child {
  text-align: right;
}
.payout-example {
  margin-top: 6px;
  padding: 8px 10px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid var(--line);
}
.payout-example strong {
  color: var(--ink);
}
.payout-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 6px 0 2px;
  font-size: 0.72rem;
}
.payout-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.payout-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.payout-legend .dot.win { background: #22c55e; }
.payout-legend .dot.partial { background: #eab308; }
.payout-legend .dot.break-even { background: #60a5fa; }
.payout-legend .dot.lose { background: #ef4444; opacity: 0.5; }

.auth-view {
  position: relative;
  isolation: isolate;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  width: min(100%, 1040px);
  padding: 28px 18px 34px;
  color: #f8fafc;
}

.auth-view::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(34, 197, 94, 0.20), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(168, 85, 247, 0.22), transparent 22%),
    linear-gradient(145deg, #020409 0%, #07100c 42%, #060817 100%);
}

.auth-view > * {
  position: relative;
  z-index: 1;
}

.auth-visual {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding-right: 0;
}

.auth-visual h1 {
  color: #ffffff;
  font-size: clamp(2.9rem, 7vw, 6.1rem);
  line-height: 0.88;
  text-shadow: 0 0 28px rgba(34, 197, 94, 0.28);
}

.lobby-hero {
  position: relative;
  display: grid;
  min-height: 186px;
  place-items: center;
  overflow: hidden;
}

.lobby-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: left;
}

.lobby-logo-mark {
  display: grid;
  width: clamp(84px, 14vw, 132px);
  aspect-ratio: 1;
  place-items: center;
  border: 9px solid #10f06b;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 48%, #dbeafe 49% 62%, #0b140f 63%);
  color: #05070d;
  font-size: clamp(3rem, 7vw, 5.7rem);
  font-weight: 1000;
  box-shadow:
    0 0 0 1px rgba(16, 240, 107, 0.26),
    0 0 40px rgba(16, 240, 107, 0.42);
}

.lobby-tagline {
  margin: 4px 0 0;
  color: #f8fafc;
  font-size: clamp(0.98rem, 2.5vw, 1.28rem);
  font-weight: 950;
  text-transform: uppercase;
}

.lobby-tagline::first-letter,
.lobby-kicker::first-letter {
  text-transform: uppercase;
}

.lobby-ball {
  position: absolute;
  display: grid;
  width: 68px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #0b1220;
  font-size: 2.2rem;
  font-weight: 1000;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36), inset 0 10px 24px rgba(255, 255, 255, 0.40);
}

.lobby-ball-left {
  left: 2%;
  top: 28px;
  background: radial-gradient(circle at 35% 30%, #f9fafb 0 18%, #22c55e 19% 70%, #052e16 100%);
}

.lobby-ball-right {
  right: 5%;
  top: 74px;
  background: radial-gradient(circle at 35% 30%, #f9fafb 0 18%, #a855f7 19% 70%, #2e1065 100%);
}

.lobby-stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 14px;
}

.lobby-jackpot-card,
.lobby-mini-card,
.auth-card,
.auth-view .rules-panel,
.winners-panel,
.trust-row {
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(8, 13, 22, 0.94), rgba(7, 10, 24, 0.88)),
    rgba(8, 13, 22, 0.92);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.12),
    0 22px 70px rgba(0, 0, 0, 0.28);
}

.lobby-jackpot-card {
  grid-row: span 2;
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  min-height: 188px;
  padding: 20px;
}

.jackpot-cup {
  display: grid;
  width: min(140px, 100%);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(250, 204, 21, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 36%, rgba(250, 204, 21, 0.92), rgba(161, 98, 7, 0.64) 45%, transparent 46%),
    linear-gradient(145deg, rgba(250, 204, 21, 0.20), rgba(0, 0, 0, 0.08));
  box-shadow: inset 0 0 34px rgba(250, 204, 21, 0.14), 0 0 38px rgba(250, 204, 21, 0.18);
}

.jackpot-cup span {
  color: #2b1700;
  font-size: 4rem;
  font-weight: 1000;
}

.jackpot-copy {
  display: grid;
  gap: 9px;
}

.lobby-kicker {
  color: #e5e7eb;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.jackpot-copy strong {
  color: #facc15;
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 0 22px rgba(250, 204, 21, 0.28);
}

.jackpot-digits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.jackpot-digits span {
  display: grid;
  min-width: 30px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: #f9d35a;
  font-size: 1.35rem;
  font-weight: 950;
}

.lobby-mini-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 16px;
}

.lobby-mini-card strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
  font-size: 1.2rem;
  font-weight: 950;
}

.lobby-mini-card #lobbyWinnerCount {
  color: #19f07d;
  font-size: 1.7rem;
}

.mini-icon,
.trust-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
}

.mini-icon {
  width: 52px;
  aspect-ratio: 1;
  border: 1px solid rgba(34, 197, 94, 0.30);
  background: rgba(34, 197, 94, 0.10);
}

.mini-icon::before {
  content: "";
  width: 22px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #18f080;
  box-shadow: 15px 10px 0 -3px #18f080, -15px 10px 0 -3px #18f080;
}

.flash-icon {
  border-color: rgba(168, 85, 247, 0.46);
  background: rgba(168, 85, 247, 0.10);
}

.flash-icon::before {
  width: 18px;
  height: 30px;
  border-radius: 3px;
  background: linear-gradient(135deg, #a855f7 0 45%, #22d3ee 46% 100%);
  transform: skew(-14deg);
  box-shadow: none;
}

.auth-side {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: 16px;
}

.auth-card {
  grid-column: 1 / -1;
  padding: 18px;
  border-color: rgba(34, 197, 94, 0.36);
}

.auth-tabs {
  border-color: rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: none;
}

.auth-tab {
  border-radius: 8px;
  color: #cbd5e1;
}

.auth-tab.active {
  background: linear-gradient(110deg, #12e66d, #22d3ee 48%, #a855f7);
  color: #ffffff;
}

.auth-field span {
  color: #cbd5e1;
}

.auth-field input {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.74);
  color: #f8fafc;
}

.auth-field input:focus {
  border-color: rgba(34, 197, 94, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.auth-submit {
  border: 0;
  background: linear-gradient(105deg, #0ee86b, #22d3ee 48%, #a855f7);
  color: #061013;
  font-size: 1.05rem;
  font-weight: 1000;
  box-shadow: 0 18px 48px rgba(34, 197, 94, 0.18), 0 0 32px rgba(168, 85, 247, 0.18);
}

.auth-view .rules-panel,
.winners-panel {
  padding: 14px;
  border-color: rgba(168, 85, 247, 0.34);
}

.auth-view .section-title h2,
.winners-panel .section-title h2 {
  color: #20f08a;
}

.auth-view .section-title span,
.winners-panel .section-title span,
.auth-view .rules-panel p {
  color: #b8c3d4;
}

.auth-view .rules-grid div {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(3, 7, 18, 0.52);
}

.auth-view .rules-grid div:first-child {
  background: rgba(2, 6, 18, 0.88);
  color: #f8fafc;
}

.auth-view .rules-grid strong:first-child,
.auth-view .rules-grid span:last-child {
  color: #17ef82;
}

.auth-view .rules-grid strong:nth-child(2) {
  color: #facc15;
}

.winner-list {
  display: grid;
  gap: 8px;
}

.winner-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(3, 7, 18, 0.44);
}

.winner-badge {
  width: 30px;
  aspect-ratio: 1;
  border: 1px solid rgba(250, 204, 21, 0.52);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.28), rgba(15, 23, 42, 0.58));
}

.winner-badge::before {
  content: "";
  display: block;
  width: 15px;
  height: 10px;
  margin: 9px auto 0;
  clip-path: polygon(0 100%, 14% 28%, 37% 62%, 50% 8%, 63% 62%, 86% 28%, 100% 100%);
  background: #facc15;
}

.winner-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.winner-copy strong,
.winner-amount {
  color: #f8fafc;
  font-size: 0.94rem;
  font-weight: 950;
}

.winner-copy small {
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 800;
}

.winner-amount {
  color: #17ef82;
  white-space: nowrap;
}

.winner-empty {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 800;
}

.winner-show-more {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-wash);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.winner-show-more:hover {
  background: var(--inverse);
  color: var(--inverse-ink);
  border-color: transparent;
}

.winner-tone-1 .winner-badge {
  border-color: rgba(96, 165, 250, 0.56);
  background: radial-gradient(circle, rgba(96, 165, 250, 0.26), rgba(15, 23, 42, 0.58));
}

.winner-tone-1 .winner-badge::before {
  background: #60a5fa;
}

.winner-tone-1 .winner-amount {
  color: #60a5fa;
}

.winner-tone-2 .winner-badge {
  border-color: rgba(45, 212, 191, 0.56);
  background: radial-gradient(circle, rgba(45, 212, 191, 0.26), rgba(15, 23, 42, 0.58));
}

.winner-tone-2 .winner-badge::before {
  background: #2dd4bf;
}

.winner-tone-2 .winner-amount {
  color: #2dd4bf;
}

.winner-tone-3 .winner-badge {
  border-color: rgba(168, 85, 247, 0.56);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.24), rgba(15, 23, 42, 0.58));
}

.winner-tone-3 .winner-badge::before {
  background: #c084fc;
}

.winner-tone-3 .winner-amount {
  color: #c084fc;
}

.winner-tone-4 .winner-badge {
  border-color: rgba(251, 113, 133, 0.56);
  background: radial-gradient(circle, rgba(251, 113, 133, 0.22), rgba(15, 23, 42, 0.58));
}

.winner-tone-4 .winner-badge::before {
  background: #fb7185;
}

.winner-tone-4 .winner-amount {
  color: #fb7185;
}

.rules-dialog-winners {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px 0 0;
}

.rules-dialog-card {
  width: min(680px, 100%);
}

.trust-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.trust-row div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
}

.trust-icon {
  grid-row: span 2;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.10);
}

.trust-icon::before {
  content: "";
  width: 16px;
  aspect-ratio: 1;
  border: 3px solid #18f080;
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(45deg) translate(-1px, -2px);
}

.trust-row strong {
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 950;
}

.trust-row small {
  color: #b8c3d4;
  font-size: 0.75rem;
  font-weight: 750;
}

html[data-theme="light"] .auth-view {
  color: #101624;
}

html[data-theme="light"] .auth-view::before {
  background:
    radial-gradient(circle at 16% 12%, rgba(34, 197, 94, 0.16), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(14, 165, 233, 0.16), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef6ff 52%, #f7fbff 100%);
}

html[data-theme="light"] .auth-visual h1,
html[data-theme="light"] .lobby-tagline,
html[data-theme="light"] .lobby-mini-card strong,
html[data-theme="light"] .winner-copy strong,
html[data-theme="light"] .trust-row strong {
  color: #101624;
}

html[data-theme="light"] .lobby-logo-mark {
  background:
    radial-gradient(circle, #ffffff 0 48%, #e8f7ff 49% 62%, #d5f8e8 63%);
  color: #081321;
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.26),
    0 0 30px rgba(14, 165, 233, 0.16);
}

html[data-theme="light"] .lobby-jackpot-card,
html[data-theme="light"] .lobby-mini-card,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .auth-view .rules-panel,
html[data-theme="light"] .winners-panel,
html[data-theme="light"] .trust-row {
  border-color: rgba(73, 102, 176, 0.20);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 255, 0.92)),
    rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.78),
    0 20px 54px rgba(57, 78, 126, 0.14);
}

html[data-theme="light"] .auth-tabs {
  border-color: rgba(73, 102, 176, 0.18);
  background: rgba(238, 246, 255, 0.76);
}

html[data-theme="light"] .auth-tab {
  color: #5d687c;
}

html[data-theme="light"] .auth-tab.active {
  color: #081321;
  background: linear-gradient(110deg, #86efac, #67e8f9 48%, #c4b5fd);
}

html[data-theme="light"] .auth-field span,
html[data-theme="light"] .lobby-kicker,
html[data-theme="light"] .auth-view .section-title span,
html[data-theme="light"] .winners-panel .section-title span,
html[data-theme="light"] .auth-view .rules-panel p,
html[data-theme="light"] .winner-copy small,
html[data-theme="light"] .winner-empty,
html[data-theme="light"] .trust-row small {
  color: #5d687c;
}

html[data-theme="light"] .auth-field input {
  border-color: rgba(73, 102, 176, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: #101624;
}

html[data-theme="light"] .auth-view .section-title h2,
html[data-theme="light"] .winners-panel .section-title h2,
html[data-theme="light"] .auth-view .rules-grid strong:first-child,
html[data-theme="light"] .auth-view .rules-grid span:last-child,
html[data-theme="light"] .lobby-mini-card #lobbyWinnerCount,
html[data-theme="light"] .winner-amount {
  color: #087f68;
}

html[data-theme="light"] .auth-view .rules-grid div,
html[data-theme="light"] .winner-row {
  border-color: rgba(73, 102, 176, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .auth-view .rules-grid div:first-child {
  color: #101624;
  background: rgba(226, 235, 250, 0.82);
}

html[data-theme="light"] .auth-view .rules-grid strong:nth-child(2),
html[data-theme="light"] .jackpot-copy strong {
  color: #b77900;
}

html[data-theme="light"] .jackpot-digits span {
  border-color: rgba(183, 121, 0, 0.24);
  background: rgba(255, 255, 255, 0.68);
  color: #9a6100;
}

html[data-theme="light"] .winner-badge {
  background: radial-gradient(circle, rgba(250, 204, 21, 0.24), rgba(255, 255, 255, 0.82));
}

html[data-theme="light"] .global-theme-toggle {
  background: rgba(255, 255, 255, 0.92);
}

.auth-view {
  width: min(100%, 1024px);
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 18px 34px 28px;
  overflow-x: hidden;
}

.auth-view > .global-theme-toggle {
  position: fixed;
}

[data-telegram-mini-app="true"] .auth-view {
  padding: 18px 34px 28px;
}

.global-theme-toggle {
  top: max(6px, env(safe-area-inset-top));
  right: max(26px, env(safe-area-inset-right));
  left: auto;
  width: 58px;
  height: 58px;
  border-color: rgba(148, 163, 184, 0.20);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 16px 38px rgba(0, 0, 0, 0.32);
}

.auth-entry-actions {
  position: fixed;
  top: max(6px, env(safe-area-inset-top));
  right: max(96px, calc(env(safe-area-inset-right) + 96px));
  z-index: 82;
  display: flex;
  gap: 10px;
}

.auth-entry-button {
  min-width: 116px;
  min-height: 58px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
  font-weight: 1000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 16px 38px rgba(0, 0, 0, 0.28);
}

.auth-entry-button.primary {
  border-color: transparent;
  background: linear-gradient(112deg, #05e66b 0%, #19d2d2 46%, #9d27e8 100%);
  color: #ffffff;
  box-shadow:
    0 0 22px rgba(34, 197, 94, 0.20),
    0 0 30px rgba(168, 85, 247, 0.22),
    0 16px 38px rgba(0, 0, 0, 0.30);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  overflow-y: auto;
  background:
    radial-gradient(circle at 34% 10%, rgba(34, 197, 94, 0.14), transparent 24%),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.16), transparent 26%),
    rgba(2, 6, 16, 0.86);
  backdrop-filter: blur(14px);
}

.auth-modal-open {
  overflow: hidden;
}

.auth-overlay-shell {
  position: relative;
  width: min(100%, 720px);
  display: grid;
  place-items: center;
}

.auth-overlay-close {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 2;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(168, 85, 247, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(39, 16, 67, 0.96), rgba(16, 11, 42, 0.96));
  color: #ffffff;
  font-weight: 1000;
  box-shadow:
    0 0 20px rgba(217, 77, 255, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.auth-overlay .auth-card {
  width: min(100%, 680px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 28px;
}

.auth-view::before {
  background:
    radial-gradient(circle at 30% 6%, rgba(34, 197, 94, 0.20), transparent 18%),
    radial-gradient(circle at 86% 11%, rgba(168, 85, 247, 0.17), transparent 19%),
    radial-gradient(circle at 10% 20%, rgba(250, 204, 21, 0.09), transparent 15%),
    linear-gradient(180deg, #010206 0%, #04080d 42%, #050713 100%);
}

.auth-visual {
  gap: 18px;
}

.lobby-hero {
  min-height: 202px;
}

.lobby-hero::before,
.lobby-hero::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.08), rgba(250, 204, 21, 0.82), rgba(250, 204, 21, 0.08));
  box-shadow:
    140px 18px 0 -4px rgba(250, 204, 21, 0.64),
    380px 6px 0 -7px rgba(250, 204, 21, 0.42);
  transform: rotate(38deg);
}

.lobby-hero::before {
  left: 86px;
  top: 24px;
}

.lobby-hero::after {
  right: 84px;
  top: 62px;
  transform: rotate(-24deg);
}

.lobby-brand-lockup {
  gap: 20px;
}

.lobby-logo-mark {
  width: clamp(108px, 15vw, 148px);
  border-width: 10px;
  box-shadow:
    0 0 0 1px rgba(16, 240, 107, 0.34),
    0 0 42px rgba(16, 240, 107, 0.54),
    inset 0 0 18px rgba(16, 240, 107, 0.18);
}

.auth-visual h1 {
  font-size: clamp(4rem, 8.4vw, 6.6rem);
  font-style: italic;
  font-weight: 1000;
  letter-spacing: 0;
}

.lobby-tagline {
  margin-top: 6px;
  font-size: clamp(1.1rem, 2.5vw, 1.34rem);
  letter-spacing: 0;
}

.lobby-tagline strong,
.logo-seven {
  color: transparent;
}

.lobby-ball {
  width: 76px;
  z-index: 1;
}

.lobby-ball-left {
  left: 0;
  top: 46px;
}

.lobby-ball-gold {
  left: 72px;
  top: 118px;
  width: 80px;
  background: radial-gradient(circle at 35% 30%, #fef9c3 0 18%, #d69a20 19% 70%, #713f12 100%);
}

.lobby-ball-right {
  right: 72px;
  top: 118px;
  width: 82px;
}

.lobby-stats-grid {
  grid-template-columns: minmax(0, 1.52fr) minmax(260px, 0.95fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.lobby-jackpot-card,
.lobby-mini-card,
.auth-card,
.auth-view .rules-panel,
.winners-panel,
.trust-row {
  border-color: rgba(34, 197, 94, 0.28);
  background:
    linear-gradient(180deg, rgba(12, 18, 28, 0.90), rgba(4, 8, 16, 0.94)) padding-box,
    linear-gradient(135deg, rgba(34, 197, 94, 0.46), rgba(168, 85, 247, 0.38)) border-box;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 18px 54px rgba(0, 0, 0, 0.30);
}

.lobby-jackpot-card {
  min-height: 250px;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
  padding: 26px 22px;
}

.jackpot-cup {
  position: relative;
  width: min(170px, 100%);
  border: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 230, 118, 0.96) 0 26%, rgba(214, 151, 31, 0.95) 27% 42%, transparent 43%),
    linear-gradient(180deg, rgba(255, 214, 74, 0.22), rgba(0, 0, 0, 0.04));
}

.jackpot-cup::before,
.jackpot-cup::after {
  content: "";
  position: absolute;
  top: 42%;
  width: 36px;
  height: 36px;
  border: 8px solid rgba(240, 183, 57, 0.86);
  border-radius: 50%;
}

.jackpot-cup::before {
  left: 8px;
  border-right-color: transparent;
}

.jackpot-cup::after {
  right: 8px;
  border-left-color: transparent;
}

.jackpot-cup span {
  display: none;
}

.jackpot-copy {
  gap: 12px;
  justify-items: start;
}

.lobby-kicker {
  font-size: 1.22rem;
  letter-spacing: 0;
}

.jackpot-copy strong {
  font-size: clamp(3.6rem, 7.2vw, 5.2rem);
  letter-spacing: 0;
}

.jackpot-digits {
  gap: 5px;
}

.jackpot-digits span {
  min-width: 42px;
  min-height: 52px;
  border-color: rgba(250, 204, 21, 0.32);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.30);
  font-size: 2rem;
}

.lobby-mini-card {
  min-height: 117px;
  padding: 20px 24px;
}

.lobby-mini-card strong {
  font-size: 1.45rem;
}

.lobby-mini-card #lobbyWinnerCount {
  font-size: 2.7rem;
  line-height: 0.9;
}

.mini-icon {
  width: 64px;
  border-radius: 50%;
}

.auth-side {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.88fr);
  gap: 22px;
}

.auth-card {
  gap: 24px;
  padding: 18px 28px 26px;
  border-color: transparent;
}

.auth-tabs {
  gap: 10px;
  min-height: 72px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(9, 16, 25, 0.80);
}

.auth-tab {
  min-height: 60px;
  border-radius: 8px;
  font-size: 1.42rem;
}

.auth-tab.active {
  background: linear-gradient(112deg, #05e66b 0%, #19d2d2 46%, #9d27e8 100%);
}

.auth-field {
  position: relative;
  gap: 10px;
}

.auth-field span {
  font-size: 0.92rem;
  letter-spacing: 0;
}

.auth-field input {
  min-height: 68px;
  padding: 0 58px 0 76px;
  border: 0;
  background: rgba(16, 23, 34, 0.90);
  font-size: 1.45rem;
}

.auth-field::before,
.auth-field::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.auth-field::before {
  left: 24px;
  bottom: 21px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #9ca3af 0 22%, transparent 23%),
    radial-gradient(ellipse at 50% 76%, #9ca3af 0 32%, transparent 33%);
}

.auth-field:nth-of-type(2)::before {
  border-radius: 7px;
  background:
    linear-gradient(#9ca3af, #9ca3af) center 55% / 22px 18px no-repeat,
    radial-gradient(ellipse at 50% 42%, transparent 0 42%, #9ca3af 43% 58%, transparent 59%);
}

.auth-field:nth-of-type(1)::after {
  right: 22px;
  bottom: 19px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 45%, #ffffff 46% 58%, transparent 59%) 8px 10px / 14px 10px no-repeat,
    #0ea66d;
  box-shadow: 0 0 18px rgba(16, 240, 107, 0.34);
}

.auth-field:nth-of-type(2)::after {
  right: 22px;
  bottom: 24px;
  width: 32px;
  height: 20px;
  border: 3px solid #9ca3af;
  border-radius: 50%;
}

.auth-submit {
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 2px;
  text-transform: uppercase;
  font-size: 1.65rem;
}

.auth-submit::after {
  content: attr(data-hint);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: none;
}

.auth-submit[data-hint=""]::after {
  content: none;
}

.lobby-rules-panel > p {
  display: none;
}

.lobby-rules-panel,
.lobby-winners-panel {
  min-height: 374px;
  padding: 18px 16px;
}

.lobby-rules-panel .section-title,
.lobby-winners-panel .section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.lobby-rules-panel .section-title h2,
.lobby-winners-panel .section-title h2 {
  font-size: 1.36rem;
  text-transform: uppercase;
}

.lobby-rules-panel .section-title span,
.lobby-winners-panel .section-title span {
  display: none;
}

.lobby-rules-panel .rules-grid {
  overflow: hidden;
  gap: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
}

.lobby-rules-panel .rules-grid div {
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0;
  background: rgba(3, 7, 18, 0.28);
  grid-template-columns: minmax(78px, 1fr) minmax(90px, 1.1fr) minmax(118px, 1.25fr);
}

.lobby-rules-panel .rules-grid div:last-child {
  border-bottom: 0;
}

.lobby-rules-panel .rules-grid span,
.lobby-rules-panel .rules-grid strong {
  font-size: 0.9rem;
}

.lobby-winners-panel .winner-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
}

.lobby-winners-panel .winner-row {
  min-height: 57px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0;
  background: rgba(3, 7, 18, 0.24);
}

.lobby-winners-panel .winner-row:last-child {
  border-bottom: 0;
}

.lobby-winners-panel .winner-empty {
  min-height: 268px;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
}

.winner-amount {
  font-size: 1.02rem;
}

.trust-row {
  min-height: 96px;
  padding: 18px 24px;
  gap: 0;
}

.trust-row div {
  padding: 0 18px;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.trust-row div:last-child {
  border-right: 0;
}

.trust-row strong {
  font-size: 1.02rem;
}

.trust-row small {
  font-size: 0.84rem;
}

html[data-theme="light"] .global-theme-toggle {
  background: rgba(255, 255, 255, 0.92);
  color: #101624;
}

html[data-theme="light"] .auth-entry-button {
  border-color: rgba(73, 102, 176, 0.20);
  background: rgba(255, 255, 255, 0.92);
  color: #101624;
}

html[data-theme="light"] .auth-entry-button.primary {
  border-color: transparent;
  background: linear-gradient(110deg, #86efac, #67e8f9 48%, #c4b5fd);
}

html[data-theme="light"] .auth-overlay {
  background:
    radial-gradient(circle at 34% 10%, rgba(34, 197, 94, 0.13), transparent 24%),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.12), transparent 26%),
    rgba(238, 246, 255, 0.84);
}

html[data-theme="light"] .auth-overlay-close {
  border-color: rgba(73, 102, 176, 0.22);
  background: rgba(255, 255, 255, 0.96);
  color: #101624;
}

html[data-theme="light"] .auth-view::before {
  background:
    radial-gradient(circle at 30% 6%, rgba(34, 197, 94, 0.13), transparent 18%),
    radial-gradient(circle at 86% 11%, rgba(168, 85, 247, 0.12), transparent 19%),
    linear-gradient(180deg, #fbfdff 0%, #eef6ff 55%, #f8fbff 100%);
}

html[data-theme="light"] .auth-field input {
  background: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] .auth-tabs {
  background: rgba(238, 246, 255, 0.80);
}

html[data-theme="light"] .lobby-rules-panel .rules-grid,
html[data-theme="light"] .lobby-winners-panel .winner-list {
  border-color: rgba(73, 102, 176, 0.14);
}

html[data-theme="light"] .lobby-rules-panel .rules-grid div,
html[data-theme="light"] .lobby-winners-panel .winner-row {
  background: rgba(255, 255, 255, 0.68);
  border-bottom-color: rgba(73, 102, 176, 0.12);
}

.wallet-panel {
  min-width: 132px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-wash);
  box-shadow: 0 8px 22px rgba(16, 17, 20, 0.10);
}

.wallet-panel span {
  display: block;
  max-width: 150px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.wallet-panel strong {
  display: block;
  margin-top: 2px;
  color: var(--gold);
  font-size: 1rem;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  min-width: 64px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--control);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 950;
}

.menu-button-label {
  display: block;
  line-height: 1;
}

.menu-button-icon {
  display: grid;
  gap: 3px;
  width: 22px;
}

.menu-button-icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.22);
}

.account-menu-wrap {
  position: relative;
}

/* Only block body scroll in overlay (popup) menu mode, not full-page mode */
body.menu-open:not(.menu-page-active) {
  overflow: hidden;
}

.account-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-auto-rows: max-content;
  gap: 8px;
  width: 100vw;
  height: var(--tg-viewport-stable-height, 100dvh);
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding:
    max(10px, calc(env(safe-area-inset-top) + 8px))
    max(10px, calc(env(safe-area-inset-right) + 10px))
    max(80px, calc(env(safe-area-inset-bottom) + 76px))
    max(10px, calc(env(safe-area-inset-left) + 10px));
  scroll-padding: 66px 12px 80px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, transparent), color-mix(in srgb, var(--field-bg) 96%, transparent));
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.account-menu-header {
  position: sticky;
  top: -10px;
  z-index: 2;
  order: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  margin: -10px -10px 2px;
  padding:
    max(8px, calc(env(safe-area-inset-top) + 8px))
    max(10px, calc(env(safe-area-inset-right) + 10px))
    8px
    max(10px, calc(env(safe-area-inset-left) + 10px));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(14px);
}

.account-menu-header span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.account-menu-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
}

.account-menu-back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
}

.account-menu > .crypto-panel,
.account-menu > .password-form {
  order: 1;
  scroll-margin: 56px 0 16px;
}

.menu-item {
  order: 2;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  font-weight: 900;
  text-align: left;
  padding: 0 12px;
}

.menu-item.with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-item-label {
  min-width: 0;
}

.menu-item.danger {
  color: var(--red);
}

.password-form {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
}

.password-form label {
  display: grid;
  gap: 5px;
}

.password-form span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.password-form input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  padding: 0 10px;
  outline: 0;
}

.inline-confirm-message {
  margin: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--red) 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--red) 10%, var(--field-bg));
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.35;
}

.crypto-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
}

.service-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.service-card h3,
.service-description,
.service-value {
  margin: 0;
}

.service-card h3 {
  min-width: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.service-card-header span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, transparent);
  font-size: 0.72rem;
  font-weight: 950;
}

.service-description {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.service-value {
  color: var(--gold);
  font-weight: 950;
  overflow-wrap: anywhere;
}

a.service-value {
  text-decoration: none;
}

.crypto-balance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.fiat-balance-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.crypto-balance-grid div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
}

.fiat-balance-list div {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
}

.fiat-balance-list .active-fiat {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.crypto-balance-grid span,
.crypto-address-field span,
.fiat-balance-list span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crypto-balance-grid strong,
.fiat-balance-list strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crypto-address-field,
.crypto-mini-form {
  display: grid;
  gap: 5px;
}

.crypto-address-field input,
.crypto-address-field select,
.crypto-mini-form input,
.crypto-mini-form select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  padding: 0 9px;
  outline: 0;
}

.deposit-service-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.deposit-service-hint:hover,
.deposit-service-hint:focus-visible {
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  border-color: var(--gold);
}

.crypto-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.draw-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.language-option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  padding: 0 10px;
  text-align: left;
}

.language-flag {
  display: block;
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 26px;
  border-radius: 4px;
  overflow: hidden;
  background-color: #101624;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.12);
}

.language-flag::before,
.language-flag::after {
  content: "";
  position: absolute;
  display: none;
  pointer-events: none;
}

.language-flag-az,
.language-option[data-language="az"] .language-flag {
  background-image: url("/assets/flags/az.png");
}

.language-flag-tr,
.language-option[data-language="tr"] .language-flag {
  background-image: url("/assets/flags/tr.png");
}

.language-flag-en,
.language-option[data-language="en"] .language-flag {
  background-image: url("/assets/flags/en.png");
}

.language-flag-ru,
.language-option[data-language="ru"] .language-flag {
  background-image: url("/assets/flags/ru.jpg");
}

.language-option strong {
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 950;
}

.language-option.active {
  border-color: var(--drawn-border);
  box-shadow:
    0 0 0 1px var(--drawn-border),
    0 0 16px var(--drawn-glow);
}

.draw-color-option {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  padding: 0 9px;
  font-weight: 900;
  text-align: left;
}

.draw-color-option.active {
  border-color: var(--drawn-border);
  box-shadow:
    0 0 0 1px var(--drawn-border),
    0 0 16px var(--drawn-glow);
}

.draw-color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 0 14px currentColor;
}

.swatch-mint {
  color: rgba(35, 215, 189, 0.42);
  background: linear-gradient(135deg, #23d7bd, #5eead4);
}

.swatch-blue {
  color: rgba(56, 189, 248, 0.38);
  background: linear-gradient(135deg, #38bdf8, #60a5fa);
}

.swatch-violet {
  color: rgba(167, 139, 250, 0.38);
  background: linear-gradient(135deg, #a78bfa, #d8b4fe);
}

.swatch-amber {
  color: rgba(250, 204, 21, 0.30);
  background: linear-gradient(135deg, #facc15, #fdba74);
}

.swatch-coral {
  color: rgba(251, 113, 133, 0.32);
  background: linear-gradient(135deg, #fb7185, #fda4af);
}

.swatch-white {
  color: rgba(148, 163, 184, 0.36);
  border-color: rgba(15, 23, 42, 0.32);
  background: linear-gradient(135deg, #ffffff, #e5e7eb);
}

.swatch-black {
  color: rgba(15, 23, 42, 0.42);
  background: linear-gradient(135deg, #05070d, #111827);
}

.crypto-mini-form {
  grid-template-columns: minmax(0, 1fr);
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.convert-form-title {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.withdraw-note {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
  padding: 6px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--line) 30%, transparent);
  border-left: 2px solid var(--line);
  opacity: 0.85;
}

.number-section,
.admin-panel {
  border: 1px solid var(--line);
  background: var(--panel-wash);
  box-shadow: 0 10px 28px rgba(16, 17, 20, 0.08);
}

.number-section {
  padding: 16px;
  margin-bottom: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-title span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.draw-numbers {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  min-height: 88px;
}

.draw-ball,
.placeholder-ball {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 900;
}

.draw-ball {
  background: var(--green);
  color: #fff;
  border-color: var(--green-dark);
  transform: translateY(0);
  animation: pop-in 180ms ease-out;
}

.placeholder-ball {
  background: var(--placeholder-bg);
  color: var(--placeholder-ink);
}

@keyframes pop-in {
  from {
    transform: translateY(6px) scale(0.92);
    opacity: 0.5;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  -webkit-user-select: none;
  user-select: none;
}

.number-button {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  appearance: none;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font-weight: 900;
  line-height: 1;
  outline: 0;
  touch-action: manipulation;
  user-select: none;
}

.number-button:focus,
.number-button:focus-visible,
.number-button:active {
  outline: 0;
}

.number-button.selected {
  border-color: var(--drawn-border);
  background:
    linear-gradient(135deg, var(--drawn-start), var(--drawn-end));
  color: var(--drawn-ink);
  box-shadow:
    0 0 14px var(--drawn-glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.number-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.number-button.drawn {
  background: var(--green);
  border-color: var(--green-dark);
  color: #fff;
  opacity: 1;
  animation: pop-in 180ms ease-out;
}

.number-button.selected.drawn {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.bet-bar {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 104px 1fr 1fr;
  gap: 8px;
  max-width: 1088px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--betbar-line);
  background: var(--betbar-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.amount-field,
.multiplier-box,
.admin-field {
  display: grid;
  gap: 6px;
}

.amount-field,
.multiplier-box {
  min-width: 0;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--field-bg);
}

.amount-field span,
.multiplier-box span,
.admin-field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.amount-field input,
.admin-field input,
.admin-field select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
}

.affiliate-levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.4rem;
}

.affiliate-levels-grid .admin-field {
  margin: 0;
}

.affiliate-levels-grid .admin-field input {
  width: 100%;
}

/* ── Affiliate info modal ── */
.affiliate-info-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 1;
  transition: opacity 0.2s;
}
.affiliate-info-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}
.affiliate-info-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.4rem 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transform: translateY(0);
  transition: transform 0.2s;
}
.affiliate-info-backdrop.hidden .affiliate-info-card {
  transform: translateY(12px);
}
.affiliate-info-card .section-title {
  margin-bottom: 0;
}
.affiliate-info-content {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink);
}
.affiliate-info-content p {
  margin: 0.55rem 0;
}
.affiliate-info-content .info-levels {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}
.affiliate-info-content .info-levels li {
  margin: 0.2rem 0;
}
.affiliate-info-card .secondary-button {
  align-self: flex-end;
}

.amount-field input {
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  line-height: 1.1;
  text-align: left;
}

.multiplier-box strong {
  font-size: 1.18rem;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
  padding-right: 12px;
}

.multiplier-box strong::-webkit-scrollbar {
  width: 3px;
}

.multiplier-box strong::-webkit-scrollbar-track {
  background: transparent;
}

.multiplier-box strong::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 3px;
}

.mult-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}

.mult-row span:first-child {
  flex-shrink: 0;
}

.mult-row span:last-child {
  text-align: right;
  flex-shrink: 0;
}

.primary-button,
.secondary-button,
.secondary-link,
.icon-button {
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.primary-button {
  background: var(--green);
  color: #fff;
}

.primary-button:hover {
  background: var(--green-dark);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.secondary-button,
.secondary-link {
  display: grid;
  place-items: center;
  background: var(--inverse);
  color: var(--inverse-ink);
}

.secondary-link {
  min-height: 42px;
  padding: 0 14px;
}

.icon-button {
  width: 42px;
  height: 42px;
  background: var(--control);
  color: var(--ink);
}

.ticket-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  width: min(420px, 100%);
  padding: 18px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform 180ms ease-out;
  overflow-y: auto;
}

.ticket-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ticket-list {
  display: grid;
  gap: 10px;
}

.ticket-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  font: inherit;
  padding: 12px;
  text-align: left;
}

.ticket-item.selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px rgba(17, 124, 136, 0.18);
}

.ticket-select-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.ticket-select-button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ticket-top strong {
  overflow-wrap: anywhere;
}

.ticket-status {
  display: inline-grid;
  place-items: center;
  min-width: 70px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--placeholder-bg);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-status.won {
  background: var(--won-bg);
  color: var(--green-dark);
}

.ticket-status.lost {
  background: var(--lost-bg);
  color: var(--red);
}

.ticket-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.ticket-numbers span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--placeholder-bg);
  font-size: 0.78rem;
  font-weight: 900;
}

.ticket-numbers span.drawn {
  border: 1px solid var(--drawn-border);
  background: linear-gradient(135deg, var(--drawn-start), var(--drawn-end));
  color: var(--drawn-ink);
  box-shadow:
    0 0 10px var(--drawn-glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.ticket-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  overflow-x: hidden;
}

.ticket-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.ticket-delete-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(180, 35, 52, 0.32);
  border-radius: 8px;
  background: var(--lost-bg);
  color: var(--red);
  font-weight: 900;
}

.ticket-delete-button:hover,
.ticket-delete-button:focus-visible {
  border-color: var(--red);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(96px, calc(18px + env(safe-area-inset-bottom)));
  z-index: 90;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: min(430px, calc(100% - 28px));
  min-height: 62px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--toast-accent, var(--teal));
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--ink);
  box-shadow: 0 20px 54px rgba(16, 17, 20, 0.22);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px) scale(0.98);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--toast-accent, var(--teal)) 16%, var(--panel));
  color: var(--toast-accent, var(--teal));
  font-size: 0.76rem;
  font-weight: 950;
}

.toast-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.toast-body strong,
.toast-body span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-body strong {
  font-size: 0.82rem;
  line-height: 1.1;
}

.toast-body span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.25;
  white-space: normal;
}

.toast-success {
  --toast-accent: var(--green);
}

.toast-error {
  --toast-accent: var(--red);
}

.toast-warning {
  --toast-accent: var(--amber);
}

.toast-info {
  --toast-accent: var(--teal);
}


/* ═══════════════════════════════════════════
   Admin Receipt Card & Viewer
   ═══════════════════════════════════════════ */

/* ── Receipt Thumbnail Card (admin panel) ── */
.admin-receipt-card {
  margin-top: 6px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
}

.admin-receipt-thumb-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #0a0c14;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.admin-receipt-thumb {
  display: block;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.2s;
}

.admin-receipt-thumb-wrap:hover .admin-receipt-thumb {
  transform: scale(1.02);
}

.admin-receipt-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.admin-receipt-thumb-wrap:hover .admin-receipt-overlay {
  opacity: 1;
}

.admin-receipt-overlay svg {
  width: 22px;
  height: 22px;
}

/* ── Receipt Download Button ── */
.admin-receipt-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.admin-receipt-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(100,180,255,0.25);
  border-radius: 8px;
  background: rgba(100,180,255,0.08);
  color: #64b4ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.admin-receipt-download-btn:hover,
.admin-receipt-download-btn:focus-visible {
  background: rgba(100,180,255,0.16);
  border-color: rgba(100,180,255,0.4);
  color: #8bcbff;
}

.admin-receipt-download-btn svg {
  flex-shrink: 0;
}

/* ── Receipt Note & Meta ── */
.admin-receipt-note {
  margin-top: 6px;
  font-size: 11px;
  color: #aaa;
  padding: 4px 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
}

.admin-receipt-meta {
  margin-top: 4px;
  font-size: 10px;
  color: #667;
}

/* ── Receipt Viewer Modal ── */
.receipt-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
}

.receipt-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(20,22,30,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 2;
  gap: 12px;
  flex-shrink: 0;
}

.receipt-viewer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #c0c8d4;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.receipt-viewer-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.receipt-viewer-close-btn {
  margin-left: auto;
}

.receipt-viewer-zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.receipt-viewer-zoom-label {
  font-size: 12px;
  font-weight: 600;
  color: #889;
  min-width: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.receipt-viewer-image-area {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  touch-action: pan-x pan-y pinch-zoom;
}

.receipt-viewer-image {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.15s ease-out;
  user-select: none;
  -webkit-user-drag: none;
}

.receipt-viewer-info {
  padding: 6px 16px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(20,22,30,0.95);
  z-index: 2;
  flex-shrink: 0;
}

.receipt-viewer-filename {
  font-size: 11px;
  color: #667;
}

/* ── Light Theme ── */
html[data-theme="light"] .admin-receipt-card {
  border-color: rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.02);
}

html[data-theme="light"] .admin-receipt-thumb-wrap {
  background: #e8ecf4;
}

html[data-theme="light"] .admin-receipt-download-btn {
  background: rgba(74,140,212,0.06);
  border-color: rgba(74,140,212,0.2);
  color: #4a8cd4;
}

html[data-theme="light"] .admin-receipt-download-btn:hover {
  background: rgba(74,140,212,0.14);
  border-color: rgba(74,140,212,0.4);
  color: #2a6cb4;
}

html[data-theme="light"] .admin-receipt-note {
  background: rgba(0,0,0,0.03);
  color: #667;
}

html[data-theme="light"] .receipt-viewer-toolbar,
html[data-theme="light"] .receipt-viewer-info {
  background: rgba(250,250,252,0.95);
  border-color: rgba(0,0,0,0.08);
}

html[data-theme="light"] .receipt-viewer-btn {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: #445;
}

html[data-theme="light"] .receipt-viewer-btn:hover {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.2);
  color: #223;
}

html[data-theme="light"] .receipt-viewer-backdrop {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .admin-receipt-thumb {
    max-height: 160px;
  }
  .receipt-viewer-toolbar {
    padding: 8px 10px;
    gap: 6px;
  }
  .receipt-viewer-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  .receipt-viewer-btn span {
    display: none;
  }
  .receipt-viewer-image-area {
    padding: 10px;
  }
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 18, 22, 0.28);
}

.confirm-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  width: min(430px, 100%);
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--red) 34%, var(--line));
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.34);
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--red) 14%, var(--panel));
  color: var(--red);
  font-weight: 950;
}

.confirm-card h2 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.confirm-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.confirm-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.confirm-actions .secondary-button,
.confirm-actions .danger-button {
  min-height: 44px;
}

/* ── Admin Password Change Modal ── */
.admin-password-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(460px, calc(100% - 24px));
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.34);
}

.admin-password-card .confirm-icon {
  align-self: flex-start;
}

.admin-password-card h2 {
  margin: 0 0 4px;
  font-size: 1.08rem;
}

.admin-password-card .muted-text {
  margin: 0;
  font-size: 0.86rem;
}

.admin-password-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.admin-password-field {
  display: grid;
  gap: 5px;
  width: 100%;
}

.admin-password-field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.admin-password-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}

.admin-password-field input:focus {
  border-color: rgba(104, 122, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(104, 122, 255, 0.1);
}

.admin-password-field input::placeholder {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}

.admin-password-card .confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.admin-password-card .confirm-actions .secondary-button,
.admin-password-card .confirm-actions .danger-button {
  min-height: 48px;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: 10px;
}

/* Mobile */
@media (max-width: 480px) {
  .admin-password-card {
    width: calc(100% - 16px);
    padding: 18px 14px;
    gap: 12px;
    border-radius: 14px;
  }
  .admin-password-field input {
    min-height: 50px;
    font-size: 16px; /* prevent iOS zoom */
  }
  .admin-password-card .confirm-actions .secondary-button,
  .admin-password-card .confirm-actions .danger-button {
    min-height: 46px;
  }
}

/* ── Admin Card History Modal ── */
.history-modal-card {
  width: min(800px, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.history-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.history-modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.history-modal-header .muted-text {
  flex: 1;
  font-size: 0.85rem;
}

.history-modal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  background: var(--field-bg);
  border-radius: 8px;
}

.history-modal-filters .admin-field {
  min-width: 130px;
  flex: 1;
}

.history-modal-count {
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

#adminCardHistoryList {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

#adminCardHistoryList .card-withdrawal-item {
  margin-bottom: 6px;
}

.rules-backdrop {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(16, 18, 22, 0.24);
}

.rules-dialog-card {
  width: min(680px, 100%);
  max-height: min(720px, calc(100dvh - 32px));
  overflow-y: auto;
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.28);
}

.rules-dialog-card .secondary-button {
  min-height: 44px;
}

.admin-body {
  background: var(--bg);
  overflow-x: hidden;
  max-width: 100vw;
}

/* ── Admin loading — shell gizli, auth yoxlanana qədər ── */
.admin-loading .admin-shell {
  visibility: hidden;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  border-bottom: 1px solid var(--betbar-line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}

/* ── Admin Header Actions (Parolu dəyiş + Çıxış) ── */
.admin-header-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.admin-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ticket-bg);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.admin-action-btn:hover {
  background: var(--inverse);
  border-color: rgba(104, 122, 255, 0.35);
}

.admin-logout-btn {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.06);
  color: #ef4444;
}

.admin-logout-btn:hover {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f55;
}

@media (max-width: 480px) {
  .admin-action-btn {
    min-width: 100px;
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.78rem;
  }
}

@media (max-width: 360px) {
  .admin-action-btn {
    min-width: 90px;
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.74rem;
  }
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.admin-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-wash);
  box-shadow: 0 10px 28px rgba(16, 17, 20, 0.08);
  padding: 16px;
  overflow-x: hidden;
  max-width: 100%;
}

.admin-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-wash);
  box-shadow: 0 10px 28px rgba(16, 17, 20, 0.08);
}

.admin-page {
  grid-column: 1 / -1;
}

.admin-page-hidden {
  display: none !important;
}

.admin-menu a,
.admin-menu button {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.admin-menu a:hover,
.admin-menu a:focus-visible,
.admin-menu button:hover,
.admin-menu button:focus-visible,
.admin-menu button.active {
  border-color: var(--teal);
}

.admin-menu button.active {
  background: color-mix(in srgb, var(--teal) 18%, var(--ticket-bg));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal) 42%, transparent);
}

.wide-panel {
  grid-column: 1 / -1;
}

.admin-settings-surface {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-settings-surface .primary-button {
  margin-top: 10px;
}

.admin-field {
  min-width: 0;
  margin: 12px 0;
}

.compact-field {
  margin: 0;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-field textarea {
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.4;
}

.admin-field select {
  appearance: none;
}

.admin-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin: 12px 0;
}

.admin-create-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.balance-add-row {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.7fr) minmax(96px, 0.45fr);
}

.treasury-button-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.treasury-button-row .primary-button,
.treasury-button-row .secondary-button {
  min-height: 44px;
}

.admin-action-row .secondary-button {
  min-height: 44px;
  padding: 0 14px;
}

.user-results {
  display: grid;
  gap: 8px;
  min-height: 44px;
  margin: 10px 0 14px;
}

.user-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  padding: 0 12px;
  text-align: left;
}

.user-result span {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-result strong {
  color: var(--gold);
}

.positive-result {
  color: var(--green);
}

.negative-result {
  color: var(--red);
}

.rtp-ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.rtp-ledger-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  padding: 10px;
}

.rtp-ledger-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rtp-ledger-grid strong {
  display: block;
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.danger-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(180, 35, 52, 0.34);
  border-radius: 8px;
  background: var(--lost-bg);
  color: var(--red);
  font-weight: 950;
}

.admin-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-service-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.service-action-row {
  grid-template-columns: auto auto;
  justify-content: start;
}

.service-admin-item .admin-settings-row {
  grid-template-columns: auto auto;
  justify-content: start;
}

.admin-breakdown-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  padding: 12px;
  overflow-x: hidden;
  max-width: 100%;
}

.admin-settings-row {
  display: grid;
  grid-template-columns: 120px minmax(170px, 1fr) auto auto auto;
  align-items: end;
  gap: 8px;
  margin-top: 12px;
}

.admin-mini-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-mini-field span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-mini-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--ink);
  padding: 0 10px;
}

.admin-inline-check,
.admin-checkbox-card {
  min-height: 38px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
}

.admin-settings-row .primary-button,
.admin-settings-row .secondary-button,
.admin-settings-row .ticket-delete-button {
  min-height: 34px;
  min-width: 90px;
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}


/* ── Admin Balance Toggle (collapsible) ── */

/* ── Admin Balance Modal Row ── */
.admin-balance-modal-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-top: 12px;
}

.admin-balance-field {
  flex: 1;
  min-width: 100px;
}

.admin-balance-field select,
.admin-balance-field input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

/* Responsive — mobile */
@media (max-width: 480px) {
  .admin-balance-modal-row {
    flex-direction: column;
    gap: 12px;
    /* Fix: span full card width — this row was trapped in grid column 1 (46px) */
    grid-column: 1 / -1;
  }
  .admin-balance-field {
    min-width: 0;
  }
  .admin-balance-field select,
  .admin-balance-field input {
    min-height: 52px;
    padding: 14px 16px;
    font-size: 17px;
    border-radius: 12px;
  }
}

/* Telegram Mini App — span full width + enlarged input */
[data-telegram-mini-app="true"] .admin-balance-modal-row {
  grid-column: 1 / -1;
}
[data-telegram-mini-app="true"] .admin-balance-field select,
[data-telegram-mini-app="true"] .admin-balance-field input {
  min-height: 52px;
  padding: 14px 16px;
  font-size: 17px;
  border-radius: 12px;
}

@media (max-width: 480px) {
  [data-telegram-mini-app="true"] .admin-balance-field select,
  [data-telegram-mini-app="true"] .admin-balance-field input {
    min-height: 56px;
    padding: 16px 18px;
    font-size: 18px;
  }
}

/* ── Deposit Reject Reason Textarea ── */
#depositRejectReasonInput {
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  margin: 8px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

#depositRejectReasonInput::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

#depositRejectReasonInput:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent);
}

/* Mobile / TMA — larger textarea */
@media (max-width: 480px) {
  #depositRejectReasonInput {
    min-height: 140px;
    padding: 16px;
    font-size: 17px;
    border-radius: 14px;
  }
}

[data-telegram-mini-app="true"] #depositRejectReasonInput {
  min-height: 140px;
  padding: 16px;
  font-size: 17px;
  border-radius: 14px;
}

@media (max-width: 480px) {
  [data-telegram-mini-app="true"] #depositRejectReasonInput {
    min-height: 150px;
    padding: 16px 18px;
    font-size: 18px;
  }
}

.admin-balance-toggle-section {
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}

.admin-balance-toggle-section[open] {
  background: rgba(255,255,255,0.04);
}

.admin-balance-toggle-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #8899bb;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.2s;
}

.admin-balance-toggle-btn::-webkit-details-marker {
  display: none;
}

.admin-balance-toggle-btn::after {
  content: ' ▾';
  font-size: 11px;
  color: #667;
}

.admin-balance-toggle-section[open] .admin-balance-toggle-btn::after {
  content: ' ▴';
}

.admin-balance-toggle-btn:hover {
  background: rgba(255,255,255,0.03);
  color: #aabbcc;
}

.admin-balance-toggle-section .admin-action-row {
  padding: 0 16px 12px;
}

/* ── Admin Percent Row ── */

/* ── Admin Balance Mini Row (admin kartlarında balans çipləri) ── */
.admin-balance-mini-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.admin-balance-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: #667;
  white-space: nowrap;
}

.admin-balance-chip.has-balance {
  background: rgba(100,180,255,0.08);
  color: #8899bb;
}

.admin-balance-chip strong {
  font-weight: 700;
  margin-right: 3px;
}

/* Light theme */
html[data-theme="light"] .admin-balance-mini-row {
  border-top-color: rgba(0,0,0,0.06);
}

html[data-theme="light"] .admin-balance-chip {
  background: rgba(0,0,0,0.03);
  color: #889;
}

html[data-theme="light"] .admin-balance-chip.has-balance {
  background: rgba(74,140,212,0.08);
  color: #4a6d94;
}

.admin-percent-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 8px;
  overflow-x: hidden;
}

.admin-percent-field {
  flex: 1;
  min-width: 120px;
}

.admin-percent-field input {
  width: 100%;
}

.admin-inline-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  white-space: nowrap;
}

.admin-inline-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #64b4ff;
}

/* Light theme */
html[data-theme="light"] .admin-balance-toggle-section {
  border-color: rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.02);
}

html[data-theme="light"] .admin-balance-toggle-section[open] {
  background: rgba(0,0,0,0.03);
}

html[data-theme="light"] .admin-balance-toggle-btn {
  color: #667;
}

html[data-theme="light"] .admin-balance-toggle-btn:hover {
  background: rgba(0,0,0,0.03);
  color: #445;
}

html[data-theme="light"] .admin-inline-check {
  color: #334;
}

/* Responsive */
@media (max-width: 480px) {
  .admin-percent-row {
    flex-direction: column;
    gap: 6px;
  }
  .admin-percent-field {
    min-width: 0;
  }
  .admin-balance-toggle-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

.admin-link-line {
  max-width: 100%;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.checkbox-line.admin-inline-check,
.checkbox-line.admin-checkbox-card {
  margin: 0;
}

/* ── Modern toggle switch ── */
.telegram-deposit-toggle {
  cursor: pointer;
  user-select: none;
}

.deposit-toggle input[type="checkbox"],
.telegram-deposit-toggle input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.toggle-switch {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--muted);
  transition: background 0.25s ease;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.25s ease;
}

.deposit-toggle input:checked + .toggle-switch,
.telegram-deposit-toggle input:checked + .toggle-switch {
  background: #2ea043;
}

.deposit-toggle input:checked + .toggle-switch::after,
.telegram-deposit-toggle input:checked + .toggle-switch::after {
  transform: translateX(20px);
}

.deposit-toggle input:focus-visible + .toggle-switch,
.telegram-deposit-toggle input:focus-visible + .toggle-switch {
  outline: 2px solid var(--accent, #4da3ff);
  outline-offset: 2px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.stat-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--ticket-bg);
  padding: 10px;
}

.stat-grid span,
.muted-text {
  color: var(--muted);
}

.stat-grid span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.stat-grid strong {
  display: block;
  overflow: hidden;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact {
  grid-template-columns: repeat(10, 32px);
  min-height: 32px;
}

.hidden {
  display: none !important;
}

body.game-active {
  color-scheme: dark;
  --bg: #040713;
  --ink: #f8fbff;
  --muted: #9da8c4;
  --line: rgba(112, 146, 255, 0.26);
  --panel: #080d21;
  --panel-strong: #0b1128;
  --panel-wash: rgba(8, 13, 33, 0.84);
  --control: rgba(16, 20, 48, 0.92);
  --field-bg: rgba(6, 11, 28, 0.94);
  --placeholder-bg: rgba(38, 47, 86, 0.58);
  --placeholder-ink: #7280a8;
  --inverse: #f8fbff;
  --inverse-ink: #060917;
  --betbar-bg: rgba(5, 9, 23, 0.92);
  --betbar-line: rgba(34, 230, 255, 0.28);
  --ticket-bg: rgba(9, 14, 36, 0.88);
  --won-bg: rgba(28, 255, 184, 0.16);
  --lost-bg: rgba(255, 61, 128, 0.15);
  --green: #22f0c7;
  --green-dark: #11c8a5;
  --red: #ff5d92;
  --amber: #ffd166;
  --teal: #24e6ff;
  --violet: #d94dff;
  --gold: #32ffc6;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.46);
  background:
    radial-gradient(circle at 18% 14%, rgba(227, 54, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 86% 34%, rgba(29, 218, 255, 0.20), transparent 34rem),
    linear-gradient(180deg, #050718 0%, #050916 48%, #030511 100%);
}

body.game-active .app-shell {
  color: var(--ink);
}

body.game-active .topbar {
  border-bottom-color: rgba(57, 230, 255, 0.20);
  background:
    linear-gradient(180deg, rgba(4, 7, 19, 0.96), rgba(4, 7, 19, 0.78));
}

body.game-active .game-brand h1 {
  color: #fff;
  font-weight: 950;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(55, 232, 255, 0.38),
    0 0 32px rgba(217, 77, 255, 0.26);
}

body.game-active .wallet-panel,
body.game-active .menu-button,
body.game-active .theme-toggle,
body.game-active .timer-panel,
body.game-active .amount-field,
body.game-active .multiplier-box {
  border-color: rgba(93, 120, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(13, 20, 48, 0.94), rgba(7, 11, 29, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 14px 34px rgba(0, 0, 0, 0.32);
}

body.game-active .wallet-panel strong {
  color: #27ffc2;
  font-size: 1.08rem;
  text-shadow: 0 0 14px rgba(39, 255, 194, 0.34);
}

body.game-active .timer-panel {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  min-width: 92px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  text-align: center;
  background:
    radial-gradient(circle, #070b1b 58%, transparent 59%),
    conic-gradient(from -35deg, #22e7ff 0 32%, #3954ff 33% 52%, #f045ff 53% 86%, rgba(80, 96, 150, 0.42) 87% 100%);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(90, 240, 255, 0.30),
    0 0 26px rgba(217, 77, 255, 0.42),
    0 0 32px rgba(36, 230, 255, 0.24);
}

body.game-active .timer-panel strong {
  margin: 0;
  color: #fff;
  font-size: 1.85rem;
  line-height: 1;
}

body.game-active .phase-chip {
  color: #f05cff;
  font-size: 0.78rem;
  text-shadow: 0 0 12px rgba(240, 92, 255, 0.58);
}

body.game-active .menu-button {
  min-height: 54px;
  border-radius: 8px;
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 22px rgba(150, 83, 255, 0.22);
}

body.game-active .number-section {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 12, 31, 0.94), rgba(4, 12, 27, 0.92)) padding-box,
    linear-gradient(135deg, rgba(255, 54, 230, 0.86), rgba(38, 231, 255, 0.88)) border-box;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 22px rgba(255, 50, 230, 0.34),
    0 0 30px rgba(36, 230, 255, 0.28),
    inset 0 0 42px rgba(36, 230, 255, 0.06);
}

body.game-active .number-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 61, 236, 0.16), transparent 22%, transparent 78%, rgba(37, 231, 255, 0.16)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 22%);
}

body.game-active .number-section > * {
  position: relative;
}

body.game-active .section-title h2 {
  color: #fff;
  font-weight: 950;
  text-transform: uppercase;
}

body.game-active .section-title span {
  color: rgba(205, 213, 241, 0.76);
}

body.game-active .number-button {
  border-color: rgba(121, 132, 255, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(13, 18, 43, 0.96), rgba(5, 9, 23, 0.98));
  color: #f8fbff;
  box-shadow:
    inset 0 0 18px rgba(54, 87, 180, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.025);
}

body.game-active .number-button.selected {
  border-color: var(--drawn-border);
  background:
    linear-gradient(135deg, var(--drawn-start), var(--drawn-end));
  color: var(--drawn-ink);
  box-shadow:
    0 0 18px var(--drawn-glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

body.game-active .number-button.drawn {
  border-color: var(--drawn-border);
  background:
    linear-gradient(135deg, var(--drawn-start), var(--drawn-end));
  color: var(--drawn-ink);
  opacity: 1;
  box-shadow:
    0 0 18px var(--drawn-glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

body.game-active .number-button.selected.drawn {
  border-color: var(--drawn-border);
  color: var(--drawn-ink);
  background:
    linear-gradient(135deg, var(--drawn-start), var(--drawn-end));
  box-shadow:
    0 0 20px var(--drawn-glow),
    inset 0 0 0 2px rgba(255, 255, 255, 0.42);
}

body.game-active .number-button:disabled:not(.drawn) {
  opacity: 0.46;
}

body.game-active .bet-bar {
  border: 1px solid transparent;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 12, 30, 0.92), rgba(4, 8, 20, 0.94)) padding-box,
    linear-gradient(135deg, rgba(255, 61, 236, 0.46), rgba(36, 230, 255, 0.48)) border-box;
  box-shadow:
    0 0 22px rgba(255, 61, 236, 0.20),
    0 0 28px rgba(36, 230, 255, 0.22),
    0 18px 46px rgba(0, 0, 0, 0.46);
}

body.game-active .primary-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(110deg, #ff35dd 0%, #8d55ff 42%, #24e6ff 100%);
  color: #03101e;
  box-shadow:
    0 0 22px rgba(255, 54, 230, 0.40),
    0 0 26px rgba(36, 230, 255, 0.32);
}

body.game-active .primary-button:hover {
  background:
    linear-gradient(110deg, #ff55e2 0%, #9e69ff 42%, #4cecff 100%);
}

body.game-active .secondary-button {
  border-color: rgba(128, 100, 255, 0.50);
  background:
    linear-gradient(135deg, rgba(78, 69, 255, 0.90), rgba(222, 44, 255, 0.84));
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    0 0 20px rgba(135, 86, 255, 0.34);
}

body.game-active .amount-field input,
body.game-active .multiplier-box strong {
  color: #fff;
  text-shadow: 0 0 14px rgba(36, 230, 255, 0.22);
}

body.game-active .account-menu,
body.game-active .password-form,
body.game-active .crypto-panel {
  border-color: rgba(104, 122, 255, 0.30);
  background: rgba(7, 11, 28, 0.96);
  box-shadow:
    0 24px 62px rgba(0, 0, 0, 0.58),
    0 0 26px rgba(36, 230, 255, 0.16);
}

body.game-active .account-menu-header {
  border-bottom-color: rgba(104, 122, 255, 0.24);
  background: rgba(7, 11, 28, 0.88);
}

body.game-active .account-menu-header span {
  color: rgba(205, 213, 241, 0.78);
}

body.game-active .menu-item,
body.game-active .account-menu-close,
body.game-active .language-option,
body.game-active .crypto-address-field input,
body.game-active .crypto-address-field select,
body.game-active .crypto-mini-form input,
body.game-active .crypto-mini-form select,
body.game-active .password-form input {
  border-color: rgba(104, 122, 255, 0.28);
  background: rgba(13, 18, 43, 0.94);
  color: #fff;
}

body.game-active .ticket-drawer {
  border-left: 1px solid rgba(93, 120, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(5, 7, 20, 0.98), rgba(6, 9, 25, 0.98));
  color: var(--ink);
  box-shadow:
    -20px 0 72px rgba(0, 0, 0, 0.62),
    -8px 0 38px rgba(164, 71, 255, 0.16);
}

body.game-active .drawer-header {
  position: sticky;
  top: -18px;
  z-index: 2;
  padding: 14px 0 16px;
  margin-bottom: 14px;
  background:
    linear-gradient(180deg, rgba(5, 7, 20, 1), rgba(5, 7, 20, 0.88));
}

body.game-active .drawer-header::before {
  content: "";
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 8px;
  background:
    radial-gradient(circle at 34% 35%, #f1d8ff 0 10%, transparent 11%),
    radial-gradient(circle at 60% 52%, #c48dff 0 16%, transparent 17%),
    linear-gradient(135deg, rgba(115, 70, 255, 0.84), rgba(222, 70, 255, 0.64));
  box-shadow: 0 0 22px rgba(188, 89, 255, 0.36);
}

body.game-active .drawer-header .eyebrow {
  color: #b65cff;
  font-weight: 950;
}

body.game-active .drawer-header h2 {
  color: #fff;
  font-size: 2rem;
}

body.game-active .icon-button {
  border-color: rgba(223, 65, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(39, 16, 67, 0.96), rgba(16, 11, 42, 0.96));
  color: #fff;
  box-shadow:
    0 0 20px rgba(217, 77, 255, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.game-active .ticket-list {
  gap: 14px;
}

body.game-active .ticket-item {
  --ticket-accent: #d94dff;
  --ticket-accent-2: #7b4dff;
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ticket-accent) 70%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ticket-accent) 18%, transparent), transparent 45%),
    linear-gradient(180deg, rgba(12, 14, 38, 0.96), rgba(7, 10, 28, 0.96));
  box-shadow:
    0 0 18px color-mix(in srgb, var(--ticket-accent) 44%, transparent),
    inset 0 0 34px color-mix(in srgb, var(--ticket-accent-2) 16%, transparent);
}

body.game-active .ticket-tone-blue {
  --ticket-accent: #2f70ff;
  --ticket-accent-2: #24e6ff;
}

body.game-active .ticket-tone-teal {
  --ticket-accent: #26f0c8;
  --ticket-accent-2: #24e6ff;
}

body.game-active .ticket-item.selected {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--ticket-accent) 80%, transparent),
    0 0 28px color-mix(in srgb, var(--ticket-accent) 60%, transparent),
    inset 0 0 42px color-mix(in srgb, var(--ticket-accent-2) 20%, transparent);
}

body.game-active .ticket-select-button {
  display: grid;
  gap: 14px;
  min-height: 190px;
  padding: 16px;
}

body.game-active .ticket-top {
  margin: 0;
  align-items: center;
}

body.game-active .ticket-badge {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ticket-accent) 74%, #fff 0%), color-mix(in srgb, var(--ticket-accent-2) 56%, transparent));
  color: #fff;
  font-size: 0.92rem;
  letter-spacing: 0;
  box-shadow: 0 0 18px color-mix(in srgb, var(--ticket-accent) 46%, transparent);
}

body.game-active .ticket-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ticket-accent);
  font-size: 0.78rem;
}

body.game-active .ticket-status-eye {
  position: relative;
  width: 22px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 999px / 760px;
  transform: rotate(-6deg);
}

body.game-active .ticket-status-eye::after {
  content: "";
  position: absolute;
  inset: 3px 7px;
  border-radius: 999px;
  background: currentColor;
}

body.game-active .ticket-status.won {
  color: #27ffc2;
}

body.game-active .ticket-status.lost {
  color: #ff5d92;
}

body.game-active .ticket-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.48fr);
  gap: 12px;
  align-items: end;
}

body.game-active .ticket-card-main {
  min-width: 0;
}

body.game-active .ticket-numbers {
  margin: 0 0 18px;
  gap: 8px;
}

body.game-active .ticket-numbers span {
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--ticket-accent) 70%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 13, 33, 0.98), rgba(4, 7, 20, 0.98));
  color: #fff;
  font-size: 1rem;
  box-shadow:
    0 0 12px color-mix(in srgb, var(--ticket-accent) 34%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

body.game-active .ticket-numbers span.drawn {
  border-color: var(--drawn-border);
  background: linear-gradient(135deg, var(--drawn-start), var(--drawn-end));
  color: var(--drawn-ink);
  box-shadow:
    0 0 18px var(--drawn-glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

body.game-active .ticket-meta {
  gap: 9px;
  color: #c6cff1;
  font-size: 0.95rem;
}

body.game-active .ticket-meta > span {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

body.game-active .ticket-meta > span > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.game-active .ticket-meta-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--ticket-accent);
}

body.game-active .ticket-meta-icon::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 4px;
  box-shadow: 0 0 10px color-mix(in srgb, currentColor 38%, transparent);
}

body.game-active .meta-stake::before {
  border-radius: 999px;
  height: 10px;
  box-shadow:
    0 -5px 0 -2px currentColor,
    0 5px 0 -2px currentColor,
    0 0 10px color-mix(in srgb, currentColor 38%, transparent);
}

body.game-active .meta-wallet::before {
  border-radius: 5px;
  width: 17px;
  height: 13px;
}

body.game-active .meta-hit::before,
body.game-active .meta-result::before {
  border-radius: 999px;
}

body.game-active .ticket-stub {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 76px;
  margin: 8px 6px 10px 0;
  border: 1px solid color-mix(in srgb, var(--ticket-accent) 72%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ticket-accent) 26%, transparent), rgba(10, 13, 36, 0.72));
  color: var(--ticket-accent);
  transform: rotate(-11deg);
  box-shadow:
    0 0 22px color-mix(in srgb, var(--ticket-accent) 44%, transparent),
    inset 0 0 24px color-mix(in srgb, var(--ticket-accent-2) 16%, transparent);
}

body.game-active .ticket-stub::before,
body.game-active .ticket-stub::after {
  content: "";
  position: absolute;
  left: -9px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #070a1c;
  border-right: 1px solid color-mix(in srgb, var(--ticket-accent) 54%, transparent);
}

body.game-active .ticket-stub::before {
  top: 12px;
}

body.game-active .ticket-stub::after {
  bottom: 12px;
}

body.game-active .ticket-stub span {
  color: currentColor;
  font-size: 2rem;
  font-weight: 950;
  text-shadow: 0 0 18px color-mix(in srgb, var(--ticket-accent) 62%, transparent);
}

body.game-active .ticket-actions {
  margin: 0;
  padding: 0 14px 14px;
}

body.game-active .ticket-delete-button {
  border-color: rgba(255, 93, 146, 0.44);
  background: rgba(255, 93, 146, 0.12);
  color: #ff8caf;
}

html[data-theme="light"] body.game-active {
  color-scheme: light;
  --bg: #f5f8ff;
  --ink: #101624;
  --muted: #5d687c;
  --line: rgba(73, 102, 176, 0.24);
  --panel: #ffffff;
  --panel-strong: #f8fbff;
  --panel-wash: rgba(255, 255, 255, 0.88);
  --control: rgba(240, 246, 255, 0.94);
  --field-bg: rgba(247, 251, 255, 0.96);
  --placeholder-bg: rgba(226, 235, 250, 0.9);
  --placeholder-ink: #76839a;
  --inverse: #101624;
  --inverse-ink: #ffffff;
  --betbar-bg: rgba(255, 255, 255, 0.88);
  --betbar-line: rgba(73, 102, 176, 0.22);
  --ticket-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 20px 54px rgba(57, 78, 126, 0.18);
  background:
    radial-gradient(circle at 18% 12%, rgba(14, 165, 233, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 34%, rgba(168, 85, 247, 0.12), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, #eef5ff 54%, #f7fbff 100%);
}

html[data-theme="light"] body.game-active .topbar {
  border-bottom-color: rgba(73, 102, 176, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.82));
}

html[data-theme="light"] body.game-active .game-brand h1 {
  color: #101624;
  text-shadow:
    0 0 18px rgba(14, 165, 233, 0.20),
    0 0 28px rgba(168, 85, 247, 0.12);
}

html[data-theme="light"] body.game-active .wallet-panel,
html[data-theme="light"] body.game-active .menu-button,
html[data-theme="light"] body.game-active .theme-toggle,
html[data-theme="light"] body.game-active .amount-field,
html[data-theme="light"] body.game-active .multiplier-box {
  border-color: rgba(73, 102, 176, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 246, 255, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 14px 32px rgba(57, 78, 126, 0.12);
}

html[data-theme="light"] body.game-active .wallet-panel strong {
  color: #087f68;
  text-shadow: 0 0 12px rgba(20, 184, 166, 0.20);
}

html[data-theme="light"] body.game-active .timer-panel {
  background:
    radial-gradient(circle, #ffffff 58%, transparent 59%),
    conic-gradient(from -35deg, #06b6d4 0 32%, #60a5fa 33% 52%, #c084fc 53% 86%, rgba(148, 163, 184, 0.38) 87% 100%);
  color: #101624;
  box-shadow:
    0 0 0 1px rgba(14, 165, 233, 0.20),
    0 0 24px rgba(14, 165, 233, 0.20),
    0 0 30px rgba(168, 85, 247, 0.14);
}

html[data-theme="light"] body.game-active .timer-panel strong {
  color: #101624;
}

html[data-theme="light"] body.game-active .phase-chip {
  color: #7c3aed;
  text-shadow: none;
}

html[data-theme="light"] body.game-active .menu-button {
  color: #101624;
}

html[data-theme="light"] body.game-active .number-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 247, 255, 0.92)) padding-box,
    linear-gradient(135deg, rgba(168, 85, 247, 0.48), rgba(14, 165, 233, 0.56)) border-box;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.72),
    0 18px 44px rgba(57, 78, 126, 0.14),
    inset 0 0 38px rgba(14, 165, 233, 0.05);
}

html[data-theme="light"] body.game-active .number-section::before {
  background:
    linear-gradient(90deg, rgba(168, 85, 247, 0.08), transparent 24%, transparent 76%, rgba(14, 165, 233, 0.10)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 26%);
}

html[data-theme="light"] body.game-active .bet-bar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 247, 255, 0.94)) padding-box,
    linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(14, 165, 233, 0.34)) border-box;
  box-shadow:
    0 16px 40px rgba(57, 78, 126, 0.14),
    0 0 20px rgba(14, 165, 233, 0.12);
}

html[data-theme="light"] body.game-active .section-title h2 {
  color: #101624;
}

html[data-theme="light"] body.game-active .section-title span {
  color: #69758b;
}

html[data-theme="light"] body.game-active .number-button {
  border-color: rgba(95, 116, 172, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 241, 255, 0.94));
  color: #152033;
  box-shadow:
    inset 0 0 14px rgba(14, 165, 233, 0.05),
    0 7px 16px rgba(57, 78, 126, 0.08);
}

html[data-theme="light"] body.game-active .number-button.selected {
  border-color: var(--drawn-border);
  background:
    linear-gradient(135deg, var(--drawn-start), var(--drawn-end));
  color: var(--drawn-ink);
  box-shadow:
    0 0 16px var(--drawn-glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.54);
}

html[data-theme="light"] body.game-active .number-button.drawn {
  border-color: var(--drawn-border);
  background:
    linear-gradient(135deg, var(--drawn-start), var(--drawn-end));
  color: var(--drawn-ink);
  opacity: 1;
  box-shadow:
    0 0 16px var(--drawn-glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

html[data-theme="light"] body.game-active .number-button.selected.drawn {
  border-color: var(--drawn-border);
  background:
    linear-gradient(135deg, var(--drawn-start), var(--drawn-end));
  color: var(--drawn-ink);
  box-shadow:
    0 0 18px var(--drawn-glow),
    inset 0 0 0 2px color-mix(in srgb, var(--drawn-ink) 18%, transparent);
}

html[data-theme="light"] body.game-active .bet-bar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 247, 255, 0.94)) padding-box,
    linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(14, 165, 233, 0.34)) border-box;
  box-shadow:
    0 16px 40px rgba(57, 78, 126, 0.14),
    0 0 20px rgba(14, 165, 233, 0.12);
}

html[data-theme="light"] body.game-active .primary-button {
  color: #081321;
  background:
    linear-gradient(110deg, #f9a8d4 0%, #c4b5fd 42%, #67e8f9 100%);
  box-shadow:
    0 0 18px rgba(14, 165, 233, 0.18),
    0 10px 26px rgba(57, 78, 126, 0.12);
}

html[data-theme="light"] body.game-active .secondary-button {
  border-color: rgba(124, 58, 237, 0.25);
  background:
    linear-gradient(135deg, rgba(238, 242, 255, 0.98), rgba(224, 242, 254, 0.98));
  color: #172554;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.58),
    0 10px 24px rgba(57, 78, 126, 0.10);
}

html[data-theme="light"] body.game-active .amount-field input,
html[data-theme="light"] body.game-active .multiplier-box strong {
  color: #101624;
  text-shadow: none;
}

html[data-theme="light"] body.game-active .account-menu,
html[data-theme="light"] body.game-active .password-form,
html[data-theme="light"] body.game-active .crypto-panel {
  border-color: rgba(73, 102, 176, 0.20);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 24px 56px rgba(57, 78, 126, 0.18),
    0 0 24px rgba(14, 165, 233, 0.08);
}

html[data-theme="light"] body.game-active .account-menu-header {
  border-bottom-color: rgba(73, 102, 176, 0.16);
  background: rgba(255, 255, 255, 0.90);
}

html[data-theme="light"] body.game-active .account-menu-header span {
  color: #64748b;
}

html[data-theme="light"] body.game-active .menu-item,
html[data-theme="light"] body.game-active .account-menu-close,
html[data-theme="light"] body.game-active .language-option,
html[data-theme="light"] body.game-active .draw-color-option,
html[data-theme="light"] body.game-active .crypto-address-field input,
html[data-theme="light"] body.game-active .crypto-address-field select,
html[data-theme="light"] body.game-active .crypto-mini-form input,
html[data-theme="light"] body.game-active .crypto-mini-form select,
html[data-theme="light"] body.game-active .password-form input {
  border-color: rgba(73, 102, 176, 0.18);
  background: rgba(247, 251, 255, 0.96);
  color: #101624;
}

html[data-theme="light"] body.game-active .ticket-drawer {
  border-left-color: rgba(73, 102, 176, 0.20);
  background:
    linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(239, 247, 255, 0.98));
  color: #101624;
  box-shadow:
    -20px 0 58px rgba(57, 78, 126, 0.20),
    -8px 0 30px rgba(14, 165, 233, 0.10);
}

html[data-theme="light"] body.game-active .drawer-header {
  background:
    linear-gradient(180deg, rgba(251, 253, 255, 1), rgba(251, 253, 255, 0.88));
}

html[data-theme="light"] body.game-active .drawer-header h2 {
  color: #101624;
}

html[data-theme="light"] body.game-active .icon-button {
  border-color: rgba(124, 58, 237, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.98));
  color: #101624;
  box-shadow:
    0 0 18px rgba(124, 58, 237, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.60);
}

html[data-theme="light"] body.game-active .ticket-item {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ticket-accent) 12%, transparent), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 255, 0.96));
  box-shadow:
    0 0 16px color-mix(in srgb, var(--ticket-accent) 24%, transparent),
    inset 0 0 28px color-mix(in srgb, var(--ticket-accent-2) 9%, transparent);
}

html[data-theme="light"] body.game-active .ticket-numbers span {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(233, 242, 255, 0.96));
  color: #101624;
}

html[data-theme="light"] body.game-active .ticket-meta {
  color: #4e5b70;
}

html[data-theme="light"] body.game-active .ticket-stub {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ticket-accent) 14%, transparent), rgba(255, 255, 255, 0.72));
}

html[data-theme="light"] body.game-active .ticket-stub::before,
html[data-theme="light"] body.game-active .ticket-stub::after {
  background: #eef5ff;
}

@media (min-width: 761px) {
.app-shell {
    --desktop-betbar-height: 86px;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: calc(var(--desktop-betbar-height) + 16px);
    overflow: hidden;
  }

  .topbar {
    flex: 0 0 auto;
    padding: 8px 0 0;
  }

  .number-section {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding: 10px;
    margin-bottom: 0;
  }

  .number-section .section-title {
    flex: 0 0 auto;
    margin-bottom: 8px;
  }

  .number-grid {
    flex: 1 1 auto;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 6px;
    min-height: 0;
  }

  .number-button {
    aspect-ratio: auto;
    min-height: 0;
    height: 100%;
    font-size: clamp(0.82rem, 1.7vh, 1rem);
  }

  .bet-bar {
    grid-template-columns: minmax(0, 1fr) 112px 160px 160px;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
    height: var(--desktop-betbar-height);
    bottom: max(10px, env(safe-area-inset-bottom));
    padding: 8px;
  }

  .bet-bar > * {
    min-height: 0;
  }
}

@media (min-width: 1024px) {
  body.game-active .app-shell {
    --desktop-betbar-height: 92px;
    width: min(calc(100% - 48px), 1320px);
    padding-right: 0;
    padding-left: 0;
  }

  body.game-active .topbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: center;
    gap: 24px;
    min-height: 112px;
    margin-bottom: 14px;
    padding: 14px 18px;
    border: 1px solid rgba(93, 120, 255, 0.24);
    border-radius: 8px;
    box-shadow:
      0 18px 50px rgba(0, 0, 0, 0.22),
      inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  }

  body.game-active .game-brand h1 {
    font-size: clamp(2.9rem, 4.7vw, 5.1rem);
    line-height: 0.86;
  }

  body.game-active .logo-seven {
    font-size: 1.66em;
    line-height: 0.68;
  }

  body.game-active .top-actions {
    gap: 14px;
  }

  body.game-active .wallet-panel {
    display: grid;
    align-content: center;
    min-width: 212px;
    min-height: 76px;
    padding: 13px 18px;
  }

  body.game-active .wallet-panel span {
    max-width: 176px;
    font-size: 0.8rem;
  }

  body.game-active .wallet-panel strong {
    font-size: 1.28rem;
  }

  body.game-active .theme-toggle {
    width: 48px;
    height: 48px;
  }

  body.game-active .timer-panel {
    width: 104px;
    height: 104px;
    min-width: 104px;
  }

  body.game-active .timer-panel strong {
    font-size: 2.08rem;
  }

  body.game-active .phase-chip {
    font-size: 0.82rem;
  }

  body.game-active .menu-button {
    min-width: 118px;
    min-height: 76px;
    padding: 0 18px;
    font-size: 1rem;
  }

  body.game-active .account-menu {
    right: 0;
    width: min(420px, calc(100vw - 48px));
    max-height: calc(100dvh - 142px);
  }

  body.game-active .number-section {
    padding: 18px 20px 20px;
  }

  body.game-active .number-section .section-title {
    margin-bottom: 14px;
  }

  body.game-active .section-title h2 {
    font-size: 1.24rem;
  }

  body.game-active .section-title span {
    font-size: 1rem;
  }

  body.game-active .number-grid {
    gap: 10px;
  }

  body.game-active .number-button {
    border-radius: 8px;
    font-size: clamp(1.02rem, 2.05vh, 1.32rem);
  }

  body.game-active .bet-bar {
    left: 50%;
    right: auto;
    width: min(calc(100% - 48px), 1320px);
    max-width: none;
    grid-template-columns: minmax(170px, 0.82fr) minmax(132px, 0.66fr) minmax(220px, 1fr) minmax(280px, 1.16fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    height: 92px;
    padding: 10px 12px;
    transform: translateX(-50%);
    overflow: hidden;
  }

  body.game-active .amount-field,
  body.game-active .multiplier-box {
    align-content: center;
    height: 100%;
    min-height: 0;
    padding: 9px 14px;
  }

  body.game-active .amount-field span,
  body.game-active .multiplier-box span {
    font-size: 0.76rem;
  }

  body.game-active .amount-field input {
    font-size: 1.24rem;
  }

  body.game-active .multiplier-box strong {
    font-size: 1.32rem;
  }

  body.game-active #ticketsButton {
    height: 100%;
    min-height: 0;
    font-size: 1.05rem;
    white-space: nowrap;
  }

  body.game-active #placeTicketButton {
    height: 100%;
    min-height: 0;
    font-size: 1.32rem;
  }
}

@media (min-width: 1440px) {
  body.game-active .app-shell {
    width: min(calc(100% - 72px), 1480px);
  }

  body.game-active .bet-bar {
    width: min(calc(100% - 72px), 1480px);
    padding: 10px 16px;
  }

  body.game-active .topbar {
    min-height: 124px;
    padding: 16px 22px;
  }

  body.game-active .game-brand h1 {
    font-size: clamp(3.4rem, 4.2vw, 5.8rem);
  }

  body.game-active .number-grid {
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .auth-view {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 14px;
    width: 100%;
    padding: 64px 12px 24px;
  }

  .auth-visual {
    grid-column: auto;
    justify-items: center;
    padding-right: 0;
    text-align: center;
  }

  .auth-visual h1 {
    font-size: clamp(2.8rem, 16vw, 4.4rem);
  }

  .lobby-hero {
    min-height: 150px;
  }

  .lobby-brand-lockup {
    gap: 10px;
  }

  .lobby-logo-mark {
    width: clamp(70px, 22vw, 98px);
    border-width: 7px;
  }

  .lobby-ball {
    width: 46px;
    font-size: 1.45rem;
  }

  .lobby-ball-right {
    right: 0;
    top: 86px;
  }

  .lobby-stats-grid {
    grid-template-columns: 1fr;
  }

  .lobby-jackpot-card {
    grid-row: auto;
    grid-template-columns: minmax(86px, 0.35fr) minmax(0, 1fr);
    min-height: 150px;
    padding: 14px;
  }

  .jackpot-copy strong {
    font-size: clamp(2rem, 12vw, 3.1rem);
  }

  .jackpot-digits span {
    min-width: 24px;
    min-height: 32px;
    font-size: 1.05rem;
  }

  .auth-side {
    grid-column: auto;
    grid-template-columns: 1fr;
    width: min(100%, 560px);
    justify-self: center;
  }

  .auth-card,
  .trust-row {
    grid-column: auto;
  }

  .trust-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rules-panel {
    padding: 12px;
  }

  .app-shell,
  .admin-shell {
    width: 100%;
    padding-top: max(6px, env(safe-area-inset-top));
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-shell {
    --mobile-betbar-height: 108px;
    --mobile-betbar-bottom: max(8px, env(safe-area-inset-bottom));
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(var(--mobile-betbar-height) + var(--mobile-betbar-bottom));
    overflow: hidden;
  }

  .admin-shell {
    min-height: 100dvh;
    padding-bottom: 120px;
  }

  .admin-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .admin-topbar .top-actions {
    flex-shrink: 0;
    gap: 6px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin: 0 -12px clamp(42px, calc(env(safe-area-inset-top) + 38px), 50px);
    padding: max(10px, calc(env(safe-area-inset-top) - 28px)) 12px 8px;
    border-bottom: 1px solid var(--betbar-line);
    background: var(--bg);
    backdrop-filter: blur(14px);
  }

  .game-brand .eyebrow {
    display: none;
  }

  .game-brand h1 {
    font-size: 1.18rem;
    white-space: nowrap;
  }

  .top-actions {
    width: auto;
    display: grid;
    grid-template-columns: 42px minmax(88px, 1fr) 72px 58px;
    gap: 6px;
    justify-content: space-between;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .wallet-panel {
    min-width: 0;
    padding: 6px 8px;
    border-radius: 8px;
  }

  .wallet-panel span {
    max-width: 100%;
    font-size: 0.62rem;
  }

  .wallet-panel strong {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .timer-panel {
    min-width: 0;
    padding: 6px 8px;
    border-radius: 8px;
  }

  .timer-panel strong {
    margin-top: 1px;
    font-size: 1rem;
  }

  .phase-chip {
    font-size: 0.62rem;
  }

  .menu-button {
    min-width: 0;
    width: 58px;
    height: 38px;
    border-radius: 8px;
    font-size: 0.72rem;
  }

  .number-section {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding: 9px;
    margin-bottom: 0;
  }

  .section-title {
    margin-bottom: 7px;
  }

  .section-title h2 {
    font-size: 0.95rem;
  }

  .section-title span {
    font-size: 0.78rem;
  }

  .draw-numbers {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .number-grid {
    align-content: start;
    flex: 1 1 auto;
    gap: 5px;
    grid-template-rows: repeat(10, minmax(34px, 1fr));
    min-height: 0;
  }

  .number-button {
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 7px;
    font-size: 0.9rem;
  }

  .bet-bar {
    grid-template-columns: minmax(0, 1.15fr) minmax(74px, 0.85fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    height: var(--mobile-betbar-height);
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    bottom: var(--mobile-betbar-bottom);
    gap: 6px;
    padding: 8px;
  }

  .account-menu {
    inset: 0;
    width: 100vw;
    height: var(--tg-viewport-stable-height, 100dvh);
    max-height: none;
    overflow-y: auto;
  }

  .account-menu input,
  .account-menu select {
    font-size: 16px;
  }

  .amount-field,
  .multiplier-box {
    padding: 7px 8px;
  }

  .amount-field input {
    font-size: 0.98rem;
  }

  .amount-field span,
  .multiplier-box span {
    font-size: 0.66rem;
  }

  .multiplier-box strong {
    font-size: clamp(0.65rem, 2.5vw, 1rem);
  }

  .primary-button,
  .secondary-button {
    min-height: 42px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-menu {
    position: sticky;
    top: 58px;
    z-index: 17;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .admin-menu a,
  .admin-menu button {
    white-space: nowrap;
  }

  .admin-action-row {
    grid-template-columns: 1fr;
  }

  .admin-create-row {
    grid-template-columns: 1fr;
  }

  .admin-settings-row {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact {
    grid-template-columns: repeat(5, 32px);
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .game-brand {
    display: none;
  }

  .top-actions {
    grid-template-columns: 38px minmax(0, 1fr) 64px 52px;
    width: 100%;
  }

  .menu-button {
    width: 52px;
    font-size: 0.68rem;
  }

  .number-button {
    min-height: 0;
    font-size: 0.84rem;
  }
}

@media (max-width: 760px) {
  body.game-active .app-shell {
    --mobile-betbar-height: 132px;
  }

  body.game-active .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 88px;
    margin-bottom: 10px;
  }

  body.game-active .top-actions {
    grid-template-columns: 36px minmax(0, 1fr) 76px 60px;
    align-items: center;
    gap: 6px;
  }

  body.game-active .theme-toggle {
    width: 36px;
    height: 36px;
  }

  body.game-active .wallet-panel {
    min-height: 56px;
  }

  body.game-active .wallet-panel strong {
    font-size: 0.92rem;
  }

  body.game-active .timer-panel {
    width: 76px;
    height: 76px;
    min-width: 76px;
  }

  body.game-active .timer-panel strong {
    font-size: 1.45rem;
  }

  body.game-active .phase-chip {
    font-size: 0.66rem;
  }

  body.game-active .menu-button {
    width: 60px;
    min-height: 56px;
    height: 56px;
    font-size: 0.76rem;
  }

  body.game-active .number-section {
    padding: 10px;
  }

  body.game-active .number-button {
    border-radius: 8px;
    font-size: 0.92rem;
  }

  body.game-active .bet-bar {
    grid-template-columns: minmax(0, 0.88fr) minmax(74px, 0.72fr) minmax(108px, 1fr);
    grid-template-rows: 50px 58px;
    height: var(--mobile-betbar-height);
    gap: 7px;
  }

  body.game-active .amount-field {
    grid-column: 1;
    grid-row: 1;
  }

  body.game-active .multiplier-box {
    grid-column: 2;
    grid-row: 1;
  }

  body.game-active #ticketsButton {
    grid-column: 3;
    grid-row: 1;
    min-height: 50px;
    white-space: nowrap;
  }

  body.game-active #placeTicketButton {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 58px;
    font-size: 1.2rem;
  }

  body.game-active .ticket-drawer {
    width: 100%;
    padding: 20px 14px 28px;
  }

  body.game-active .drawer-header {
    top: -20px;
    padding-top: 16px;
  }

  body.game-active .drawer-header h2 {
    font-size: 1.9rem;
  }

  body.game-active .ticket-select-button {
    min-height: 184px;
    padding: 14px;
  }

  body.game-active .ticket-body {
    grid-template-columns: minmax(0, 1fr) minmax(76px, 0.42fr);
    gap: 10px;
  }

  body.game-active .ticket-numbers span {
    width: 38px;
    height: 38px;
  }

  body.game-active .ticket-stub {
    min-height: 68px;
  }

  body.game-active .ticket-stub span {
    font-size: 1.65rem;
  }
}

@media (max-width: 380px) {
  body.game-active .topbar {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  body.game-active .top-actions {
    grid-template-columns: 34px minmax(0, 1fr) 70px 54px;
  }

  body.game-active .timer-panel {
    width: 70px;
    height: 70px;
    min-width: 70px;
  }

  body.game-active .menu-button {
    width: 54px;
  }

  body.game-active #ticketsButton {
    font-size: 0.78rem;
  }

  body.game-active .ticket-body {
    grid-template-columns: minmax(0, 1fr);
  }

  body.game-active .ticket-stub {
    display: none;
  }
}

@media (max-width: 760px) {
  .auth-view {
    width: 100%;
    min-height: 100dvh;
    gap: 12px;
    padding:
      max(12px, calc(env(safe-area-inset-top) + 10px))
      max(10px, env(safe-area-inset-right))
      max(18px, calc(env(safe-area-inset-bottom) + 12px))
      max(10px, env(safe-area-inset-left));
  }

  [data-telegram-mini-app="true"] .auth-view {
    padding:
      max(12px, calc(env(safe-area-inset-top) + 10px))
      max(10px, env(safe-area-inset-right))
      max(18px, calc(env(safe-area-inset-bottom) + 12px))
      max(10px, env(safe-area-inset-left));
  }

  .global-theme-toggle {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
  }

  .auth-entry-actions {
    top: max(10px, env(safe-area-inset-top));
    right: max(62px, calc(env(safe-area-inset-right) + 62px));
    gap: 6px;
  }

  .auth-entry-button {
    min-width: 72px;
    min-height: 44px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .auth-overlay {
    align-items: start;
    padding:
      max(64px, calc(env(safe-area-inset-top) + 58px))
      max(10px, env(safe-area-inset-right))
      max(16px, calc(env(safe-area-inset-bottom) + 12px))
      max(10px, env(safe-area-inset-left));
  }

  .auth-overlay-shell {
    width: 100%;
  }

  .auth-overlay-close {
    top: -52px;
    right: 0;
    width: 44px;
    height: 44px;
  }

  .auth-overlay .auth-card {
    width: 100%;
    max-height: calc(100dvh - 86px);
    padding: 14px;
  }

  .auth-visual {
    gap: 10px;
  }

  .lobby-hero {
    min-height: 138px;
    width: 100%;
  }

  .lobby-hero::before,
  .lobby-hero::after {
    width: 32px;
    height: 10px;
    opacity: 0.78;
  }

  .lobby-hero::before {
    left: 58px;
    top: 18px;
  }

  .lobby-hero::after {
    right: 54px;
    top: 42px;
  }

  .lobby-brand-lockup {
    gap: 9px;
    transform: translateY(4px);
  }

  .lobby-logo-mark {
    width: clamp(68px, 22vw, 92px);
    border-width: 7px;
    font-size: clamp(2.6rem, 13vw, 4.4rem);
  }

  .auth-visual h1 {
    font-size: clamp(2.8rem, 15vw, 4.4rem);
  }

  .lobby-tagline {
    margin-top: 2px;
    font-size: clamp(0.78rem, 3.5vw, 1rem);
  }

  .lobby-ball {
    width: 44px;
    font-size: 1.35rem;
  }

  .lobby-ball-left {
    left: 0;
    top: 46px;
  }

  .lobby-ball-gold {
    left: 42px;
    top: 92px;
    width: 48px;
  }

  .lobby-ball-right {
    right: 8px;
    top: 84px;
    width: 50px;
  }

  .lobby-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lobby-jackpot-card {
    grid-column: 1 / -1;
    grid-template-columns: minmax(78px, 0.36fr) minmax(0, 1fr);
    min-height: 128px;
    padding: 12px;
  }

  .jackpot-cup {
    width: min(96px, 100%);
  }

  .jackpot-cup::before,
  .jackpot-cup::after {
    top: 42%;
    width: 22px;
    height: 22px;
    border-width: 5px;
  }

  .jackpot-cup::before {
    left: 4px;
  }

  .jackpot-cup::after {
    right: 4px;
  }

  .jackpot-copy {
    gap: 6px;
  }

  .lobby-kicker {
    font-size: 0.8rem;
  }

  .jackpot-copy strong {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .jackpot-digits span {
    min-width: 23px;
    min-height: 30px;
    font-size: 1rem;
  }

  .lobby-mini-card {
    min-width: 0;
    min-height: 74px;
    gap: 9px;
    padding: 10px;
  }

  .mini-icon {
    width: 40px;
  }

  .mini-icon::before {
    width: 16px;
    box-shadow: 10px 7px 0 -3px #18f080, -10px 7px 0 -3px #18f080;
  }

  .flash-icon::before {
    width: 13px;
    height: 22px;
  }

  .lobby-mini-card strong {
    font-size: clamp(0.85rem, 3.2vw, 1.02rem);
    line-height: 1.1;
  }

  .lobby-mini-card #lobbyWinnerCount {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .auth-side {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  .auth-card {
    gap: 13px;
    padding: 12px;
  }

  .auth-tabs {
    min-height: 54px;
    gap: 6px;
  }

  .auth-tab {
    min-height: 44px;
    padding: 0 8px;
    font-size: clamp(1rem, 4.8vw, 1.22rem);
  }

  .auth-field {
    gap: 7px;
  }

  .auth-field span {
    font-size: 0.72rem;
  }

  .auth-field input {
    min-height: 54px;
    padding: 0 46px 0 54px;
    font-size: 1rem;
  }

  .auth-field::before {
    left: 18px;
    bottom: 15px;
    width: 20px;
    height: 20px;
  }

  .auth-field:nth-of-type(1)::after {
    right: 16px;
    bottom: 13px;
    width: 24px;
    height: 24px;
  }

  .auth-field:nth-of-type(2)::after {
    right: 17px;
    bottom: 18px;
    width: 25px;
    height: 16px;
    border-width: 2px;
  }

  .auth-submit {
    min-height: 62px;
    font-size: clamp(1.05rem, 5vw, 1.32rem);
  }

  .lobby-rules-panel,
  .lobby-winners-panel {
    min-height: 0;
    padding: 12px;
  }

  .lobby-rules-panel .section-title,
  .lobby-winners-panel .section-title {
    margin-bottom: 10px;
  }

  .lobby-rules-panel .section-title h2,
  .lobby-winners-panel .section-title h2 {
    font-size: 1.02rem;
  }

  .lobby-rules-panel .rules-grid div {
    grid-template-columns: minmax(64px, 0.9fr) minmax(62px, 0.8fr) minmax(92px, 1fr);
    min-height: 32px;
    gap: 4px;
    padding: 6px;
  }

  .lobby-rules-panel .rules-grid span,
  .lobby-rules-panel .rules-grid strong {
    font-size: clamp(0.66rem, 2.75vw, 0.8rem);
  }

  .payout-detail-header { padding: 6px 8px; font-size: 0.78rem; }
  .payout-row { padding: 5px 8px; font-size: 0.75rem; }
  .payout-example { padding: 6px 8px; font-size: 0.72rem; }

  .lobby-winners-panel .winner-empty {
    min-height: 128px;
  }

  .lobby-winners-panel .winner-row {
    min-height: 48px;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
  }

  .winner-badge {
    width: 26px;
  }

  .winner-copy strong,
  .winner-amount {
    font-size: 0.82rem;
  }

  .winner-copy small {
    font-size: 0.68rem;
  }

  .trust-row {
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .trust-row div {
    min-width: 0;
    padding: 0;
    border-right: 0;
  }

  .trust-icon {
    width: 30px;
  }

  .trust-row strong {
    font-size: 0.78rem;
  }

  .trust-row small {
    font-size: 0.68rem;
  }
}

@media (max-width: 380px) {
  .auth-view {
    padding-left: 8px;
    padding-right: 8px;
  }

  .lobby-rules-panel .rules-grid div {
    grid-template-columns: minmax(56px, 0.86fr) minmax(56px, 0.76fr) minmax(78px, 1fr);
  }

  .trust-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html[data-theme="light"] body.game-active {
    color-scheme: light;
    color: #101624;
    background:
      radial-gradient(circle at 16% 12%, rgba(14, 165, 233, 0.15), transparent 24rem),
      radial-gradient(circle at 90% 34%, rgba(168, 85, 247, 0.11), transparent 28rem),
      linear-gradient(180deg, #f8fbff 0%, #eef5ff 52%, #f7fbff 100%);
  }

  html[data-theme="light"] body.game-active .app-shell {
    color: #101624;
  }

  html[data-theme="light"] body.game-active .topbar {
    border-bottom-color: rgba(73, 102, 176, 0.18);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.86));
  }

  html[data-theme="light"] body.game-active .game-brand h1 {
    color: #101624;
    text-shadow:
      0 0 18px rgba(14, 165, 233, 0.20),
      0 0 28px rgba(168, 85, 247, 0.12);
  }

  html[data-theme="light"] body.game-active .theme-toggle,
  html[data-theme="light"] body.game-active .wallet-panel,
  html[data-theme="light"] body.game-active .menu-button,
  html[data-theme="light"] body.game-active .timer-panel,
  html[data-theme="light"] body.game-active .amount-field,
  html[data-theme="light"] body.game-active .multiplier-box {
    border-color: rgba(73, 102, 176, 0.22);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(238, 246, 255, 0.96));
    color: #101624;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.72),
      0 14px 30px rgba(57, 78, 126, 0.12);
  }

  html[data-theme="light"] body.game-active .wallet-panel span,
  html[data-theme="light"] body.game-active .amount-field span,
  html[data-theme="light"] body.game-active .multiplier-box span,
  html[data-theme="light"] body.game-active .phase-chip,
  html[data-theme="light"] body.game-active .section-title span {
    color: #69758b;
  }

  html[data-theme="light"] body.game-active .wallet-panel strong {
    color: #087f68;
    text-shadow: 0 0 12px rgba(20, 184, 166, 0.20);
  }

  html[data-theme="light"] body.game-active .timer-panel {
    background:
      radial-gradient(circle, #ffffff 58%, transparent 59%),
      conic-gradient(from -35deg, #06b6d4 0 32%, #60a5fa 33% 52%, #c084fc 53% 86%, rgba(148, 163, 184, 0.38) 87% 100%);
    color: #101624;
  }

  html[data-theme="light"] body.game-active .timer-panel strong,
  html[data-theme="light"] body.game-active .multiplier-box strong,
  html[data-theme="light"] body.game-active .section-title h2 {
    color: #101624;
  }

  html[data-theme="light"] body.game-active .number-section {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 247, 255, 0.92)) padding-box,
      linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(14, 165, 233, 0.36)) border-box;
    box-shadow:
      0 16px 38px rgba(57, 78, 126, 0.14),
      0 0 20px rgba(14, 165, 233, 0.12);
  }

  html[data-theme="light"] body.game-active .number-section::before {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(239, 247, 255, 0.66));
  }

  html[data-theme="light"] body.game-active .number-button {
    border-color: rgba(95, 116, 172, 0.24);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 241, 255, 0.94));
    color: #152033;
    box-shadow:
      inset 0 0 14px rgba(14, 165, 233, 0.05),
      0 7px 16px rgba(57, 78, 126, 0.08);
  }

  html[data-theme="light"] body.game-active .number-button.selected,
  html[data-theme="light"] body.game-active .number-button.drawn,
  html[data-theme="light"] body.game-active .number-button.selected.drawn {
    border-color: var(--drawn-border);
    background:
      linear-gradient(135deg, var(--drawn-start), var(--drawn-end));
    color: var(--drawn-ink);
    opacity: 1;
    box-shadow:
      0 0 18px var(--drawn-glow),
      inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  }

html[data-theme="light"] body.game-active .bet-bar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 247, 255, 0.94)) padding-box,
    linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(14, 165, 233, 0.34)) border-box;
  box-shadow:
    0 16px 40px rgba(57, 78, 126, 0.14),
    0 0 20px rgba(14, 165, 233, 0.12);
}

  html[data-theme="light"] body.game-active .account-menu,
  html[data-theme="light"] body.game-active .password-form,
  html[data-theme="light"] body.game-active .crypto-panel,
  html[data-theme="light"] body.game-active .ticket-drawer {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.98));
    color: #101624;
  }

  html[data-theme="light"] body.game-active .menu-item,
  html[data-theme="light"] body.game-active .account-menu-close,
  html[data-theme="light"] body.game-active .language-option,
  html[data-theme="light"] body.game-active .draw-color-option,
  html[data-theme="light"] body.game-active .crypto-address-field input,
  html[data-theme="light"] body.game-active .crypto-address-field select,
  html[data-theme="light"] body.game-active .crypto-mini-form input,
  html[data-theme="light"] body.game-active .crypto-mini-form select,
  html[data-theme="light"] body.game-active .password-form input {
    border-color: rgba(73, 102, 176, 0.20);
    background: rgba(255, 255, 255, 0.82);
    color: #101624;
  }

  html[data-theme="light"] body.game-active .account-menu-header,
  html[data-theme="light"] body.game-active .drawer-header {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.94));
  }

  html[data-theme="light"] body.game-active .account-menu-header span,
  html[data-theme="light"] body.game-active .drawer-header .eyebrow,
  html[data-theme="light"] body.game-active .ticket-meta {
    color: #69758b;
  }

  html[data-theme="light"] body.game-active .drawer-header h2,
  html[data-theme="light"] body.game-active .ticket-top h3 {
    color: #101624;
  }

  html[data-theme="light"] body.game-active .icon-button {
    border-color: rgba(168, 85, 247, 0.28);
    background: rgba(255, 255, 255, 0.9);
    color: #101624;
  }

  html[data-theme="light"] body.game-active .ticket-item {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.92));
  }

  html[data-theme="light"] body.game-active .ticket-numbers span {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 241, 255, 0.94));
    color: #152033;
  }

  html[data-theme="light"] body.game-active .ticket-stub::before,
  html[data-theme="light"] body.game-active .ticket-stub::after {
    background: #eef5ff;
  }
}

.auth-view {
  width: min(100%, 1024px);
  min-height: 100dvh;
  margin: 0 auto;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 20px 34px 34px;
  overflow-x: hidden;
}

.auth-view::before {
  background:
    radial-gradient(circle at 7% 7%, rgba(34, 197, 94, 0.22), transparent 8rem),
    radial-gradient(circle at 92% 11%, rgba(168, 85, 247, 0.22), transparent 8rem),
    radial-gradient(circle at 50% 6%, rgba(34, 197, 94, 0.16), transparent 14rem),
    linear-gradient(180deg, #000203 0%, #020509 43%, #050711 100%);
}

.auth-view > .global-theme-toggle {
  position: fixed;
}

.global-theme-toggle {
  top: max(6px, env(safe-area-inset-top));
  right: max(26px, env(safe-area-inset-right));
  left: auto;
  width: 58px;
  height: 58px;
  border-color: rgba(148, 163, 184, 0.20);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
}

.auth-entry-actions {
  position: fixed;
  top: max(6px, env(safe-area-inset-top));
  right: max(96px, calc(env(safe-area-inset-right) + 96px));
  z-index: 82;
  display: flex;
  gap: 10px;
}

.auth-entry-button {
  min-width: 116px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
  font-weight: 1000;
}

.auth-entry-button.primary {
  background: linear-gradient(112deg, #05e66b 0%, #19d2d2 46%, #9d27e8 100%);
  color: #ffffff;
}

.auth-visual {
  gap: 18px;
}

.lobby-hero {
  min-height: 202px;
}

.lobby-brand-lockup {
  gap: 20px;
}

.lobby-logo-mark {
  width: clamp(108px, 15vw, 148px);
  border-width: 10px;
}

.auth-visual h1 {
  font-size: clamp(4rem, 8.4vw, 6.6rem);
  font-style: italic;
  font-weight: 1000;
}

.lobby-tagline {
  margin-top: 6px;
  font-size: clamp(1.1rem, 2.5vw, 1.34rem);
}

.lobby-stats-grid {
  grid-template-columns: minmax(0, 1.52fr) minmax(260px, 0.95fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.lobby-jackpot-card {
  min-height: 250px;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
  padding: 26px 22px;
}

.lobby-mini-card {
  min-height: 117px;
  padding: 20px 24px;
}

.auth-side {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.88fr);
  gap: 22px;
}

.auth-overlay {
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.auth-overlay-shell {
  width: min(100%, 720px);
}

.auth-overlay .auth-card {
  width: min(100%, 680px);
  max-height: min(680px, calc(100dvh - 48px));
  padding: 28px;
}

.auth-tabs {
  min-height: 72px;
}

.auth-tab {
  min-height: 60px;
  font-size: 1.42rem;
}

.auth-field input {
  min-height: 68px;
  font-size: 1.45rem;
}

.auth-submit {
  min-height: 76px;
  font-size: clamp(1.18rem, 3.4vw, 1.65rem);
}

.rules-dialog-card > .section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
}

.rules-dialog-card > .section-title h2 {
  min-width: 0;
}

.rules-dialog-card > .section-title > span:not(.rules-today-payout) {
  grid-column: 1;
}

.rules-today-payout {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  max-width: min(260px, 44vw);
  padding: 9px 12px;
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.10);
  color: #21f08a;
  font-size: 0.84rem;
  font-weight: 950;
  text-align: right;
  white-space: normal;
}

html[data-theme="light"] .auth-view {
  color: #101624;
}

html[data-theme="light"] .auth-view::before {
  background:
    radial-gradient(circle at 7% 7%, rgba(34, 197, 94, 0.18), transparent 8rem),
    radial-gradient(circle at 92% 11%, rgba(168, 85, 247, 0.16), transparent 8rem),
    radial-gradient(circle at 50% 6%, rgba(14, 165, 233, 0.12), transparent 14rem),
    linear-gradient(180deg, #fbfdff 0%, #eef6ff 55%, #f8fbff 100%);
}

html[data-theme="light"] .auth-visual h1,
html[data-theme="light"] .lobby-tagline,
html[data-theme="light"] .lobby-mini-card strong,
html[data-theme="light"] .winner-copy strong,
html[data-theme="light"] .trust-row strong {
  color: #101624;
}

html[data-theme="light"] .lobby-jackpot-card,
html[data-theme="light"] .lobby-mini-card,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .auth-view .rules-panel,
html[data-theme="light"] .winners-panel,
html[data-theme="light"] .trust-row {
  border-color: rgba(73, 102, 176, 0.20);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 255, 0.92)),
    rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.78),
    0 20px 54px rgba(57, 78, 126, 0.14);
}

html[data-theme="light"] .global-theme-toggle,
html[data-theme="light"] .auth-entry-button,
html[data-theme="light"] .auth-overlay-close {
  border-color: rgba(73, 102, 176, 0.20);
  background: rgba(255, 255, 255, 0.92);
  color: #101624;
}

html[data-theme="light"] .auth-entry-button.primary,
html[data-theme="light"] .auth-tab.active {
  background: linear-gradient(110deg, #86efac, #67e8f9 48%, #c4b5fd);
  color: #081321;
}

html[data-theme="light"] .auth-field input {
  border-color: rgba(73, 102, 176, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: #101624;
}

html[data-theme="light"] .auth-tabs {
  background: rgba(238, 246, 255, 0.80);
}

html[data-theme="light"] .auth-field span,
html[data-theme="light"] .lobby-kicker,
html[data-theme="light"] .auth-view .section-title span,
html[data-theme="light"] .winners-panel .section-title span,
html[data-theme="light"] .auth-view .rules-panel p,
html[data-theme="light"] .winner-copy small,
html[data-theme="light"] .winner-empty,
html[data-theme="light"] .trust-row small {
  color: #5d687c;
}

html[data-theme="light"] .auth-view .section-title h2,
html[data-theme="light"] .winners-panel .section-title h2,
html[data-theme="light"] .auth-view .rules-grid strong:first-child,
html[data-theme="light"] .auth-view .rules-grid span:last-child,
html[data-theme="light"] .lobby-mini-card #lobbyWinnerCount,
html[data-theme="light"] .winner-amount,
html[data-theme="light"] .rules-today-payout {
  color: #087f68;
}

html[data-theme="light"] .auth-view .rules-grid div,
html[data-theme="light"] .winner-row {
  border-color: rgba(73, 102, 176, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .rules-today-payout {
  border-color: rgba(8, 127, 104, 0.22);
  background: rgba(20, 184, 166, 0.10);
}

@media (max-width: 760px) {
  .auth-view {
    width: 100%;
    min-height: 100dvh;
    gap: 12px;
    padding:
      max(72px, calc(env(safe-area-inset-top) + 68px))
      max(10px, env(safe-area-inset-right))
      max(18px, calc(env(safe-area-inset-bottom) + 12px))
      max(10px, env(safe-area-inset-left));
  }

  [data-telegram-mini-app="true"] .auth-view {
    padding:
      max(72px, calc(env(safe-area-inset-top) + 68px))
      max(10px, env(safe-area-inset-right))
      max(18px, calc(env(safe-area-inset-bottom) + 12px))
      max(10px, env(safe-area-inset-left));
  }

  .global-theme-toggle {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
  }

  .auth-entry-actions {
    top: max(10px, env(safe-area-inset-top));
    right: max(62px, calc(env(safe-area-inset-right) + 62px));
    gap: 6px;
  }

  .auth-entry-button {
    min-width: 72px;
    min-height: 44px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .auth-overlay {
    align-items: start;
    padding:
      max(64px, calc(env(safe-area-inset-top) + 58px))
      max(10px, env(safe-area-inset-right))
      max(16px, calc(env(safe-area-inset-bottom) + 12px))
      max(10px, env(safe-area-inset-left));
  }

  .auth-overlay-shell,
  .auth-overlay .auth-card {
    width: 100%;
  }

  .auth-overlay .auth-card {
    max-height: calc(100dvh - 86px);
    padding: 14px;
  }

  .auth-overlay-close {
    top: -52px;
    right: 0;
    width: 44px;
    height: 44px;
  }

  .auth-visual {
    gap: 10px;
  }

  .lobby-hero {
    min-height: 138px;
  }

  .lobby-brand-lockup {
    gap: 9px;
    transform: translateY(4px);
  }

  .lobby-logo-mark {
    width: clamp(68px, 22vw, 92px);
    border-width: 7px;
    font-size: clamp(2.6rem, 13vw, 4.4rem);
  }

  .auth-visual h1 {
    font-size: clamp(2.8rem, 15vw, 4.4rem);
  }

  .lobby-tagline {
    margin-top: 2px;
    font-size: clamp(0.78rem, 3.5vw, 1rem);
  }

  .lobby-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lobby-jackpot-card {
    grid-column: 1 / -1;
    grid-template-columns: minmax(78px, 0.36fr) minmax(0, 1fr);
    min-height: 128px;
    padding: 12px;
  }

  .lobby-mini-card {
    min-width: 0;
    min-height: 74px;
    gap: 9px;
    padding: 10px;
  }

  .auth-side {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  .auth-tabs {
    min-height: 54px;
    gap: 6px;
  }

  .auth-tab {
    min-height: 44px;
    padding: 0 8px;
    font-size: clamp(1rem, 4.8vw, 1.22rem);
  }

  .auth-field input {
    min-height: 54px;
    padding: 0 46px 0 54px;
    font-size: 1rem;
  }

  .auth-submit {
    min-height: 62px;
    font-size: clamp(1.05rem, 5vw, 1.32rem);
  }

  .rules-dialog-card > .section-title {
    grid-template-columns: minmax(0, 1fr);
  }

  .rules-today-payout {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }
}

@media (max-width: 380px) {
  .auth-entry-button {
    min-width: 64px;
    padding: 0 8px;
    font-size: 0.76rem;
  }

  .auth-view {
    padding-left: 8px;
    padding-right: 8px;
  }
}

.auth-entry-actions {
  top: max(6px, env(safe-area-inset-top));
  right: max(92px, calc(env(safe-area-inset-right) + 92px));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(4, 8, 18, 0.68);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 14px 34px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(16px);
}

.auth-entry-button {
  min-width: 92px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #d7dee9;
  font-size: 0.92rem;
  letter-spacing: 0;
  box-shadow: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.auth-entry-button:hover,
.auth-entry-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateY(-1px);
}

.auth-entry-button.primary {
  background:
    linear-gradient(112deg, #05e66b 0%, #1dd6d8 47%, #8f34e9 100%);
  color: #ffffff;
  box-shadow:
    0 0 18px rgba(34, 197, 94, 0.22),
    0 0 22px rgba(168, 85, 247, 0.20);
}

.auth-overlay-shell {
  width: min(100%, 600px);
}

.auth-overlay .auth-card {
  width: min(100%, 560px);
  max-height: min(620px, calc(100dvh - 42px));
  gap: 18px;
  padding: 22px;
}

.auth-overlay-close {
  width: 44px;
  height: 44px;
  top: -8px;
  right: -8px;
}

.auth-tabs {
  min-height: 58px;
  padding: 5px;
}

.auth-tab {
  min-height: 48px;
  font-size: 1.1rem;
}

.auth-field {
  gap: 8px;
}

.auth-field span {
  font-size: 0.82rem;
}

.auth-field input {
  min-height: 56px;
  padding: 0 48px 0 58px;
  font-size: 1.08rem;
}

.auth-field::before {
  left: 20px;
  bottom: 17px;
  width: 22px;
  height: 22px;
}

.auth-field:nth-of-type(1)::after {
  right: 18px;
  bottom: 16px;
  width: 24px;
  height: 24px;
}

.auth-field:nth-of-type(2)::after {
  right: 18px;
  bottom: 20px;
  width: 26px;
  height: 16px;
  border-width: 2px;
}

.auth-submit {
  min-height: 60px;
  font-size: clamp(1.05rem, 2.6vw, 1.24rem);
}

.auth-submit::after {
  font-size: 0.68rem;
}

html[data-theme="light"] .auth-entry-actions {
  border-color: rgba(73, 102, 176, 0.18);
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 14px 34px rgba(57, 78, 126, 0.14);
}

html[data-theme="light"] .auth-entry-button {
  background: transparent;
  color: #536076;
}

html[data-theme="light"] .auth-entry-button:hover,
html[data-theme="light"] .auth-entry-button:focus-visible {
  background: rgba(73, 102, 176, 0.10);
  color: #101624;
}

html[data-theme="light"] .auth-entry-button.primary {
  background: linear-gradient(110deg, #7ee7a2, #67e8f9 48%, #bd96ff);
  color: #081321;
}

@media (max-width: 760px) {
  .auth-view {
    padding-top: max(62px, calc(env(safe-area-inset-top) + 58px));
  }

  [data-telegram-mini-app="true"] .auth-view {
    padding-top: max(62px, calc(env(safe-area-inset-top) + 58px));
  }

  .auth-entry-actions {
    top: max(9px, env(safe-area-inset-top));
    right: max(56px, calc(env(safe-area-inset-right) + 56px));
    gap: 3px;
    padding: 3px;
  }

  .auth-entry-button {
    min-width: 62px;
    min-height: 38px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 0.76rem;
  }

  .auth-overlay {
    padding:
      max(56px, calc(env(safe-area-inset-top) + 52px))
      max(12px, env(safe-area-inset-right))
      max(14px, calc(env(safe-area-inset-bottom) + 10px))
      max(12px, env(safe-area-inset-left));
  }

  .auth-overlay .auth-card {
    max-height: calc(100dvh - 72px);
    gap: 12px;
    padding: 12px;
  }

  .auth-overlay-close {
    top: -46px;
    right: 0;
    width: 40px;
    height: 40px;
  }

  .auth-tabs {
    min-height: 48px;
    padding: 4px;
  }

  .auth-tab {
    min-height: 40px;
    font-size: 0.98rem;
  }

  .auth-field {
    gap: 6px;
  }

  .auth-field span {
    font-size: 0.7rem;
  }

  .auth-field input {
    min-height: 50px;
    padding: 0 42px 0 50px;
    font-size: 0.96rem;
  }

  .auth-field::before {
    left: 17px;
    bottom: 14px;
    width: 19px;
    height: 19px;
  }

  .auth-field:nth-of-type(1)::after {
    right: 14px;
    bottom: 13px;
    width: 22px;
    height: 22px;
  }

  .auth-field:nth-of-type(2)::after {
    right: 15px;
    bottom: 17px;
    width: 23px;
    height: 15px;
  }

  .auth-submit {
    min-height: 54px;
    font-size: 1.02rem;
  }
}

@media (max-width: 380px) {
  .auth-entry-actions {
    right: max(52px, calc(env(safe-area-inset-right) + 52px));
  }

  .auth-entry-button {
    min-width: 58px;
    font-size: 0.72rem;
  }
}

.lobby-jackpot-card {
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
}

.jackpot-cup {
  position: relative;
  width: min(170px, 100%);
  aspect-ratio: 1;
  overflow: visible;
  border: 0;
  background:
    radial-gradient(circle at 50% 52%, rgba(250, 204, 21, 0.30), transparent 48%),
    radial-gradient(circle at 50% 68%, rgba(255, 167, 38, 0.20), transparent 62%);
  filter: drop-shadow(0 0 22px rgba(250, 204, 21, 0.35));
}

.jackpot-cup::before,
.jackpot-cup::after {
  content: "";
  position: absolute;
  top: 33%;
  z-index: 1;
  width: 44px;
  height: 46px;
  border: 8px solid rgba(246, 190, 48, 0.92);
  border-radius: 50%;
  box-shadow:
    inset 0 0 14px rgba(255, 245, 178, 0.22),
    0 0 14px rgba(250, 204, 21, 0.16);
}

.jackpot-cup::before {
  left: 7%;
  border-right-color: transparent;
  transform: rotate(-11deg);
}

.jackpot-cup::after {
  right: 7%;
  border-left-color: transparent;
  transform: rotate(11deg);
}

.jackpot-cup span {
  position: absolute;
  left: 50%;
  top: 13%;
  z-index: 2;
  display: block;
  width: 58%;
  height: 48%;
  border-radius: 45% 45% 22% 22%;
  color: transparent;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.34), transparent 17% 78%, rgba(255, 255, 255, 0.16)),
    radial-gradient(circle at 46% 21%, #fff7bd 0 12%, transparent 13%),
    linear-gradient(180deg, #fff077 0%, #f6b92d 44%, #9a5208 100%);
  box-shadow:
    inset 0 -16px 18px rgba(84, 38, 4, 0.24),
    0 12px 26px rgba(250, 204, 21, 0.26);
  transform: translateX(-50%);
}

.jackpot-cup span::before,
.jackpot-cup span::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.jackpot-cup span::before {
  top: 82%;
  width: 18%;
  height: 38%;
  border-radius: 6px;
  background: linear-gradient(180deg, #f6c43f, #8b4a07);
}

.jackpot-cup span::after {
  top: 116%;
  width: 78%;
  height: 24%;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #ffdc61, #985208);
  box-shadow: 0 14px 0 -4px #4a2605;
}

.mini-icon {
  display: grid;
  place-items: center;
  grid-template: 1fr / 1fr;
  border-radius: 50%;
}

.mini-icon::before,
.mini-icon::after {
  content: "";
  grid-area: 1 / 1;
}

.users-icon {
  border-color: rgba(34, 197, 94, 0.42);
  background:
    radial-gradient(circle, rgba(24, 240, 128, 0.20), rgba(24, 240, 128, 0.05) 62%, transparent 63%);
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.18),
    0 0 24px rgba(34, 197, 94, 0.18);
}

.users-icon::before {
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: #18f080;
  box-shadow:
    -15px 13px 0 -4px #18f080,
    15px 13px 0 -4px #18f080;
}

.users-icon::after {
  width: 42px;
  height: 24px;
  margin-top: 20px;
  border-radius: 999px 999px 10px 10px;
  background: #18f080;
  clip-path: ellipse(50% 60% at 50% 100%);
}

.flash-icon {
  border-color: rgba(168, 85, 247, 0.56);
  background:
    radial-gradient(circle, rgba(168, 85, 247, 0.24), rgba(168, 85, 247, 0.06) 62%, transparent 63%);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.22),
    0 0 24px rgba(168, 85, 247, 0.22);
}

.flash-icon::before {
  width: 26px;
  height: 38px;
  border-radius: 0;
  background: linear-gradient(180deg, #f35cff 0%, #a855f7 48%, #22d3ee 100%);
  clip-path: polygon(52% 0, 100% 0, 68% 42%, 100% 42%, 35% 100%, 48% 56%, 15% 56%);
  transform: none;
  box-shadow: 0 0 18px rgba(217, 70, 239, 0.36);
}

.flash-icon::after {
  width: 78%;
  height: 78%;
  border: 1px solid rgba(217, 70, 239, 0.38);
  border-radius: 50%;
  box-shadow:
    inset 0 0 14px rgba(168, 85, 247, 0.16),
    0 0 12px rgba(168, 85, 247, 0.16);
}

.auth-overlay .auth-card {
  background:
    linear-gradient(180deg, rgba(8, 14, 22, 0.93), rgba(5, 8, 18, 0.97)) padding-box,
    linear-gradient(120deg, rgba(5, 230, 107, 0.58), rgba(25, 210, 210, 0.22) 44%, rgba(157, 39, 232, 0.56)) border-box;
}

html[data-theme="light"] .jackpot-cup {
  background:
    radial-gradient(circle at 50% 52%, rgba(245, 158, 11, 0.24), transparent 48%),
    radial-gradient(circle at 50% 68%, rgba(245, 158, 11, 0.14), transparent 62%);
}

html[data-theme="light"] .users-icon {
  border-color: rgba(16, 185, 129, 0.36);
  background:
    radial-gradient(circle, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.04) 62%, transparent 63%);
}

html[data-theme="light"] .flash-icon {
  border-color: rgba(124, 58, 237, 0.36);
  background:
    radial-gradient(circle, rgba(124, 58, 237, 0.16), rgba(124, 58, 237, 0.04) 62%, transparent 63%);
}

@media (max-width: 760px) {
  .lobby-jackpot-card {
    grid-template-columns: minmax(82px, 0.34fr) minmax(0, 1fr);
  }

  .jackpot-cup {
    width: min(104px, 100%);
  }

  .jackpot-cup::before,
  .jackpot-cup::after {
    top: 35%;
    width: 25px;
    height: 27px;
    border-width: 5px;
  }

  .jackpot-cup span {
    width: 60%;
    height: 48%;
  }

  .mini-icon {
    width: 42px;
  }

  .users-icon::before {
    width: 13px;
    height: 13px;
    margin-top: -7px;
    box-shadow:
      -10px 9px 0 -3px #18f080,
      10px 9px 0 -3px #18f080;
  }

  .users-icon::after {
    width: 29px;
    height: 16px;
    margin-top: 14px;
  }

  .flash-icon::before {
    width: 18px;
    height: 27px;
  }
}

.users-icon {
  overflow: visible;
  border-color: rgba(52, 211, 153, 0.18);
  background:
    radial-gradient(circle, rgba(134, 239, 74, 0.16), rgba(34, 197, 94, 0.03) 66%, transparent 67%);
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.08),
    0 0 22px rgba(34, 197, 94, 0.16);
}

.users-icon::before {
  width: 50px;
  height: 42px;
  margin: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 22%, #8bea49 0 11px, transparent 12px),
    radial-gradient(circle at 21% 34%, #7fe843 0 8px, transparent 9px),
    radial-gradient(circle at 79% 34%, #7fe843 0 8px, transparent 9px),
    linear-gradient(180deg, #55d84e 0%, #2dbb60 100%) 50% 100% / 30px 20px no-repeat,
    linear-gradient(180deg, #55d84e 0%, #2dbb60 100%) 15% 100% / 18px 16px no-repeat,
    linear-gradient(180deg, #55d84e 0%, #2dbb60 100%) 85% 100% / 18px 16px no-repeat;
  box-shadow: none;
  clip-path: none;
}

.users-icon::after {
  width: 30px;
  height: 18px;
  margin-top: 22px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #55d84e 0%, #2dbb60 100%);
  box-shadow:
    -17px -2px 0 -5px #2dbb60,
    17px -2px 0 -5px #2dbb60;
  clip-path: none;
}

@media (max-width: 760px) {
  .users-icon::before {
    width: 36px;
    height: 31px;
    background:
      radial-gradient(circle at 50% 22%, #8bea49 0 8px, transparent 9px),
      radial-gradient(circle at 21% 34%, #7fe843 0 6px, transparent 7px),
      radial-gradient(circle at 79% 34%, #7fe843 0 6px, transparent 7px),
      linear-gradient(180deg, #55d84e 0%, #2dbb60 100%) 50% 100% / 22px 15px no-repeat,
      linear-gradient(180deg, #55d84e 0%, #2dbb60 100%) 15% 100% / 13px 12px no-repeat,
      linear-gradient(180deg, #55d84e 0%, #2dbb60 100%) 85% 100% / 13px 12px no-repeat;
  }

  .users-icon::after {
    width: 22px;
    height: 13px;
    margin-top: 16px;
    box-shadow:
      -12px -1px 0 -4px #2dbb60,
      12px -1px 0 -4px #2dbb60;
  }
}

.menu-page {
  width: min(100%, 860px);
  min-height: var(--tg-viewport-stable-height, 100dvh);
  margin: 0 auto;
  padding:
    max(12px, calc(env(safe-area-inset-top) + 10px))
    max(12px, env(safe-area-inset-right))
    max(28px, calc(env(safe-area-inset-bottom) + 18px))
    max(12px, env(safe-area-inset-left));
  color: var(--ink);
}

body.menu-page-active {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scroll-padding-top: max(72px, calc(var(--tg-ui-safe-top, 0px) + 64px));
  scroll-padding-bottom: max(320px, calc(var(--tg-ui-safe-bottom, 0px) + 300px));
}

body.game-active.menu-page-active .account-menu {
  position: static;
  inset: auto;
  z-index: auto;
  width: 100%;
  height: auto;
  min-height: calc(var(--tg-viewport-stable-height, 100dvh) - 40px);
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: auto;
  touch-action: pan-y;
}

body.game-active.menu-page-active .account-menu-header {
  top: 0;
  margin: 0 0 10px;
  padding:
    max(10px, calc(env(safe-area-inset-top) + 8px))
    12px
    10px;
  border: 1px solid rgba(104, 122, 255, 0.24);
  border-radius: 8px;
}

body.game-active.menu-page-active .account-menu-back,
body.game-active.menu-page-active .account-menu-close {
  display: inline-grid;
  width: auto;
  min-width: 78px;
  padding: 0 12px;
  font-size: 0.82rem;
}

body.game-active.menu-page-active .account-menu-back.hidden {
  display: none !important;
}

body.game-active.menu-page-active .account-menu-header span {
  flex: 1 1 auto;
  text-align: center;
}

body.game-active.menu-page-active .account-menu > .crypto-panel,
body.game-active.menu-page-active .account-menu > .password-form,
body.game-active.menu-page-active .account-menu > .menu-rules-panel {
  order: 1;
  scroll-margin: 76px 0 16px;
}

body.game-active.menu-page-active.menu-subpage-active .account-menu > .menu-item {
  display: none;
}

body.game-active.menu-page-active:not(.menu-subpage-active) .account-menu > .crypto-panel,
body.game-active.menu-page-active:not(.menu-subpage-active) .account-menu > .password-form,
body.game-active.menu-page-active:not(.menu-subpage-active) .account-menu > .menu-rules-panel {
  display: none !important;
}

.menu-rules-panel {
  gap: 10px;
}

.menu-rules-panel > .rules-dialog-winners {
  margin-top: 4px;
}

.menu-rules-panel .rules-grid {
  overflow: hidden;
  gap: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
}

.menu-rules-panel .rules-grid div {
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0;
  background: rgba(3, 7, 18, 0.24);
}

.menu-rules-panel .rules-grid div:last-child {
  border-bottom: 0;
}

.menu-rules-panel .rules-grid div:first-child span {
  color: #ffffff;
}

html[data-theme="light"] body.game-active.menu-page-active .account-menu {
  background: transparent;
}

html[data-theme="light"] body.game-active.menu-page-active .account-menu-header {
  border-color: rgba(73, 102, 176, 0.20);
}

@media (max-width: 760px) {
  .menu-page {
    width: 100%;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  body.game-active.menu-page-active .account-menu {
    min-height: calc(var(--tg-viewport-stable-height, 100dvh) - 24px);
  }
}

.rules-dialog-winners {
  display: grid;
  gap: 0;
  padding: 18px 16px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(8, 13, 22, 0.94), rgba(7, 10, 24, 0.88)),
    rgba(8, 13, 22, 0.92);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.12),
    0 22px 70px rgba(0, 0, 0, 0.24);
}

.rules-dialog-winners .section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.rules-dialog-winners .section-title h2 {
  font-size: 1.36rem;
  text-transform: uppercase;
}

.rules-dialog-winners .section-title span {
  display: none;
}

.rules-dialog-winners .winner-list {
  grid-template-columns: 1fr;
  min-height: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
}

.rules-dialog-winners .winner-row {
  min-height: 57px;
  grid-template-columns: 30px minmax(0, 1fr) max-content;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0;
  background: rgba(3, 7, 18, 0.24);
}

.rules-dialog-winners .winner-row:last-child {
  border-bottom: 0;
}

.rules-dialog-winners .winner-copy,
.rules-dialog-winners .winner-copy strong,
.rules-dialog-winners .winner-copy small {
  min-width: 0;
}

.rules-dialog-winners .winner-copy strong,
.rules-dialog-winners .winner-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rules-dialog-winners .winner-amount {
  justify-self: end;
  overflow: hidden;
  max-width: 180px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rules-dialog-winners .winner-empty {
  min-height: 128px;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
}

html[data-theme="light"] .rules-dialog-winners {
  border-color: rgba(73, 102, 176, 0.20);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 255, 0.92)),
    rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.78),
    0 20px 54px rgba(57, 78, 126, 0.14);
}

html[data-theme="light"] .rules-dialog-winners .winner-list,
html[data-theme="light"] .rules-dialog-winners .winner-row {
  border-color: rgba(73, 102, 176, 0.14);
}

html[data-theme="light"] .rules-dialog-winners .winner-row {
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 760px) {
  .rules-dialog-winners {
    padding: 12px;
  }

  .rules-dialog-winners .section-title {
    margin-bottom: 10px;
  }

  .rules-dialog-winners .section-title h2 {
    font-size: clamp(1.05rem, 5vw, 1.22rem);
  }

  .rules-dialog-winners .winner-row {
    min-height: 48px;
    grid-template-columns: 26px minmax(0, 1fr) max-content;
    gap: 8px;
    padding: 8px;
  }

  .rules-dialog-winners .winner-badge {
    width: 26px;
  }

  .rules-dialog-winners .winner-copy strong,
  .rules-dialog-winners .winner-amount {
    font-size: clamp(0.76rem, 3.4vw, 0.84rem);
  }

  .rules-dialog-winners .winner-copy small {
    font-size: clamp(0.64rem, 2.9vw, 0.7rem);
  }

  .rules-dialog-winners .winner-amount {
    max-width: 34vw;
  }
}

/* v74: mobile menu scrolling, close buttons, long balances, and admin controls */

[data-telegram-mini-app="true"] body.game-active:not(.menu-page-active) {
  overflow: hidden;
  overscroll-behavior: none;
}

body.game-active.menu-page-active .account-menu {
  min-height: 100%;
}

#balanceConvertPanel,
#cryptoPanel,
#cryptoWithdrawPanel {
  scroll-margin-top: 78px;
}

/* Ensure form elements inside financial panels don't capture scroll gestures */
#cryptoPanel *,
#cryptoWithdrawPanel *,
#balanceConvertPanel * {
  touch-action: pan-y;
}

/* Restore touch-action for receipt image viewer (needs pinch-zoom) */
#cryptoPanel .receipt-viewer-image-area,
#cryptoPanel .receipt-viewer-image-area * {
  touch-action: pan-x pan-y pinch-zoom;
}

#balanceConvertPanel,
#balanceConvertPanel .crypto-balance-grid,
#balanceConvertPanel .fiat-balance-list,
#balanceConvertPanel .crypto-mini-form,
#balanceConvertPanel input,
#balanceConvertPanel select,
#balanceConvertPanel button {
  min-width: 0;
  max-width: 100%;
}

#balanceConvertPanel input,
#balanceConvertPanel select {
  font-size: 16px;
}

.auth-overlay-close,
.drawer-header #closeDrawerButton {
  display: inline-grid;
  place-items: center;
  width: auto;
  min-width: 72px;
  max-width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.wallet-panel {
  min-width: 0;
  max-width: min(190px, 38vw);
}

.wallet-panel strong,
#balanceValue,
#casinoBalance,
.crypto-balance-grid strong,
.fiat-balance-list strong,
.stat-grid strong,
.rtp-ledger-grid strong,
.user-result strong,
.admin-breakdown-item .ticket-meta span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.wallet-panel strong,
#balanceValue {
  font-size: clamp(0.72rem, 1.9vw, 1rem);
}

.user-result strong {
  max-width: min(260px, 44vw);
}

.admin-search-field {
  max-width: 420px;
  margin: 10px 0 6px;
}

.admin-shell .admin-panel button,
.admin-shell .admin-panel .primary-button,
.admin-shell .admin-panel .secondary-button,
.admin-shell .admin-panel .danger-button,
.admin-shell .admin-panel .ticket-delete-button {
  max-width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1;
}

.admin-shell #addBalanceButton,
.admin-shell #createAdminButton {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  width: auto;
  min-width: 136px;
  min-height: 42px;
  margin-top: 4px;
  padding: 0 16px;
  font-size: 0.9rem;
  gap: 0;
  text-transform: none;
}

.admin-shell #addBalanceButton::after,
.admin-shell #createAdminButton::after {
  content: none;
}

.admin-commission-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
}

.admin-commission-panel.hidden {
  display: none !important;
}

.compact-title h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-commission-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.admin-commission-row {
  grid-template-columns: minmax(110px, 0.55fr) minmax(120px, 0.5fr) minmax(180px, 1.3fr);
  margin: 0;
}

.admin-scroll-title {
  cursor: pointer;
  border-radius: 8px;
  outline: none;
}

.admin-scroll-title:focus-visible {
  box-shadow: 0 0 0 3px rgba(57, 230, 255, 0.28);
}

.admin-shell #adminCommissionConvertButton {
  justify-self: start;
  width: auto;
  min-width: 128px;
  min-height: 40px;
}

@media (max-width: 760px) {
  .auth-overlay-close,
  .drawer-header #closeDrawerButton {
    min-width: 64px;
    height: 38px;
    padding: 0 10px;
    font-size: 0.76rem;
  }

  .wallet-panel {
    max-width: min(160px, 34vw);
  }

  .admin-shell #addBalanceButton,
  .admin-shell #createAdminButton {
    min-width: 126px;
    min-height: 40px;
    font-size: 0.84rem;
  }

  .admin-commission-row {
    grid-template-columns: 1fr;
  }
}

/* v79: Telegram Mini App user referral panel */
.telegram-id-label {
  margin: 4px 0 0;
  color: rgba(148, 163, 184, 0.86);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

body.game-active .telegram-id-label {
  color: rgba(214, 226, 255, 0.72);
}

.referral-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.referral-summary-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(57, 230, 255, 0.18);
  border-radius: 12px;
  background: rgba(5, 10, 24, 0.42);
}

.referral-summary-grid span {
  display: block;
  color: rgba(196, 206, 234, 0.78);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.referral-summary-grid strong {
  display: block;
  margin-top: 5px;
  color: #39e6ff;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.referral-links-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.referral-link-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(57, 230, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 10, 24, 0.42);
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.referral-link-row span {
  color: rgba(196, 206, 234, 0.78);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.referral-link-row strong {
  min-width: 0;
  overflow: hidden;
  color: #39e6ff;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-bonus-card .service-card-header span {
  color: #22f28f;
}

.referral-show-all-button {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 0;
  font-size: 0.85rem;
  font-weight: 700;
}

.user-result small {
  display: block;
  margin-top: 4px;
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.76rem;
}

html[data-theme="light"] .telegram-id-label,
html[data-theme="light"] body.game-active .telegram-id-label {
  color: rgba(42, 53, 78, 0.74);
}

html[data-theme="light"] .referral-summary-grid div {
  border-color: rgba(73, 102, 176, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .referral-link-row {
  border-color: rgba(73, 102, 176, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .referral-summary-grid span,
html[data-theme="light"] .referral-link-row span,
html[data-theme="light"] .user-result small {
  color: rgba(42, 53, 78, 0.72);
}

html[data-theme="light"] .referral-summary-grid strong,
html[data-theme="light"] .referral-link-row strong {
  color: #0b7e62;
}

/* v91: premium LOTTO 7 lobby redesign */
:root {
  --auth-visible-height: 100dvh;
  --auth-visible-top: 0px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#authView.auth-view {
  color-scheme: dark;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: start;
  gap: clamp(18px, 2.8vw, 32px);
  width: 100%;
  min-height: 100dvh;
  padding:
    max(94px, calc(env(safe-area-inset-top) + 86px))
    max(18px, calc(env(safe-area-inset-right) + 18px))
    max(28px, calc(env(safe-area-inset-bottom) + 24px))
    max(18px, calc(env(safe-area-inset-left) + 18px));
  overflow-x: hidden;
  background:
    linear-gradient(110deg, rgba(14, 165, 101, 0.16), transparent 22%),
    linear-gradient(250deg, rgba(217, 70, 239, 0.14), transparent 28%),
    linear-gradient(180deg, #020403 0%, #06100c 48%, #050512 100%);
  color: #f8fbff;
}

#authView.auth-view::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 16%, rgba(34, 197, 94, 0.16) 24%, transparent 36%),
    linear-gradient(75deg, transparent 0 52%, rgba(250, 204, 21, 0.12) 61%, transparent 72%),
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.16), transparent 34%);
  opacity: 0.96;
  animation: lobbySheen 14s ease-in-out infinite alternate;
}

#authView.auth-view::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  height: max(110px, calc(env(safe-area-inset-top) + 104px));
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 6, 5, 0.88), rgba(2, 6, 5, 0.58) 68%, transparent),
    linear-gradient(90deg, rgba(34, 197, 94, 0.18), rgba(250, 204, 21, 0.08), rgba(168, 85, 247, 0.16));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

#authView.auth-view > * {
  position: relative;
  z-index: 2;
}

#authView .auth-visual,
#authView .auth-side {
  width: min(1180px, 100%);
}

#authView .global-theme-toggle {
  position: fixed;
  top: max(6px, calc(env(safe-area-inset-top) + 2px));
  right: max(18px, calc(env(safe-area-inset-right) + 18px));
  z-index: 82;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(4, 9, 13, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34), 0 0 20px rgba(34, 197, 94, 0.14);
  backdrop-filter: blur(18px);
}

#authView .auth-entry-actions {
  position: fixed;
  top: max(6px, calc(env(safe-area-inset-top) + 2px));
  right: max(92px, calc(env(safe-area-inset-right) + 92px));
  z-index: 82;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(4, 9, 13, 0.74);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

#authView .auth-entry-button {
  min-width: 104px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(240, 253, 244, 0.88);
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

#authView .auth-entry-button:hover,
#authView .auth-entry-button:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.34), 0 0 22px rgba(34, 197, 94, 0.16);
}

#authView .auth-entry-button.primary {
  color: #06110b;
  background: linear-gradient(112deg, #22f28f 0%, #39e6ff 48%, #d946ef 100%);
  box-shadow: 0 0 22px rgba(34, 242, 143, 0.28), 0 0 28px rgba(217, 70, 239, 0.20);
}

#authView .auth-visual {
  display: grid;
  gap: clamp(18px, 2.4vw, 26px);
}

#authView .lobby-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(178px, 20vw, 246px);
  padding: clamp(18px, 3vw, 30px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#authView .lobby-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.2vw, 24px);
  text-align: left;
}

#authView .lobby-logo-mark {
  width: clamp(94px, 12vw, 142px);
  height: clamp(94px, 12vw, 142px);
  border: 12px solid #f7fff9;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, #ffffff, #eafff1 58%, #bff7d2 100%);
  color: #07120b;
  font-size: clamp(3.2rem, 7vw, 5.2rem);
  font-weight: 1000;
  line-height: 1;
  box-shadow:
    0 0 0 6px rgba(34, 242, 143, 0.28),
    0 0 36px rgba(34, 242, 143, 0.46),
    inset 0 0 18px rgba(9, 95, 49, 0.18);
  animation: logoPulse 3.8s ease-in-out infinite;
}

#authView .lotto-logo {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 0 26px rgba(34, 242, 143, 0.18);
}

#authView .lotto-logo .logo-word {
  color: #ffffff;
}

#authView .lotto-logo .logo-seven {
  color: #18f080;
  font-size: 1.18em;
  text-shadow: 0 0 30px rgba(24, 240, 128, 0.44);
}

#authView .lobby-tagline {
  margin-top: 10px;
  color: #f5f8ff;
  font-size: clamp(1rem, 2.4vw, 1.55rem);
  font-weight: 1000;
  text-transform: uppercase;
}

#authView .lobby-tagline::first-letter,
#authView .lobby-kicker::first-letter {
  text-transform: none;
}

#authView .lobby-ball {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(58px, 8vw, 90px);
  height: clamp(58px, 8vw, 90px);
  border: 0;
  border-radius: 50%;
  color: #06110b;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  font-weight: 1000;
  background:
    radial-gradient(circle at 34% 25%, #ffffff 0 16%, transparent 17%),
    radial-gradient(circle at 50% 45%, #f9fff8 0 30%, transparent 31%),
    linear-gradient(145deg, #9df871, #0ea55d 58%, #075235);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.26), inset -12px -18px 24px rgba(0, 0, 0, 0.28);
  animation: ballDrift 5.8s ease-in-out infinite;
}

#authView .lobby-ball-left {
  left: min(3vw, 24px);
  top: 18%;
}

#authView .lobby-ball-gold {
  left: min(13vw, 150px);
  bottom: 12%;
  background:
    radial-gradient(circle at 34% 25%, #ffffff 0 16%, transparent 17%),
    radial-gradient(circle at 50% 45%, #fff8d5 0 30%, transparent 31%),
    linear-gradient(145deg, #ffe083, #c68113 58%, #724407);
  box-shadow: 0 0 30px rgba(250, 204, 21, 0.28), inset -12px -18px 24px rgba(0, 0, 0, 0.26);
  animation-delay: -1.7s;
}

#authView .lobby-ball-right {
  right: min(5vw, 54px);
  top: 28%;
  background:
    radial-gradient(circle at 34% 25%, #ffffff 0 16%, transparent 17%),
    radial-gradient(circle at 50% 45%, #fdf4ff 0 30%, transparent 31%),
    linear-gradient(145deg, #d946ef, #7c3aed 58%, #35115f);
  color: #ffffff;
  box-shadow: 0 0 30px rgba(217, 70, 239, 0.30), inset -12px -18px 24px rgba(0, 0, 0, 0.26);
  animation-delay: -3.1s;
}

#authView .lobby-stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(260px, 0.68fr);
  grid-template-rows: repeat(2, minmax(118px, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

#authView .lobby-motion-card,
#authView .lobby-mini-card,
#authView .lobby-rules-panel,
#authView .lobby-winners-panel,
#authView .trust-row {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(11, 18, 25, 0.78), rgba(5, 10, 16, 0.92)) padding-box,
    linear-gradient(135deg, rgba(34, 242, 143, 0.46), rgba(250, 204, 21, 0.18), rgba(217, 70, 239, 0.40)) border-box;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px);
}

#authView .lobby-motion-card {
  position: relative;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: minmax(190px, 0.48fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  min-height: clamp(248px, 28vw, 340px);
  padding: clamp(22px, 3vw, 34px);
  overflow: hidden;
  border-radius: 28px;
}

#authView .lobby-motion-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(120deg, transparent 0 30px, rgba(255, 255, 255, 0.035) 31px 32px),
    linear-gradient(90deg, rgba(34, 242, 143, 0.10), transparent 46%, rgba(217, 70, 239, 0.12));
  opacity: 0.75;
}

#authView .lotto-orbit,
#authView .motion-copy {
  position: relative;
  z-index: 1;
}

#authView .lotto-orbit {
  width: clamp(188px, 21vw, 284px);
  aspect-ratio: 1;
  margin: 0 auto;
}

#authView .orbit-ring {
  position: absolute;
  inset: 11%;
  border: 1px solid rgba(57, 230, 255, 0.42);
  border-radius: 50%;
  box-shadow: 0 0 26px rgba(57, 230, 255, 0.16), inset 0 0 18px rgba(57, 230, 255, 0.10);
  animation: orbitSpin 12s linear infinite;
}

#authView .ring-two {
  inset: 22%;
  border-color: rgba(250, 204, 21, 0.44);
  transform: rotate(38deg);
  animation-duration: 9s;
  animation-direction: reverse;
}

#authView .ring-three {
  inset: 0;
  border-color: rgba(217, 70, 239, 0.34);
  transform: rotate(-16deg);
  animation-duration: 16s;
}

#authView .orbit-core {
  position: absolute;
  inset: 31%;
  display: grid;
  place-items: center;
  border: 10px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #ffffff, #dfffee 62%, #75f0ad);
  color: #04130a;
  font-size: clamp(3rem, 6vw, 5.2rem);
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 0 34px rgba(34, 242, 143, 0.46), inset 0 0 22px rgba(7, 89, 43, 0.20);
}

#authView .orbit-ball {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(48px, 5vw, 66px);
  height: clamp(48px, 5vw, 66px);
  border-radius: 50%;
  color: #06110b;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  font-weight: 1000;
  background:
    radial-gradient(circle at 35% 27%, #ffffff 0 18%, transparent 19%),
    radial-gradient(circle at 50% 48%, #f8fff9 0 34%, transparent 35%),
    linear-gradient(145deg, #b5ff6a, #18b962 62%, #075235);
  box-shadow: 0 0 22px rgba(34, 242, 143, 0.28), inset -10px -13px 18px rgba(0, 0, 0, 0.25);
  animation: orbitBallFloat 4.8s ease-in-out infinite;
}

#authView .orbit-ball-one {
  left: 1%;
  top: 17%;
}

#authView .orbit-ball-two {
  right: 3%;
  top: 14%;
  background:
    radial-gradient(circle at 35% 27%, #ffffff 0 18%, transparent 19%),
    radial-gradient(circle at 50% 48%, #fff8d5 0 34%, transparent 35%),
    linear-gradient(145deg, #ffe083, #c68113 62%, #704105);
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.30), inset -10px -13px 18px rgba(0, 0, 0, 0.24);
  animation-delay: -1.5s;
}

#authView .orbit-ball-three {
  right: 14%;
  bottom: 2%;
  color: #ffffff;
  background:
    radial-gradient(circle at 35% 27%, #ffffff 0 18%, transparent 19%),
    radial-gradient(circle at 50% 48%, #fdf4ff 0 34%, transparent 35%),
    linear-gradient(145deg, #d946ef, #7c3aed 62%, #35115f);
  box-shadow: 0 0 22px rgba(217, 70, 239, 0.30), inset -10px -13px 18px rgba(0, 0, 0, 0.25);
  animation-delay: -2.8s;
}

#authView .motion-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

#authView .motion-copy .lobby-kicker,
#authView .lobby-kicker {
  color: #22f28f;
  font-size: 0.82rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#authView .motion-copy > strong {
  color: #ffffff;
  font-size: clamp(2rem, 4.4vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(34, 242, 143, 0.18);
}

#authView .motion-copy p {
  max-width: 520px;
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  line-height: 1.55;
}

#authView .lobby-mini-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: clamp(18px, 2.2vw, 24px);
  border-radius: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

#authView .lobby-mini-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 242, 143, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38), 0 0 24px rgba(34, 242, 143, 0.12);
}

#authView .lobby-mini-card strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: clamp(1.05rem, 2vw, 1.48rem);
}

#authView .lobby-mini-card #lobbyWinnerCount {
  color: #22f28f;
  font-size: 1.48em;
  text-shadow: 0 0 22px rgba(34, 242, 143, 0.22);
}

#authView .mini-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
}

#authView .auth-side {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(16px, 2vw, 22px);
  align-items: stretch;
}

#authView .lobby-rules-panel,
#authView .lobby-winners-panel {
  margin: 0;
  padding: clamp(18px, 2.2vw, 24px);
  border-radius: 24px;
}

#authView .lobby-rules-panel .section-title,
#authView .lobby-winners-panel .section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

#authView .lobby-rules-panel .section-title h2,
#authView .lobby-winners-panel .section-title h2 {
  margin: 0;
  color: #22f28f;
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  text-transform: uppercase;
}

#authView .lobby-rules-panel .section-title span,
#authView .lobby-winners-panel .section-title span {
  color: rgba(226, 232, 240, 0.70);
  font-weight: 950;
}

#authView .lobby-rules-panel > p {
  margin: 0 0 14px;
  color: rgba(226, 232, 240, 0.74);
  line-height: 1.5;
}

#authView .lobby-rules-panel .rules-grid {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  background: rgba(2, 8, 8, 0.46);
}

#authView .lobby-rules-panel .rules-grid div {
  display: grid;
  grid-template-columns: minmax(92px, 0.85fr) minmax(84px, 0.7fr) minmax(116px, 0.9fr);
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  transition: background 160ms ease, transform 160ms ease;
}

#authView .lobby-rules-panel .rules-grid div:first-child {
  min-height: 48px;
  background: linear-gradient(90deg, rgba(34, 242, 143, 0.16), rgba(250, 204, 21, 0.10), rgba(217, 70, 239, 0.12));
  color: #ffffff;
  font-weight: 1000;
  text-transform: uppercase;
}

#authView .lobby-rules-panel .rules-grid div:not(:first-child):hover {
  background: rgba(34, 242, 143, 0.08);
}

#authView .lobby-rules-panel .rules-grid div:last-child {
  border-bottom: 0;
}

#authView .lobby-rules-panel .rules-grid span,
#authView .lobby-rules-panel .rules-grid strong {
  min-width: 0;
  color: inherit;
  font-weight: 950;
}

#authView .lobby-rules-panel .rules-grid strong:first-child {
  color: #22f28f;
}

#authView .lobby-rules-panel .rules-grid strong:nth-child(2) {
  color: #facc15;
}

#authView .lobby-rules-panel .rules-grid span:last-child {
  color: #39e6ff;
}

#authView .lobby-winners-panel .winner-list {
  display: grid;
  gap: 10px;
}

#authView .lobby-winners-panel .winner-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(3, 9, 13, 0.50);
  animation: winnerFade 360ms ease both;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

#authView .lobby-winners-panel .winner-row:hover {
  transform: translateX(3px);
  border-color: rgba(34, 242, 143, 0.28);
  background: rgba(34, 242, 143, 0.07);
}

#authView .winner-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(250, 204, 21, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.82), transparent 18%),
    linear-gradient(145deg, rgba(250, 204, 21, 0.78), rgba(90, 55, 8, 0.70));
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.14);
}

#authView .winner-badge::before {
  content: "7";
  color: #05080d;
  font-size: 1.08rem;
  font-weight: 1000;
}

#authView .winner-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#authView .winner-copy strong {
  overflow: hidden;
  color: #f8fbff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#authView .winner-copy small {
  color: rgba(226, 232, 240, 0.62);
  font-weight: 800;
}

#authView .winner-amount {
  color: #22f28f;
  font-weight: 1000;
  white-space: nowrap;
  text-shadow: 0 0 16px rgba(34, 242, 143, 0.18);
}

#authView .winner-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: rgba(226, 232, 240, 0.68);
  text-align: center;
}

#authView .trust-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border-radius: 22px;
}

#authView .trust-row div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  min-width: 0;
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

#authView .trust-row div:last-child {
  border-right: 0;
}

#authView .trust-row .trust-icon {
  grid-row: span 2;
}

#authView .trust-row strong {
  color: #ffffff;
  font-size: 0.95rem;
}

#authView .trust-row small {
  color: rgba(226, 232, 240, 0.62);
}

#authView .auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding:
    max(76px, calc(env(safe-area-inset-top) + 62px))
    max(16px, env(safe-area-inset-right))
    max(18px, calc(env(safe-area-inset-bottom) + 14px))
    max(16px, env(safe-area-inset-left));
  background: rgba(1, 5, 8, 0.56);
  backdrop-filter: blur(18px);
}

#authView .auth-overlay.hidden {
  display: none !important;
}

#authView .auth-overlay-shell {
  width: min(460px, calc(100vw - 30px));
}

#authView .auth-overlay .auth-card {
  width: 100%;
  max-height: min(620px, calc(100dvh - 110px));
  overflow: auto;
  gap: 16px;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid transparent;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(8, 16, 22, 0.94), rgba(5, 8, 18, 0.98)) padding-box,
    linear-gradient(135deg, rgba(34, 242, 143, 0.70), rgba(57, 230, 255, 0.32), rgba(217, 70, 239, 0.62)) border-box;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46), 0 0 36px rgba(34, 242, 143, 0.14);
}

#authView .auth-overlay-close {
  top: -14px;
  right: -14px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(7, 12, 20, 0.92);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34), 0 0 20px rgba(217, 70, 239, 0.18);
}

#authView .auth-tabs {
  min-height: 54px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

#authView .auth-tab {
  min-height: 44px;
  border-radius: 14px;
}

#authView .auth-tab.active {
  background: linear-gradient(112deg, #22f28f, #39e6ff 48%, #d946ef);
  color: #06110b;
  box-shadow: 0 0 22px rgba(34, 242, 143, 0.22);
}

#authView .auth-field input {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

#authView .auth-field input:focus {
  border-color: rgba(34, 242, 143, 0.52);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(34, 242, 143, 0.10), 0 0 24px rgba(34, 242, 143, 0.12);
  outline: none;
}

#authView .auth-submit {
  border-radius: 18px;
  background: linear-gradient(112deg, #22f28f, #39e6ff 48%, #d946ef);
  color: #06110b;
  box-shadow: 0 18px 42px rgba(34, 242, 143, 0.20), 0 0 28px rgba(217, 70, 239, 0.18);
}

html[data-theme="light"] #authView.auth-view {
  color-scheme: light;
  background:
    linear-gradient(120deg, rgba(16, 185, 129, 0.14), transparent 28%),
    linear-gradient(250deg, rgba(124, 58, 237, 0.10), transparent 34%),
    linear-gradient(180deg, #f7fbff 0%, #eef8f4 50%, #f8f7ff 100%);
  color: #101827;
}

html[data-theme="light"] #authView.auth-view::before {
  background:
    linear-gradient(105deg, transparent 0 16%, rgba(16, 185, 129, 0.13) 24%, transparent 36%),
    linear-gradient(75deg, transparent 0 52%, rgba(217, 119, 6, 0.11) 61%, transparent 72%),
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.12), transparent 34%);
}

html[data-theme="light"] #authView.auth-view::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.90), rgba(255, 255, 255, 0.66) 72%, transparent),
    linear-gradient(90deg, rgba(16, 185, 129, 0.13), rgba(217, 119, 6, 0.08), rgba(124, 58, 237, 0.12));
  border-bottom-color: rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] #authView .global-theme-toggle,
html[data-theme="light"] #authView .auth-entry-actions {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 38px rgba(57, 78, 126, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.68);
}

html[data-theme="light"] #authView .auth-entry-button {
  background: rgba(15, 23, 42, 0.05);
  color: #263143;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] #authView .auth-entry-button:hover,
html[data-theme="light"] #authView .auth-entry-button:focus-visible {
  color: #0f172a;
  background: rgba(16, 185, 129, 0.10);
}

html[data-theme="light"] #authView .auth-entry-button.primary,
html[data-theme="light"] #authView .auth-tab.active,
html[data-theme="light"] #authView .auth-submit {
  color: #06110b;
  background: linear-gradient(112deg, #7ee7a2, #67e8f9 48%, #bd96ff);
}

html[data-theme="light"] #authView .lobby-logo-mark {
  border-color: #ffffff;
  color: #07120b;
}

html[data-theme="light"] #authView .lotto-logo .logo-word,
html[data-theme="light"] #authView .motion-copy > strong,
html[data-theme="light"] #authView .lobby-mini-card strong,
html[data-theme="light"] #authView .winner-copy strong,
html[data-theme="light"] #authView .trust-row strong {
  color: #111827;
}

html[data-theme="light"] #authView .lobby-tagline {
  color: #172033;
}

html[data-theme="light"] #authView .lobby-motion-card,
html[data-theme="light"] #authView .lobby-mini-card,
html[data-theme="light"] #authView .lobby-rules-panel,
html[data-theme="light"] #authView .lobby-winners-panel,
html[data-theme="light"] #authView .trust-row {
  border-color: rgba(15, 23, 42, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.94)) padding-box,
    linear-gradient(135deg, rgba(16, 185, 129, 0.36), rgba(217, 119, 6, 0.14), rgba(124, 58, 237, 0.30)) border-box;
  box-shadow: 0 22px 58px rgba(57, 78, 126, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] #authView .motion-copy p,
html[data-theme="light"] #authView .lobby-rules-panel > p,
html[data-theme="light"] #authView .lobby-rules-panel .section-title span,
html[data-theme="light"] #authView .lobby-winners-panel .section-title span,
html[data-theme="light"] #authView .winner-copy small,
html[data-theme="light"] #authView .winner-empty,
html[data-theme="light"] #authView .trust-row small {
  color: rgba(30, 41, 59, 0.70);
}

html[data-theme="light"] #authView .lobby-rules-panel .rules-grid,
html[data-theme="light"] #authView .lobby-winners-panel .winner-row {
  border-color: rgba(15, 23, 42, 0.09);
  background: rgba(255, 255, 255, 0.64);
}

html[data-theme="light"] #authView .lobby-rules-panel .rules-grid div {
  color: #152033;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] #authView .lobby-rules-panel .rules-grid div:first-child {
  color: #111827;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.16), rgba(217, 119, 6, 0.10), rgba(124, 58, 237, 0.10));
}

html[data-theme="light"] #authView .lobby-winners-panel .winner-row:hover {
  background: rgba(16, 185, 129, 0.09);
}

html[data-theme="light"] #authView .auth-overlay {
  background: rgba(239, 246, 255, 0.54);
}

html[data-theme="light"] #authView .auth-overlay .auth-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.98)) padding-box,
    linear-gradient(135deg, rgba(16, 185, 129, 0.52), rgba(14, 165, 233, 0.24), rgba(124, 58, 237, 0.46)) border-box;
  box-shadow: 0 28px 80px rgba(57, 78, 126, 0.20);
}

html[data-theme="light"] #authView .auth-overlay-close {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.94);
  color: #101827;
}

html[data-theme="light"] #authView .auth-tabs,
html[data-theme="light"] #authView .auth-field input {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
}

@keyframes lobbySheen {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
    opacity: 0.72;
  }

  100% {
    transform: translate3d(2%, 1%, 0) scale(1.02);
    opacity: 1;
  }
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.035);
  }
}

@keyframes ballDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -12px, 0);
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbitBallFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, -10px, 0) scale(1.04);
  }
}

@keyframes winnerFade {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 980px) {
  #authView .lobby-stats-grid,
  #authView .auth-side {
    grid-template-columns: 1fr;
  }

  #authView .lobby-motion-card {
    grid-row: auto;
  }

  #authView .trust-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #authView .trust-row div:nth-child(2) {
    border-right: 0;
  }

  #authView .trust-row div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 700px) {
  #authView.auth-view {
    gap: 16px;
    padding:
      max(78px, calc(env(safe-area-inset-top) + 70px))
      max(10px, calc(env(safe-area-inset-right) + 10px))
      max(20px, calc(env(safe-area-inset-bottom) + 18px))
      max(10px, calc(env(safe-area-inset-left) + 10px));
  }

  #authView .auth-entry-actions {
    top: max(10px, calc(env(safe-area-inset-top) + 8px));
    right: max(62px, calc(env(safe-area-inset-right) + 62px));
    gap: 4px;
    padding: 4px;
  }

  #authView .auth-entry-button {
    min-width: 70px;
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  #authView .global-theme-toggle {
    top: max(10px, calc(env(safe-area-inset-top) + 8px));
    right: max(10px, calc(env(safe-area-inset-right) + 10px));
  }

  #authView .lobby-hero {
    min-height: 160px;
    padding: 10px 4px 16px;
  }

  #authView .lobby-brand-lockup {
    gap: 10px;
  }

  #authView .lobby-logo-mark {
    width: 74px;
    height: 74px;
    border-width: 7px;
    font-size: 2.7rem;
  }

  #authView .lotto-logo {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  #authView .lobby-tagline {
    margin-top: 5px;
    font-size: 0.9rem;
  }

  #authView .lobby-ball {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
  }

  #authView .lobby-ball-left {
    left: -2px;
    top: 6%;
  }

  #authView .lobby-ball-gold {
    left: 38px;
    bottom: 2%;
  }

  #authView .lobby-ball-right {
    right: 4px;
    top: 12%;
  }

  #authView .lobby-motion-card {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px;
    text-align: center;
  }

  #authView .lotto-orbit {
    width: min(220px, 70vw);
  }

  #authView .motion-copy {
    justify-items: center;
  }

  #authView .motion-copy > strong {
    font-size: clamp(1.72rem, 9vw, 2.7rem);
  }

  #authView .lobby-mini-card {
    min-height: 96px;
    padding: 16px;
  }

  #authView .mini-icon {
    width: 52px;
    height: 52px;
  }

  #authView .lobby-rules-panel,
  #authView .lobby-winners-panel {
    padding: 14px;
    border-radius: 18px;
  }

  #authView .lobby-rules-panel .rules-grid div {
    grid-template-columns: minmax(72px, 0.82fr) minmax(58px, 0.6fr) minmax(88px, 0.86fr);
    min-height: 38px;
    padding: 0 8px;
    font-size: 0.76rem;
  }

  #authView .lobby-winners-panel .winner-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  #authView .winner-amount {
    grid-column: 2;
    justify-self: start;
  }

  #authView .trust-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    overflow: visible;
  }

  #authView .trust-row div,
  #authView .trust-row div:nth-child(2),
  #authView .trust-row div:nth-child(-n + 2) {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 2px 8px;
    min-height: 74px;
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    background: rgba(2, 8, 8, 0.34);
  }

  #authView .trust-row div:last-child {
    border: 1px solid rgba(255, 255, 255, 0.10);
  }

  #authView .trust-row .trust-icon {
    width: 30px;
    height: 30px;
  }

  #authView .trust-row strong {
    font-size: 0.78rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  #authView .trust-row small {
    font-size: 0.68rem;
    line-height: 1.2;
  }

  html[data-theme="light"] #authView .trust-row div,
  html[data-theme="light"] #authView .trust-row div:nth-child(2),
  html[data-theme="light"] #authView .trust-row div:nth-child(-n + 2),
  html[data-theme="light"] #authView .trust-row div:last-child {
    border-color: rgba(15, 23, 42, 0.09);
    background: rgba(255, 255, 255, 0.64);
  }

  #authView .auth-overlay {
    top: var(--auth-visible-top, 0px);
    bottom: auto;
    align-items: center;
    min-height: var(--auth-visible-height, 100dvh);
    height: var(--auth-visible-height, 100dvh);
    overflow: hidden;
    overscroll-behavior: contain;
    padding:
      max(10px, calc(env(safe-area-inset-top) + 8px))
      max(10px, env(safe-area-inset-right))
      max(10px, calc(env(safe-area-inset-bottom) + 8px))
      max(10px, env(safe-area-inset-left));
  }

  #authView .auth-overlay-shell {
    width: min(360px, calc(100vw - 20px));
    max-height: calc(var(--auth-visible-height, 100dvh) - 20px);
    display: grid;
    align-items: center;
  }

  #authView .auth-overlay .auth-card {
    max-height: calc(var(--auth-visible-height, 100dvh) - 20px);
    min-height: 0;
    display: grid;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 12px 8px;
    border-radius: 18px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #authView .auth-overlay .auth-card::-webkit-scrollbar {
    display: none;
  }

  #authView .auth-overlay-close {
    top: 10px;
    right: 10px;
    width: 42px;
    height: 34px;
    border-radius: 11px;
    font-size: 0.68rem;
    line-height: 1;
    z-index: 2;
  }

  #authView .auth-tabs {
    min-height: 44px;
    margin-right: 50px;
    padding: 4px;
    border-radius: 14px;
  }

  #authView .auth-tab {
    min-height: 36px;
    border-radius: 11px;
    font-size: 0.88rem;
  }

  #authView .auth-field {
    gap: 4px;
  }

  #authView .auth-field span {
    font-size: 0.66rem;
  }

  #authView .auth-field input {
    min-height: 44px;
    padding: 0 38px 0 44px;
    border-radius: 13px;
    font-size: 0.9rem;
  }

  #authView .auth-field::before {
    left: 15px;
    bottom: 12px;
    width: 17px;
    height: 17px;
  }

  #authView .auth-field:nth-of-type(1)::after {
    right: 13px;
    bottom: 12px;
    width: 19px;
    height: 19px;
  }

  #authView .auth-field:nth-of-type(2)::after {
    right: 13px;
    bottom: 15px;
    width: 21px;
    height: 13px;
    border-width: 2px;
  }

  #authView .auth-submit,
  #authView .telegram-login-button {
    min-height: 46px;
    border-radius: 14px;
    font-size: 0.94rem;
  }

  #authView .auth-submit {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 2px;
  }

  #authView .auth-submit::after {
    display: none;
  }
}

@media (max-width: 380px) {
  #authView .auth-entry-button {
    min-width: 64px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  #authView .lobby-logo-mark {
    width: 64px;
    height: 64px;
    font-size: 2.25rem;
  }

  #authView .lobby-rules-panel .rules-grid div {
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #authView.auth-view::before,
  #authView .lobby-logo-mark,
  #authView .lobby-ball,
  #authView .orbit-ring,
  #authView .orbit-ball,
  #authView .lobby-winners-panel .winner-row {
    animation: none;
  }
}

/* v95: auth language switcher and winner icons */
#authView .auth-language-switcher {
  position: fixed;
  top: max(6px, calc(env(safe-area-inset-top) + 2px));
  left: max(18px, calc(env(safe-area-inset-left) + 18px));
  z-index: 82;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(4, 9, 13, 0.74);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

#authView .auth-language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 60px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(240, 253, 244, 0.88);
  font-size: 0.76rem;
  font-weight: 1000;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

#authView .auth-language-button .language-flag {
  width: 24px;
  height: 16px;
  border-radius: 4px;
}

#authView .auth-language-button:hover,
#authView .auth-language-button:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.30), 0 0 20px rgba(250, 204, 21, 0.12);
}

#authView .auth-language-button.active {
  color: #06110b;
  background: linear-gradient(112deg, #facc15, #22f28f 56%, #39e6ff);
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.18), 0 0 20px rgba(34, 242, 143, 0.16);
}

#authView .auth-language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 84px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(34, 242, 143, 0.08));
  color: rgba(240, 253, 244, 0.94);
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

#authView .auth-language-toggle:hover,
#authView .auth-language-toggle:focus-visible,
#authView .auth-language-toggle[aria-expanded="true"] {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.34), 0 0 24px rgba(34, 242, 143, 0.18);
}

#authView .auth-language-toggle .language-flag,
#authView .auth-language-option .language-flag {
  width: 24px;
  height: 16px;
  border-radius: 4px;
  flex: 0 0 auto;
}

#authView .auth-language-chevron {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.78;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

#authView .auth-language-toggle[aria-expanded="true"] .auth-language-chevron {
  transform: translateY(2px) rotate(225deg);
}

#authView .auth-language-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 90;
  display: grid;
  gap: 6px;
  width: 176px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(4, 9, 13, 0.92);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
}

#authView .auth-language-menu.hidden {
  display: none;
}

#authView .auth-language-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(240, 253, 244, 0.88);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: left;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px transparent;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

#authView .auth-language-option:hover,
#authView .auth-language-option:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

#authView .auth-language-option.active {
  color: #06110b;
  background: linear-gradient(112deg, #facc15, #22f28f 56%, #39e6ff);
  box-shadow: 0 0 20px rgba(34, 242, 143, 0.14);
}

#authView .auth-language-short {
  font-size: 0.68rem;
  opacity: 0.75;
}

#authView .trophy-icon {
  position: relative;
  overflow: visible;
  border-color: rgba(250, 204, 21, 0.34);
  background:
    radial-gradient(circle, rgba(250, 204, 21, 0.22), rgba(250, 204, 21, 0.05) 64%, transparent 65%);
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.18),
    0 0 26px rgba(250, 204, 21, 0.20);
}

#authView .trophy-icon::before {
  width: 34px;
  height: 30px;
  margin-top: -4px;
  border-radius: 8px 8px 14px 14px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.38), transparent 24% 72%, rgba(255, 255, 255, 0.18)),
    linear-gradient(180deg, #fff2a6 0%, #facc15 46%, #b76a0b 100%);
  box-shadow:
    inset 0 -8px 12px rgba(87, 45, 4, 0.20),
    0 10px 18px rgba(250, 204, 21, 0.16);
  clip-path: polygon(14% 0, 86% 0, 78% 72%, 62% 82%, 62% 100%, 38% 100%, 38% 82%, 22% 72%);
}

#authView .trophy-icon::after {
  width: 46px;
  height: 29px;
  margin-top: 4px;
  border: 5px solid rgba(250, 204, 21, 0.82);
  border-top: 0;
  border-radius: 0 0 999px 999px;
  box-shadow:
    inset 0 -9px 0 -6px rgba(183, 106, 11, 0.72),
    0 20px 0 -12px #b76a0b;
}

#authView .section-heading-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
}

#authView .lobby-winners-panel .section-title {
  justify-content: flex-start;
}

#authView .lobby-winners-panel .section-title h2 {
  margin-right: auto;
}

#authView .winners-group-icon {
  position: relative;
  border: 1px solid rgba(34, 242, 143, 0.26);
  background:
    radial-gradient(circle, rgba(34, 242, 143, 0.18), rgba(57, 230, 255, 0.05) 64%, transparent 65%);
  box-shadow:
    0 0 0 1px rgba(34, 242, 143, 0.10),
    0 0 22px rgba(34, 242, 143, 0.14);
}

#authView .winners-group-icon::before,
#authView .winners-group-icon::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

#authView .winners-group-icon::before {
  width: 28px;
  height: 24px;
  background:
    radial-gradient(circle at 50% 22%, #22f28f 0 6px, transparent 7px),
    radial-gradient(circle at 18% 34%, #39e6ff 0 4px, transparent 5px),
    radial-gradient(circle at 82% 34%, #d946ef 0 4px, transparent 5px),
    linear-gradient(180deg, #22f28f, #0ea55d) 50% 100% / 18px 12px no-repeat,
    linear-gradient(180deg, #39e6ff, #0284c7) 11% 100% / 11px 9px no-repeat,
    linear-gradient(180deg, #d946ef, #7c3aed) 89% 100% / 11px 9px no-repeat;
}

#authView .winners-group-icon::after {
  top: 6px;
  right: 7px;
  width: 10px;
  height: 10px;
  background: #facc15;
  clip-path: polygon(50% 0, 61% 34%, 98% 34%, 68% 55%, 80% 91%, 50% 70%, 20% 91%, 32% 55%, 2% 34%, 39% 34%);
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.42));
}

html[data-theme="light"] #authView .auth-language-switcher {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 38px rgba(57, 78, 126, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.68);
}

html[data-theme="light"] #authView .auth-language-button {
  background: rgba(15, 23, 42, 0.05);
  color: #263143;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] #authView .auth-language-button.active {
  color: #06110b;
  background: linear-gradient(112deg, #fde68a, #7ee7a2 56%, #67e8f9);
}

html[data-theme="light"] #authView .auth-language-toggle {
  color: #1f2937;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 253, 245, 0.92));
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.09), 0 12px 28px rgba(57, 78, 126, 0.12);
}

html[data-theme="light"] #authView .auth-language-toggle:hover,
html[data-theme="light"] #authView .auth-language-toggle:focus-visible,
html[data-theme="light"] #authView .auth-language-toggle[aria-expanded="true"] {
  color: #06110b;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.26), 0 16px 30px rgba(16, 185, 129, 0.12);
}

html[data-theme="light"] #authView .auth-language-menu {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 42px rgba(57, 78, 126, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.70);
}

html[data-theme="light"] #authView .auth-language-option {
  color: #263143;
}

html[data-theme="light"] #authView .auth-language-option:hover,
html[data-theme="light"] #authView .auth-language-option:focus-visible {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] #authView .auth-language-option.active {
  color: #06110b;
  background: linear-gradient(112deg, #fde68a, #7ee7a2 56%, #67e8f9);
}

html[data-theme="light"] #authView .trophy-icon {
  border-color: rgba(217, 119, 6, 0.28);
  background:
    radial-gradient(circle, rgba(217, 119, 6, 0.16), rgba(250, 204, 21, 0.04) 64%, transparent 65%);
}

html[data-theme="light"] #authView .winners-group-icon {
  border-color: rgba(16, 185, 129, 0.24);
  background:
    radial-gradient(circle, rgba(16, 185, 129, 0.13), rgba(14, 165, 233, 0.04) 64%, transparent 65%);
}

@media (max-width: 700px) {
  #authView .auth-language-switcher {
    top: max(10px, calc(env(safe-area-inset-top) + 8px));
    left: max(10px, calc(env(safe-area-inset-left) + 10px));
    gap: 2px;
    padding: 4px;
  }

  #authView .auth-language-button {
    min-width: 25px;
    min-height: 34px;
    padding: 0 5px;
    font-size: 0.66rem;
  }

  #authView .auth-language-button .language-flag {
    display: none;
  }

  #authView .auth-language-toggle {
    min-width: 72px;
    min-height: 34px;
    gap: 6px;
    padding: 0 9px;
    font-size: 0.70rem;
  }

  #authView .auth-language-toggle .language-flag,
  #authView .auth-language-option .language-flag {
    width: 22px;
    height: 15px;
  }

  #authView .auth-language-menu {
    width: 158px;
    top: calc(100% + 7px);
    padding: 7px;
    border-radius: 16px;
  }

  #authView .auth-language-option {
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.74rem;
  }

  #authView .section-heading-icon {
    width: 34px;
    height: 34px;
  }
}

/* v102: Telegram Mini App dynamic safe-area layout */
[data-telegram-mini-app="true"] {
  --tg-ui-safe-top: max(var(--tg-safe-area-top), var(--tg-content-safe-area-top), var(--tg-system-safe-area-top), env(safe-area-inset-top));
  --tg-ui-safe-right: max(var(--tg-safe-area-right), var(--tg-content-safe-area-right), var(--tg-system-safe-area-right), env(safe-area-inset-right));
  --tg-ui-safe-bottom: max(var(--tg-safe-area-bottom), var(--tg-content-safe-area-bottom), var(--tg-system-safe-area-bottom), env(safe-area-inset-bottom));
  --tg-ui-safe-left: max(var(--tg-safe-area-left), var(--tg-content-safe-area-left), var(--tg-system-safe-area-left), env(safe-area-inset-left));
}

[data-telegram-mini-app="true"] #authView.auth-view {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  padding:
    max(94px, calc(var(--tg-ui-safe-top) + 86px))
    max(18px, calc(var(--tg-ui-safe-right) + 18px))
    max(28px, calc(var(--tg-ui-safe-bottom) + 24px))
    max(18px, calc(var(--tg-ui-safe-left) + 18px));
}

[data-telegram-mini-app="true"] #authView.auth-view::after {
  height: max(96px, calc(var(--tg-ui-safe-top) + 90px));
}

[data-telegram-mini-app="true"] #authView .auth-entry-actions {
  top: max(42px, calc(var(--tg-ui-safe-top) + 38px));
  right: max(92px, calc(var(--tg-ui-safe-right) + 92px));
}

[data-telegram-mini-app="true"] #authView .global-theme-toggle {
  top: max(42px, calc(var(--tg-ui-safe-top) + 38px));
  right: max(18px, calc(var(--tg-ui-safe-right) + 18px));
}

[data-telegram-mini-app="true"] #authView .auth-language-switcher {
  top: max(42px, calc(var(--tg-ui-safe-top) + 38px));
  left: max(18px, calc(var(--tg-ui-safe-left) + 18px));
}

[data-telegram-mini-app="true"] #authView .auth-overlay {
  padding:
    max(10px, calc(var(--tg-ui-safe-top) + 8px))
    max(10px, calc(var(--tg-ui-safe-right) + 10px))
    max(10px, calc(var(--tg-ui-safe-bottom) + 8px))
    max(10px, calc(var(--tg-ui-safe-left) + 10px));
}

[data-telegram-mini-app="true"] body.game-active .app-shell {
  --mobile-betbar-bottom: max(8px, var(--tg-ui-safe-bottom));
  min-height: var(--tg-viewport-stable-height, 100dvh);
  padding-top: max(10px, var(--tg-ui-safe-top));
  padding-right: max(12px, calc(var(--tg-ui-safe-right) + 12px));
  padding-left: max(12px, calc(var(--tg-ui-safe-left) + 12px));
}

[data-telegram-mini-app="true"] body.game-active .topbar {
  top: var(--tg-ui-safe-top);
}

[data-telegram-mini-app="true"] body.game-active .wallet-panel {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  max-width: min(210px, 42vw);
  padding: 8px 10px;
}

[data-telegram-mini-app="true"] body.game-active .wallet-panel span,
[data-telegram-mini-app="true"] body.game-active #balanceValue {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-telegram-mini-app="true"] body.game-active .wallet-panel span {
  white-space: nowrap;
}

[data-telegram-mini-app="true"] body.game-active #balanceValue {
  white-space: normal;
}

[data-telegram-mini-app="true"] .account-menu {
  height: var(--tg-viewport-stable-height, 100dvh);
  padding:
    max(10px, calc(var(--tg-ui-safe-top) + 8px))
    max(10px, calc(var(--tg-ui-safe-right) + 10px))
    max(16px, calc(var(--tg-ui-safe-bottom) + 12px))
    max(10px, calc(var(--tg-ui-safe-left) + 10px));
  scroll-padding-top: max(64px, calc(var(--tg-ui-safe-top) + 56px));
}

[data-telegram-mini-app="true"] .account-menu-header {
  padding:
    max(14px, calc(var(--tg-ui-safe-top) + 14px))
    max(10px, calc(var(--tg-ui-safe-right) + 10px))
    8px
    max(10px, calc(var(--tg-ui-safe-left) + 10px));
}

[data-telegram-mini-app="true"] .menu-page {
  height: var(--tg-viewport-stable-height, 100dvh);
  padding:
    0
    max(12px, calc(var(--tg-ui-safe-right) + 12px))
    max(28px, calc(var(--tg-ui-safe-bottom) + 18px))
    max(12px, calc(var(--tg-ui-safe-left) + 12px));
  scroll-padding-top: max(72px, calc(var(--tg-ui-safe-top) + 64px));
}

[data-telegram-mini-app="true"] body.game-active.menu-page-active .account-menu {
  padding: 0;
}

[data-telegram-mini-app="true"] body.game-active.menu-page-active .account-menu-header {
  top: 0;
  padding:
    max(42px, calc(var(--tg-ui-safe-top) + 38px))
    12px
    10px;
}

@media (max-width: 760px) {
  [data-telegram-mini-app="true"] body.game-active .app-shell {
    height: var(--tg-viewport-stable-height, 100dvh);
    padding-top: max(6px, var(--tg-ui-safe-top));
    padding-bottom: calc(var(--mobile-betbar-height) + max(8px, var(--tg-ui-safe-bottom)));
  }

  [data-telegram-mini-app="true"] body.game-active .topbar {
    top: var(--tg-ui-safe-top);
  }

  [data-telegram-mini-app="true"] body.game-active .wallet-panel {
    max-width: min(170px, 36vw);
    padding: 7px 8px;
  }

  [data-telegram-mini-app="true"] .menu-page {
    padding:
      0
      max(8px, calc(var(--tg-ui-safe-right) + 8px))
      max(18px, calc(var(--tg-ui-safe-bottom) + 12px))
      max(8px, calc(var(--tg-ui-safe-left) + 8px));
  }
}

@media (max-width: 700px) {
  [data-telegram-mini-app="true"] #authView.auth-view {
    padding:
      max(78px, calc(var(--tg-ui-safe-top) + 70px))
      max(10px, calc(var(--tg-ui-safe-right) + 10px))
      max(20px, calc(var(--tg-ui-safe-bottom) + 18px))
      max(10px, calc(var(--tg-ui-safe-left) + 10px));
  }

  [data-telegram-mini-app="true"] #authView .auth-entry-actions {
    top: max(34px, calc(var(--tg-ui-safe-top) + 30px));
    right: max(62px, calc(var(--tg-ui-safe-right) + 62px));
  }

  [data-telegram-mini-app="true"] #authView .global-theme-toggle {
    top: max(34px, calc(var(--tg-ui-safe-top) + 30px));
    right: max(10px, calc(var(--tg-ui-safe-right) + 10px));
  }

  [data-telegram-mini-app="true"] #authView .auth-language-switcher {
    top: max(34px, calc(var(--tg-ui-safe-top) + 30px));
    left: max(10px, calc(var(--tg-ui-safe-left) + 10px));
  }
}

@media (max-width: 380px) {
  [data-telegram-mini-app="true"] body.game-active .wallet-panel {
    max-width: none;
  }
}

/* Desktop: auth buttons slightly lowered (mobile + telegram untouched) */
@media (min-width: 701px) {
  #authView .auth-language-switcher {
    top: max(26px, env(safe-area-inset-top)) !important;
  }
  #authView .global-theme-toggle {
    top: max(26px, env(safe-area-inset-top)) !important;
  }
  #authView .auth-entry-actions {
    top: max(26px, env(safe-area-inset-top)) !important;
  }
}

/* v103: unified game board and bet controls */
.game-board-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-wash);
  box-shadow: 0 10px 28px rgba(16, 17, 20, 0.08);
}

.game-board-panel > .number-section {
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.game-board-panel > .bet-bar {
  position: static;
  inset: auto;
  z-index: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  backdrop-filter: none;
}

body.game-active .game-board-panel {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(7, 12, 31, 0.94), rgba(4, 12, 27, 0.92)) padding-box,
    linear-gradient(135deg, rgba(255, 54, 230, 0.86), rgba(38, 231, 255, 0.88)) border-box;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 22px rgba(255, 50, 230, 0.34),
    0 0 30px rgba(36, 230, 255, 0.28),
    inset 0 0 42px rgba(36, 230, 255, 0.06);
}

body.game-active .game-board-panel > .number-section {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.game-active .game-board-panel > .bet-bar {
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  max-width: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(5, 9, 23, 0.72);
  box-shadow: none;
  transform: none;
}

html[data-theme="light"] body.game-active .game-board-panel {
  border-color: rgba(73, 102, 176, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.92)) padding-box,
    linear-gradient(135deg, rgba(14, 165, 233, 0.30), rgba(168, 85, 247, 0.24)) border-box;
}

html[data-theme="light"] body.game-active .game-board-panel > .number-section {
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] body.game-active .game-board-panel > .bet-bar {
  background: rgba(255, 255, 255, 0.74);
}

@media (min-width: 761px) {
  .app-shell {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

@media (min-width: 1024px) {
  body.game-active .bet-bar {
    width: 100%;
  }
}

@media (min-width: 1440px) {
  body.game-active .bet-bar {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  body.game-active .game-board-panel > .bet-bar {
    height: var(--mobile-betbar-height);
  }
}

[data-telegram-mini-app="true"] body.game-active .app-shell {
  padding-bottom: max(10px, var(--tg-ui-safe-bottom));
}

/* v104: Telegram header fit, card withdrawals, and fresh round visual reset */
.number-grid-state-reset .number-button {
  transition: none !important;
  animation: none !important;
}

.crypto-action-row {
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
}

.admin-menu button.has-alert {
  border-color: color-mix(in srgb, var(--red) 72%, transparent);
  color: var(--red);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent),
    0 0 16px color-mix(in srgb, var(--red) 18%, transparent);
}

.admin-menu button.has-alert.active {
  background: color-mix(in srgb, var(--red) 16%, var(--ticket-bg));
}

.card-withdrawal-item .ticket-status.pending {
  color: var(--amber);
}

.card-withdrawal-item .ticket-status.approved {
  color: var(--green);
}

.card-withdrawal-item .ticket-status.cancelled {
  color: var(--red);
}

/* ── Bank Card Visual ── */
.bank-card-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 16px 10px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  background:
    linear-gradient(155deg, #0f1422 0%, #171e34 22%, #131b30 45%, #101528 68%, #0d1223 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 3px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  max-width: 300px;
}

/* ── Cancel / Delete-all button (red) ── */
.cancel-card-button {
  border: 1px solid rgba(239, 68, 68, 0.38);
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.80rem;
  padding: 0 14px;
  min-height: 34px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.cancel-card-button:hover,
.cancel-card-button:focus-visible {
  background: rgba(239, 68, 68, 0.20);
  border-color: rgba(239, 68, 68, 0.52);
  color: #f87171;
}

/* ═══════════════════════════════════════════
   Admin Kartlarım — Müasir Dizayn
   ═══════════════════════════════════════════ */

/* Əlavə et form row */
.admin-cards-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 16px;
}

/* Input sahələri */
.admin-cards-input {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: #e0e4ec;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.admin-cards-input::placeholder {
  color: #556;
}

.admin-cards-input:focus {
  border-color: rgba(104, 122, 255, 0.50);
  box-shadow: 0 0 0 3px rgba(104, 122, 255, 0.12);
  background: rgba(255,255,255,0.06);
}

/* Əlavə et düyməsi */
.admin-cards-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f8bff, #3d6ce4);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 180ms ease, box-shadow 180ms ease, transform 120ms ease;
}

.admin-cards-add-btn:hover {
  background: linear-gradient(135deg, #5d99ff, #4b7af2);
  box-shadow: 0 4px 16px rgba(79, 139, 255, 0.30);
}

.admin-cards-add-btn:active {
  transform: scale(0.97);
}

/* ── Kart elementi ── */
.admin-card-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.admin-card-item:hover {
  border-color: rgba(255,255,255,0.13);
}

.admin-card-item--active {
  border-color: rgba(79, 255, 136, 0.25);
  background: linear-gradient(135deg, rgba(79, 255, 136, 0.04) 0%, rgba(79, 255, 136, 0.01) 100%);
  box-shadow: 0 0 20px rgba(79, 255, 136, 0.06);
}

.admin-card-item__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-card-item__icon {
  color: #667;
  flex-shrink: 0;
}

.admin-card-item--active .admin-card-item__icon {
  color: #4f8;
}

.admin-card-item__number {
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.95rem;
  font-weight: 650;
  color: #e0e4ec;
  letter-spacing: 1px;
  flex: 1;
}

.admin-card-item__badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #4f8;
  background: rgba(79, 255, 136, 0.10);
  padding: 2px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.admin-card-item__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #8890a4;
}

.admin-card-item__user-icon {
  color: #556;
  flex-shrink: 0;
}

.admin-card-item__actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

/* Kart düymələri */
.admin-card-btn {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
  border: 1px solid transparent;
}

.admin-card-btn--set-active {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #c0c8d4;
}

.admin-card-btn--set-active:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.20);
  color: #e0e4ec;
}

.admin-card-btn--delete {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.admin-card-btn--delete:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

/* ── Light theme ── */
html[data-theme="light"] .admin-cards-input {
  border-color: rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
  color: #1a1f33;
}

html[data-theme="light"] .admin-cards-input::placeholder {
  color: #99a;
}

html[data-theme="light"] .admin-cards-input:focus {
  border-color: rgba(59, 130, 246, 0.50);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
  background: #fff;
}

html[data-theme="light"] .admin-cards-add-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

html[data-theme="light"] .admin-cards-add-btn:hover {
  background: linear-gradient(135deg, #4b8df7, #356fef);
}

html[data-theme="light"] .admin-card-item {
  border-color: rgba(0,0,0,0.06);
  background: #fff;
}

html[data-theme="light"] .admin-card-item:hover {
  border-color: rgba(0,0,0,0.13);
}

html[data-theme="light"] .admin-card-item--active {
  border-color: rgba(34, 197, 94, 0.30);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.03) 0%, rgba(34, 197, 94, 0.01) 100%);
}

html[data-theme="light"] .admin-card-item__number {
  color: #1a1f33;
}

html[data-theme="light"] .admin-card-item__meta {
  color: #667;
}

html[data-theme="light"] .admin-card-btn--set-active {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
  color: #556;
}

html[data-theme="light"] .admin-card-btn--set-active:hover {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.18);
  color: #334;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .admin-cards-form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-cards-add-btn {
    justify-content: center;
  }

  .admin-card-item__actions {
    flex-direction: column;
  }

  .admin-card-btn {
    text-align: center;
    min-height: 36px;
  }
}

.admin-settings-row .primary-button {
  flex: 0 0 auto;
}

.bank-card-visual:hover,
.bank-card-visual:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(140, 170, 240, 0.18);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.42),
    0 0 24px rgba(80, 120, 220, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.bank-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bank-card-chip-icon {
  width: 34px;
  height: 24px;
  border-radius: 5px;
  flex: 0 0 auto;
  background:
    linear-gradient(150deg, #f5edd0 0%, #d4c39a 25%, #e8dab0 50%, #c4b386 75%, #efe2c0 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.40);
}

.bank-card-brand {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
}

.bank-card-number-display {
  font-family: "SF Mono", "Fira Code", "Consolas", "Courier New", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  word-spacing: 3px;
  color: #e8eaf2;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.30),
    0 0 1px rgba(255, 255, 255, 0.08);
  background: none;
  padding: 2px 0;
  border-radius: 0;
  text-align: left;
  transition: color 200ms ease;
}

.bank-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.bank-card-name {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.66);
  text-transform: uppercase;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 3px;
  transition: background 120ms ease, color 120ms ease;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.bank-card-name:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e0e4f0;
}

/* ── Saved Cards List ── */
.saved-cards-list {
  display: grid;
  gap: 6px;
  padding-top: 4px;
}

.saved-card-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.saved-card-item:hover,
.saved-card-item.active {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.04);
}

.saved-card-chip {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #efe2bc, #c4b386, #d9c898);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.saved-card-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.saved-card-info strong {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-card-info code {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--muted);
  background: none;
  padding: 0;
}

.saved-card-delete {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  flex: 0 0 auto;
  transition: color 120ms ease, background 120ms ease;
}

.saved-card-delete:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.bank-card-amount {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.42);
  text-transform: uppercase;
}

#cardWithdrawalsList {
  overflow: visible;
}

#cardWithdrawalsList .card-withdrawal-item {
  margin-bottom: 6px;
}

[data-telegram-mini-app="true"] body.game-active .app-shell {
  padding-top: 0;
}

[data-telegram-mini-app="true"] body.game-active .topbar {
  margin-top: 0;
  margin-bottom: clamp(16px, calc(var(--tg-ui-safe-top) + 12px), 26px);
  padding-top: max(14px, calc(var(--tg-ui-safe-top) + 4px));
}

[data-telegram-mini-app="true"] body.game-active.menu-page-active .account-menu-header {
  margin-top: 0;
  padding-top: max(42px, calc(var(--tg-ui-safe-top) + 38px));
}

@media (max-width: 760px) {
  [data-telegram-mini-app="true"] body.game-active .app-shell {
    padding-top: 0;
  }

  [data-telegram-mini-app="true"] body.game-active .topbar {
    margin-bottom: clamp(42px, calc(var(--tg-ui-safe-top) + 38px), 50px);
    padding-top: max(10px, calc(var(--tg-ui-safe-top) - 28px));
  }

  [data-telegram-mini-app="true"] body.game-active.menu-page-active .account-menu-header {
    padding-top: max(56px, calc(var(--tg-ui-safe-top) + 52px));
  }

  [data-telegram-mini-app="true"] body.game-active .drawer-header {
    padding-top: max(20px, calc(var(--tg-ui-safe-top) + 16px));
  }

  /* Modern wallet selects & inputs — Telegram Mini App mobile */
  [data-telegram-mini-app="true"] .crypto-mini-form select,
  [data-telegram-mini-app="true"] .crypto-address-field select {
    min-height: 48px;
    padding: 0 32px 0 14px;
    border: 1px solid rgba(104, 122, 255, 0.32);
    border-radius: 12px;
    background: rgba(13, 18, 43, 0.94);
    color: #e8ecff;
    font-size: 0.85rem;
    font-weight: 600;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23788aff' d='M7 9.5L2 3.5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 180ms ease, box-shadow 180ms ease;
  }

  [data-telegram-mini-app="true"] .crypto-mini-form select:focus,
  [data-telegram-mini-app="true"] .crypto-address-field select:focus {
    border-color: rgba(120, 138, 255, 0.6);
    box-shadow: 0 0 12px rgba(104, 122, 255, 0.15);
  }

  [data-telegram-mini-app="true"] .crypto-mini-form input {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(104, 122, 255, 0.28);
    border-radius: 12px;
    background: rgba(13, 18, 43, 0.94);
    color: #e8ecff;
    font-size: 0.85rem;
    transition: border-color 180ms ease, box-shadow 180ms ease;
  }

  [data-telegram-mini-app="true"] .crypto-mini-form input:focus {
    border-color: rgba(120, 138, 255, 0.6);
    box-shadow: 0 0 12px rgba(104, 122, 255, 0.15);
  }

  [data-telegram-mini-app="true"] .crypto-mini-form button[type="submit"] {
    min-height: 48px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: transform 120ms ease, box-shadow 180ms ease;
  }

  [data-telegram-mini-app="true"] .crypto-mini-form button[type="submit"]:active {
    transform: scale(0.97);
  }
}

/* Bottom sheet select — all mobile */
.tg-select-trigger {
  display: none;
}

@media (max-width: 760px) {
  .crypto-mini-form select,
  .crypto-address-field select {
    display: none;
  }

  .tg-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(104, 122, 255, 0.32);
    border-radius: 12px;
    background: rgba(13, 18, 43, 0.94);
    color: #e8ecff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease;
  }

  .tg-select-trigger::after {
    content: "";
    width: 12px;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23788aff' d='M7 9.5L2 3.5h10z'/%3E%3C/svg%3E") center/contain no-repeat;
  }
}

/* ── Dropdown popover (replaces bottom sheet) ── */

.tg-dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 198;
}

.tg-dropdown {
  position: fixed;
  z-index: 199;
  min-width: 160px;
  max-height: 260px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(13, 18, 43, 0.98);
  border: 1px solid rgba(104, 122, 255, 0.18);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(104, 122, 255, 0.08);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: scale(0.94) translateY(-6px);
  transform-origin: top center;
  transition: opacity 180ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.tg-dropdown.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.tg-dropdown.drop-up {
  transform-origin: bottom center;
  transform: scale(0.94) translateY(6px);
}

.tg-dropdown.drop-up.open {
  transform: scale(1) translateY(0);
}

.tg-dropdown-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d4d9f0;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms ease;
  white-space: nowrap;
  text-align: left;
}

.tg-dropdown-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tg-dropdown-option:active {
  background: rgba(104, 122, 255, 0.16);
}

.tg-dropdown-option.selected {
  background: rgba(104, 122, 255, 0.2);
  color: #fff;
}

.tg-dropdown-option.selected::after {
  content: "✓";
  font-size: 0.8rem;
  color: #788aff;
  margin-left: 10px;
}

/* Light theme */
html[data-theme="light"] .tg-dropdown {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(104, 122, 255, 0.15);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(104, 122, 255, 0.1);
}

html[data-theme="light"] .tg-dropdown-option {
  color: #2a2f45;
}

html[data-theme="light"] .tg-dropdown-option:hover {
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .tg-dropdown-option:active {
  background: rgba(104, 122, 255, 0.12);
}

html[data-theme="light"] .tg-dropdown-option.selected {
  background: rgba(104, 122, 255, 0.14);
  color: #1a1f33;
}

/* ── Admin Currency Dropdown Trigger ── */
.admin-currency-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ticket-bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s;
}
.admin-currency-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  transition: transform 0.2s;
}
.admin-currency-trigger.open::after {
  transform: rotate(180deg);
}
.admin-currency-trigger:hover {
  border-color: rgba(104, 122, 255, 0.4);
}

/* Admin currency bottom sheet (mobile) */
@media (max-width: 480px) {
  .tg-dropdown.admin-currency-sheet {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 50vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    transform-origin: bottom center;
  }
  .tg-dropdown.admin-currency-sheet.open {
    transform: translateY(0);
  }
}

/* ── Warning Banner Overlay (User side) ── */
.warning-banner-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: rgba(2, 6, 16, 0.88);
  backdrop-filter: blur(16px);
  animation: warning-overlay-in 0.25s ease-out;
}

@keyframes warning-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.warning-banner-card {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 28px 28px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.12), transparent 50%),
    linear-gradient(180deg, #0a0c15 0%, #060810 100%);
  box-shadow:
    0 0 60px rgba(250, 204, 21, 0.14),
    0 8px 40px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: warning-card-in 0.35s ease-out;
  text-align: center;
}

@keyframes warning-card-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.warning-banner-icon {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: -4px;
}

.warning-banner-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #facc15;
  margin: 0;
}

.warning-banner-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #cdd2e0;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
}

.warning-banner-close {
  margin-top: 8px;
  min-width: 130px;
  min-height: 44px;
  font-size: 0.95rem;
}

/* ── Admin Warning Panel ── */
.admin-warning-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.warning-textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #e4e7f0;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.55;
  transition: border-color 0.2s;
}

.warning-textarea:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14);
}

.warning-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.warning-char-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.warning-char-count {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

.warning-button-row {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.warning-button-row button {
  min-width: 120px;
}

/* Light theme overrides */
html[data-theme="light"] .warning-banner-overlay {
  background: rgba(240, 242, 248, 0.9);
  backdrop-filter: blur(16px);
}

html[data-theme="light"] .warning-banner-card {
  border-color: rgba(180, 130, 20, 0.3);
  background:
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.08), transparent 50%),
    linear-gradient(180deg, #f8f9fc 0%, #f0f2f8 100%);
  box-shadow:
    0 0 40px rgba(180, 130, 20, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .warning-banner-title {
  color: #8b6914;
}

html[data-theme="light"] .warning-banner-text {
  color: #3a3f55;
}

html[data-theme="light"] .warning-textarea {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.02);
  color: #1a1f33;
}

html[data-theme="light"] .warning-textarea:focus {
  border-color: rgba(104, 122, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(104, 122, 255, 0.12);
}

html[data-theme="light"] .warning-char-count {
  color: rgba(0, 0, 0, 0.45);
}

/* ── Endpoint Rate Limits ── */
.endpoint-limits-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.endpoint-limit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  flex-wrap: wrap;
}

.endpoint-limit-key {
  font-family: monospace;
  font-size: 0.88rem;
  color: #e4e7f0;
  flex: 1;
  min-width: 180px;
  word-break: break-all;
}

.endpoint-limit-value {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.endpoint-limit-remove {
  min-width: 54px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.endpoint-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.endpoint-add-row .compact-field {
  flex: 1;
  min-width: 100px;
}

.endpoint-add-row .narrow-field {
  flex: 0 0 80px;
  min-width: 70px;
}

/* Light theme overrides */
html[data-theme="light"] .endpoint-limit-row {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .endpoint-limit-key {
  color: #1a1f33;
}

html[data-theme="light"] .endpoint-limit-value {
  color: rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════
   Deposit Card UI — Müasir Kart Dizaynı
   ═══════════════════════════════════════════ */

.deposit-card-wrapper {
  background: linear-gradient(135deg, #1a1d28 0%, #1f2332 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 18px;
  margin: 10px 0 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.03);
  transition: all 0.2s ease;
}

.deposit-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #8890a4;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

.deposit-card-icon {
  width: 18px;
  height: 18px;
  color: #4f8;
  flex-shrink: 0;
}

.deposit-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.deposit-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 10px 12px;
  transition: background 0.15s;
}

.deposit-card-row:hover {
  background: rgba(255,255,255,0.06);
}

.deposit-card-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.deposit-card-label {
  font-size: 10px;
  color: #667;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

.deposit-card-value {
  font-size: 14px;
  color: #e0e4ec;
  word-break: break-all;
}

.deposit-card-value.mono {
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 15px;
  letter-spacing: 1.5px;
}

.deposit-copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #8890a4;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s;
}

.deposit-copy-btn:hover {
  background: rgba(79, 255, 136, 0.1);
  border-color: rgba(79, 255, 136, 0.3);
  color: #4f8;
}

.deposit-copy-btn:active {
  transform: scale(0.95);
}

.deposit-copy-btn.copied {
  background: rgba(79, 255, 136, 0.15);
  border-color: #4f8;
  color: #4f8;
}

.deposit-copy-btn svg {
  width: 14px;
  height: 14px;
}

.deposit-copy-label {
  font-size: 10px;
}

/* ── Deposit Action Row (yan-yana düymələr) ── */
.deposit-action-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.deposit-action-row > * {
  flex: 1;
  min-width: 0;
}

/* Cancel button inside action row — match paid button sizing */
.deposit-action-row .deposit-pending-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 0;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255,100,100,0.35);
  background: rgba(255,100,100,0.08);
  color: #f88;
  height: auto;
  min-height: 48px;
}

.deposit-action-row .deposit-pending-cancel:hover {
  background: rgba(255,100,100,0.16);
  border-color: rgba(255,100,100,0.5);
  color: #faa;
}

/* ── Admin actions grid (3×2, Adminlər səhifəsi) ── */
.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.admin-actions-grid > button,
.admin-actions-grid > .secondary-button,
.admin-actions-grid > .ticket-delete-button {
  text-align: center;
  height: 40px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.15;
  overflow: hidden;
}

.admin-actions-grid .secondary-button {
  border: 1px solid rgba(100,180,255,0.3);
  background: rgba(100,180,255,0.08);
  color: #64b4ff;
  margin: 0;
}

.admin-actions-grid .secondary-button:hover {
  background: rgba(100,180,255,0.16);
  border-color: rgba(100,180,255,0.5);
  color: #8bcbff;
}

.admin-actions-grid .ticket-delete-button {
  border: 1px solid rgba(255,100,100,0.3);
  background: rgba(255,100,100,0.08);
  color: #f88;
  margin: 0;
}

.admin-actions-grid .ticket-delete-button:hover {
  background: rgba(255,100,100,0.16);
  border-color: rgba(255,100,100,0.5);
  color: #faa;
}

/* Light theme */
html[data-theme="light"] .admin-actions-grid .secondary-button {
  border-color: rgba(74,140,212,0.2);
  background: rgba(74,140,212,0.06);
  color: #4a8cd4;
}

html[data-theme="light"] .admin-actions-grid .ticket-delete-button {
  border-color: rgba(200,60,60,0.2);
  background: rgba(200,60,60,0.04);
  color: #d33;
}

@media (max-width: 480px) {
  .admin-actions-grid {
    gap: 6px;
  }
  .admin-actions-grid > button,
  .admin-actions-grid > .secondary-button,
  .admin-actions-grid > .ticket-delete-button {
    font-size: 10px;
    padding: 6px 8px;
    height: 40px;
    line-height: 1.1;
    border-radius: 8px;
  }
  .admin-actions-grid [data-admin-card-history],
  .admin-actions-grid [data-admin-commission-paid],
  .admin-actions-grid [data-admin-set-balance] {
    font-size: 9px;
  }
}

@media (max-width: 360px) {
  .admin-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .admin-actions-grid > button,
  .admin-actions-grid > .secondary-button,
  .admin-actions-grid > .ticket-delete-button {
    font-size: 10px;
    padding: 6px 8px;
    height: 40px;
    line-height: 1.1;
    border-radius: 8px;
  }
  .admin-actions-grid [data-admin-card-history],
  .admin-actions-grid [data-admin-commission-paid],
  .admin-actions-grid [data-admin-set-balance] {
    font-size: 9px;
  }
}

/* Admin deposit action row */
.admin-deposit-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.admin-deposit-action-row > * {
  flex: 1;
  min-width: 0;
}

.admin-deposit-action-row > button,
.admin-deposit-action-row > .secondary-button,
.admin-deposit-action-row > .cancel-card-button,
.admin-deposit-action-row > .ticket-delete-button {
  text-align: center;
  height: 40px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: normal;
  word-break: break-word;
  line-height: 1.15;
  overflow: hidden;
}

.admin-deposit-action-row .primary-button {
  border: 1px solid rgba(68,255,136,0.3);
  background: rgba(68,255,136,0.1);
  color: #4f8;
  margin: 0;
  font-weight: 700;
}

.admin-deposit-action-row .primary-button:hover {
  background: rgba(68,255,136,0.2);
  border-color: rgba(68,255,136,0.5);
  color: #7dffa8;
}

.admin-deposit-action-row .secondary-button {
  border: 1px solid rgba(100,180,255,0.3);
  background: rgba(100,180,255,0.08);
  color: #64b4ff;
  margin: 0;
}

.admin-deposit-action-row .secondary-button:hover {
  background: rgba(100,180,255,0.16);
  border-color: rgba(100,180,255,0.5);
  color: #8bcbff;
}

.admin-deposit-action-row .cancel-card-button {
  border: 1px solid rgba(255,100,100,0.3);
  background: rgba(255,100,100,0.08);
  color: #f88;
  margin: 0;
  font-weight: 700;
}

.admin-deposit-action-row .cancel-card-button:hover {
  background: rgba(255,100,100,0.16);
  border-color: rgba(255,100,100,0.5);
  color: #faa;
}

/* Light theme — action rows */
html[data-theme="light"] .deposit-action-row .deposit-pending-cancel {
  border-color: rgba(200,60,60,0.2);
  background: rgba(200,60,60,0.04);
  color: #d33;
}

html[data-theme="light"] .deposit-action-row .deposit-pending-cancel:hover {
  background: rgba(200,60,60,0.1);
  border-color: rgba(200,60,60,0.4);
  color: #b22;
}

html[data-theme="light"] .admin-deposit-action-row .primary-button {
  border-color: rgba(40,160,100,0.25);
  background: rgba(40,160,100,0.08);
  color: #2a8;
}

html[data-theme="light"] .admin-deposit-action-row .primary-button:hover {
  background: rgba(40,160,100,0.16);
  border-color: rgba(40,160,100,0.5);
  color: #1a7a4a;
}

html[data-theme="light"] .admin-deposit-action-row .secondary-button {
  border-color: rgba(74,140,212,0.2);
  background: rgba(74,140,212,0.06);
  color: #4a8cd4;
}

html[data-theme="light"] .admin-deposit-action-row .cancel-card-button {
  border-color: rgba(200,60,60,0.2);
  background: rgba(200,60,60,0.04);
  color: #d33;
}

/* Responsive */
@media (max-width: 480px) {
  .deposit-action-row {
    gap: 6px;
  }
  .deposit-action-row .deposit-pending-cancel {
    padding: 10px 12px;
    font-size: 12px;
    min-height: 42px;
  }
  .admin-deposit-action-row {
    gap: 6px;
  }
  .admin-deposit-action-row > button,
  .admin-deposit-action-row > .secondary-button,
  .admin-deposit-action-row > .cancel-card-button,
  .admin-deposit-action-row > .ticket-delete-button {
    font-size: 10px;
    padding: 6px 6px;
    height: 40px;
    min-height: 0;
    line-height: 1.1;
    border-radius: 8px;
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
  }
  .admin-deposit-action-row [data-admin-card-history],
  .admin-deposit-action-row [data-admin-commission-paid],
  .admin-deposit-action-row [data-admin-set-balance] {
    font-size: 8px;
  }
}

@media (max-width: 360px) {
  .admin-deposit-action-row {
    flex-wrap: wrap;
    gap: 4px;
  }
  .admin-deposit-action-row > * {
    flex: 1 1 calc(50% - 2px);
    min-width: 0;
  }
  .admin-deposit-action-row > button,
  .admin-deposit-action-row > .secondary-button,
  .admin-deposit-action-row > .cancel-card-button,
  .admin-deposit-action-row > .ticket-delete-button {
    font-size: 9px;
    padding: 6px 4px;
    height: 38px;
    min-height: 0;
    line-height: 1.1;
    border-radius: 7px;
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
  }
  .admin-deposit-action-row [data-admin-card-history],
  .admin-deposit-action-row [data-admin-commission-paid],
  .admin-deposit-action-row [data-admin-set-balance] {
    font-size: 7px;
  }
}

/* Ödəniş etdim düyməsi */
.deposit-paid-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border: 1px solid rgba(128, 100, 255, 0.50);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(78, 69, 255, 0.90), rgba(222, 44, 255, 0.84));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), 0 0 20px rgba(135, 86, 255, 0.34);
}

.deposit-paid-button:hover {
  border-color: rgba(150, 120, 255, 0.65);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 28px rgba(135, 86, 255, 0.50);
  transform: translateY(-1px);
}

.deposit-paid-button:active {
  transform: scale(0.98);
}

.deposit-paid-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

html[data-theme="light"] .deposit-paid-button {
  border-color: rgba(124, 58, 237, 0.25);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.98), rgba(224, 242, 254, 0.98));
  color: #172554;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58), 0 10px 24px rgba(57, 78, 126, 0.10);
}

.deposit-paid-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.deposit-btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   Receipt Upload — Drag & Drop
   ═══════════════════════════════════════════ */

.deposit-receipt-wrapper {
  background: linear-gradient(135deg, #1a1d28 0%, #1f2332 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 18px;
  margin: 10px 0 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.deposit-receipt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #8890a4;
  margin-bottom: 12px;
}

.deposit-drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 16px;
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255,255,255,0.01);
  margin-bottom: 10px;
}

.deposit-drop-zone:hover,
.deposit-drop-zone.drag-over {
  border-color: rgba(79, 255, 136, 0.4);
  background: rgba(79, 255, 136, 0.03);
}

.deposit-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.deposit-upload-icon {
  width: 36px;
  height: 36px;
  color: #4f8;
  opacity: 0.6;
}

.deposit-drop-text {
  font-size: 13px;
  color: #aab;
  font-weight: 500;
}

.deposit-drop-hint {
  font-size: 11px;
  color: #556;
}

/* Fayl preview */
.deposit-file-preview {
  margin-bottom: 10px;
}

.deposit-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(79, 255, 136, 0.06);
  border: 1px solid rgba(79, 255, 136, 0.15);
  border-radius: 8px;
  font-size: 13px;
  color: #c0c8d4;
}

.deposit-file-info svg {
  flex-shrink: 0;
  color: #4f8;
}

.deposit-file-size {
  font-size: 11px;
  color: #667;
  margin-left: auto;
}

.deposit-file-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: none;
  background: none;
  color: #f66;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
}

.deposit-file-remove:hover {
  background: rgba(255, 100, 100, 0.1);
}

/* Qeyd input */
.deposit-note-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #c0c8d4;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.deposit-note-input:focus {
  outline: none;
  border-color: rgba(79, 255, 136, 0.3);
}

.deposit-note-input::placeholder {
  color: #555;
}

/* ═══════════════════════════════════════════
   Status Panelləri
   ═══════════════════════════════════════════ */

/* ── Çek Təsdiq Gözləmə Card (depositReceiptPending / approved / rejected) ── */
.deposit-receipt-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 20px 16px;
  margin: 6px 0 10px;
  background: linear-gradient(160deg, #1a1d28 0%, #1f2636 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.02);
  position: relative;
  overflow: hidden;
}

.deposit-receipt-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(100,180,255,0.4), transparent);
  animation: pending-shimmer 2s ease-in-out infinite;
}

.deposit-approved-card::before {
  background: linear-gradient(90deg, transparent, rgba(68,255,136,0.5), transparent);
  animation: none;
  opacity: 1;
}

.deposit-rejected-card::before {
  background: linear-gradient(90deg, transparent, rgba(255,102,102,0.5), transparent);
  animation: none;
  opacity: 1;
}

.deposit-receipt-pulse {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.deposit-receipt-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(100,180,255,0.4);
  animation: pending-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.deposit-receipt-ring.delay-1 { animation-delay: 0.6s; }

.deposit-receipt-icon {
  width: 22px;
  height: 22px;
  color: #64b4ff;
  z-index: 1;
  animation: receipt-float 2.5s ease-in-out infinite;
}

@keyframes receipt-float {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-3px); opacity: 1; }
}

.deposit-approved-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(68,255,136,0.3);
  animation: approved-pop 0.5s ease-out forwards;
}

@keyframes approved-pop {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.deposit-approved-icon {
  width: 28px;
  height: 28px;
  color: #4f8;
  z-index: 1;
  animation: approved-bounce 0.5s ease-out;
}

@keyframes approved-bounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.deposit-rejected-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255,102,102,0.3);
  animation: rejected-shake-pop 0.5s ease-out forwards;
}

@keyframes rejected-shake-pop {
  0% { transform: scale(0.6); opacity: 1; }
  50% { transform: scale(1.6) rotate(5deg); opacity: 0.5; }
  100% { transform: scale(2.2) rotate(-3deg); opacity: 0; }
}

.deposit-rejected-icon {
  width: 28px;
  height: 28px;
  color: #f66;
  z-index: 1;
  animation: rejected-bounce 0.4s ease-out;
}

@keyframes rejected-bounce {
  0% { transform: scale(0) rotate(-90deg); }
  70% { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.deposit-receipt-title {
  font-size: 14px;
  font-weight: 700;
  color: #f0e6d2;
}

.deposit-receipt-title.success-text { color: #4f8; }
.deposit-receipt-title.error-text { color: #f66; }

.deposit-receipt-text {
  font-size: 12px;
  color: #8890a4;
  margin: 0;
  max-width: 280px;
  line-height: 1.4;
}

.deposit-receipt-steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 240px;
  margin-top: 4px;
}

/* ── Çek Timer Display ── */
.deposit-timer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 14px;
  background: rgba(100,180,255,0.06);
  border: 1px solid rgba(100,180,255,0.12);
  border-radius: 10px;
}

.deposit-timer-icon {
  width: 18px;
  height: 18px;
  color: #f9a825;
  flex-shrink: 0;
}

.deposit-timer-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #64b4ff;
  letter-spacing: 1px;
}

.deposit-timer-value.timer-warning {
  color: #f9a825;
  animation: timer-pulse 1s ease-in-out infinite;
}

.deposit-timer-value.timer-expired {
  color: #f66;
}

@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.deposit-timer-hint {
  font-size: 11px;
  color: #667;
  margin: 4px 0 0;
  max-width: 250px;
  text-align: center;
}

/* ── Vaxt bitdi (Expired) Card ── */
.deposit-expired-card::before {
  background: linear-gradient(90deg, transparent, rgba(249,168,37,0.5), transparent);
  animation: none;
  opacity: 1;
}

.deposit-expired-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(249,168,37,0.3);
  animation: expired-ring-pop 0.5s ease-out forwards;
}

@keyframes expired-ring-pop {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.deposit-expired-icon {
  width: 28px;
  height: 28px;
  color: #f9a825;
  z-index: 1;
  animation: expired-bounce 0.4s ease-out;
}

@keyframes expired-bounce {
  0% { transform: scale(0) rotate(-45deg); }
  70% { transform: scale(1.15) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.expired-text { color: #f9a825; }

/* Old deposit-status-wrapper kept for backward compat */
.deposit-status-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 24px 18px;
  margin: 10px 0 14px;
  background: linear-gradient(135deg, #1a1d28 0%, #1f2332 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.deposit-status-icon {
  width: 40px;
  height: 40px;
  color: #8890a4;
}

.deposit-status-icon svg {
  width: 100%;
  height: 100%;
}

.deposit-status-icon.spinning svg {
  animation: deposit-spin 2s linear infinite;
  color: #f9a825;
}

.deposit-status-icon.success svg { color: #4f8; }
.deposit-status-icon.error svg { color: #f66; }

@keyframes deposit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.deposit-status-title {
  font-size: 15px;
  font-weight: 600;
  color: #c0c8d4;
}

.deposit-status-title.success-text { color: #4f8; }
.deposit-status-title.error-text { color: #f66; }

.deposit-status-text {
  font-size: 12px;
  color: #667;
  margin: 0;
  max-width: 260px;
}

.deposit-close-button {
  margin-top: 6px;
  padding: 8px 24px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #aab;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.deposit-close-button:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: #e0e4ec;
}

/* ═══════════════════════════════════════════
   Light Theme
   ═══════════════════════════════════════════ */

html[data-theme="light"] .deposit-card-wrapper,
html[data-theme="light"] .deposit-receipt-wrapper,
html[data-theme="light"] .deposit-receipt-card,
html[data-theme="light"] .deposit-status-wrapper {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

html[data-theme="light"] .deposit-card-header,
html[data-theme="light"] .deposit-receipt-header {
  color: #667;
}

html[data-theme="light"] .deposit-card-row {
  background: rgba(0,0,0,0.02);
}

html[data-theme="light"] .deposit-card-row:hover {
  background: rgba(0,0,0,0.04);
}

html[data-theme="light"] .deposit-card-label {
  color: #99a;
}

html[data-theme="light"] .deposit-card-value {
  color: #1a1f33;
}

html[data-theme="light"] .deposit-copy-btn {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  color: #667;
}

html[data-theme="light"] .deposit-copy-btn:hover {
  background: rgba(79, 200, 120, 0.08);
  border-color: rgba(79, 200, 120, 0.3);
  color: #3a8;
}

html[data-theme="light"] .deposit-drop-zone {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.01);
}

html[data-theme="light"] .deposit-drop-text {
  color: #667;
}

html[data-theme="light"] .deposit-drop-hint {
  color: #99a;
}

html[data-theme="light"] .deposit-file-info {
  background: rgba(79, 200, 120, 0.06);
  border-color: rgba(79, 200, 120, 0.2);
  color: #334;
}

html[data-theme="light"] .deposit-note-input {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.1);
  color: #334;
}

html[data-theme="light"] .deposit-status-title,
html[data-theme="light"] .deposit-receipt-title {
  color: #334;
}

html[data-theme="light"] .deposit-status-text,
html[data-theme="light"] .deposit-receipt-text {
  color: #889;
}

html[data-theme="light"] .deposit-timer-row {
  background: rgba(74,140,212,0.04);
  border-color: rgba(74,140,212,0.1);
}

html[data-theme="light"] .deposit-timer-value {
  color: #4a8cd4;
}

html[data-theme="light"] .deposit-timer-value.timer-warning {
  color: #d97a1a;
}

html[data-theme="light"] .deposit-timer-hint {
  color: #889;
}

html[data-theme="light"] .expired-text {
  color: #c77800;
}

html[data-theme="light"] .deposit-close-button {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  color: #667;
}

html[data-theme="light"] .deposit-close-button:hover {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.2);
  color: #334;
}

/* ═══════════════════════════════════════════
   Responsive Mobile
   ═══════════════════════════════════════════ */

@media (max-width: 480px) {
  .deposit-card-wrapper,
  .deposit-receipt-wrapper,
  .deposit-receipt-card,
  .deposit-status-wrapper {
    padding: 14px;
    border-radius: 12px;
  }
  .deposit-timer-value {
    font-size: 18px;
  }
  .deposit-timer-row {
    padding: 4px 10px;
  }
  .deposit-card-value {
    font-size: 13px;
  }
  .deposit-card-value.mono {
    font-size: 13px;
    letter-spacing: 1px;
  }
  .deposit-drop-zone {
    padding: 20px 10px;
  }
  .deposit-upload-icon {
    width: 28px;
    height: 28px;
  }
  .deposit-drop-text {
    font-size: 12px;
  }
}

/* ═══════════════════════════════════════════
   Pending State — Müasir Status Card
   ═══════════════════════════════════════════ */

.deposit-pending-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 20px 16px;
  margin: 6px 0 10px;
  background: linear-gradient(160deg, #1a1d28 0%, #1f2636 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.02);
  position: relative;
  overflow: hidden;
}

.deposit-pending-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(249,168,37,0.4), transparent);
  animation: pending-shimmer 2s ease-in-out infinite;
}

@keyframes pending-shimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.deposit-pending-pulse {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.deposit-pending-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(249,168,37,0.5);
  animation: pending-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.deposit-pending-ring.delay-1 { animation-delay: 0.4s; }
.deposit-pending-ring.delay-2 { animation-delay: 0.8s; }

@keyframes pending-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.deposit-pending-icon {
  width: 22px;
  height: 22px;
  color: #f9a825;
  z-index: 1;
  animation: pending-clock 3s ease-in-out infinite;
}

@keyframes pending-clock {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
}

.deposit-pending-title {
  font-size: 14px;
  font-weight: 700;
  color: #f0e6d2;
}

.deposit-pending-text {
  font-size: 12px;
  color: #8890a4;
  margin: 0;
  max-width: 280px;
  line-height: 1.4;
}

.deposit-pending-steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 240px;
  margin: 2px 0;
}

.deposit-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #556;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
}

.deposit-step.done {
  color: #4f8;
  background: rgba(79,255,136,0.04);
}

.deposit-step.done svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.deposit-step.active {
  color: #f0c060;
  background: rgba(249,168,37,0.06);
}

.deposit-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  flex-shrink: 0;
  border: 2px solid #444;
}

.deposit-step.active .deposit-step-dot {
  background: #f9a825;
  border-color: #f9a825;
  animation: dot-pulse 1.5s ease-in-out infinite;
}

.deposit-step.done .deposit-step-dot {
  background: #4f8;
  border-color: #4f8;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,168,37,0.4); }
  50% { box-shadow: 0 0 0 5px rgba(249,168,37,0); }
}

.deposit-pending-cancel {
  margin-top: 4px;
  padding: 6px 16px;
  border: 1px solid rgba(255,100,100,0.2);
  border-radius: 6px;
  background: rgba(255,100,100,0.05);
  color: #f88;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.deposit-pending-cancel:hover {
  background: rgba(255,100,100,0.12);
  border-color: rgba(255,100,100,0.4);
  color: #faa;
}

/* Light theme */
html[data-theme="light"] .deposit-pending-card {
  background: linear-gradient(160deg, #fafbfc 0%, #f0f4f8 100%);
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

html[data-theme="light"] .deposit-pending-card::before {
  background: linear-gradient(90deg, transparent, rgba(240,160,30,0.3), transparent);
}

html[data-theme="light"] .deposit-pending-title {
  color: #3a3a3a;
}

html[data-theme="light"] .deposit-pending-text {
  color: #667;
}

html[data-theme="light"] .deposit-step {
  color: #99a;
  background: rgba(0,0,0,0.02);
}

html[data-theme="light"] .deposit-step.active {
  color: #b8781a;
  background: rgba(200,150,30,0.06);
}

html[data-theme="light"] .deposit-step.done {
  color: #2a8;
  background: rgba(40,160,100,0.04);
}

/* Responsive */
@media (max-width: 480px) {
  .deposit-pending-card {
    padding: 16px 12px;
    gap: 6px;
  }
  .deposit-pending-pulse {
    width: 40px;
    height: 40px;
  }
  .deposit-pending-title {
    font-size: 13px;
  }
  .deposit-pending-text {
    font-size: 11px;
  }
}
