/* ==========================================================================
   Kaspa Bingo — testnet-12
   Plain CSS, no external resources. Dark theme, Kaspa-teal accent.
   ========================================================================== */

:root {
  --accent: #70c7ba;
  --accent-dark: #4fa79a;
  --accent-bright: #8fe0d3;
  --accent-soft: rgba(112, 199, 186, 0.14);
  --accent-soft-strong: rgba(112, 199, 186, 0.28);

  --bg: #0a1211;
  --bg-elevated: #0f1b19;
  --panel: #131f1d;
  --panel-alt: #182524;
  --panel-hover: #1c2b29;
  --border: #24403b;
  --border-soft: #1b302c;

  --text: #eaf5f2;
  --text-dim: #9fb8b3;
  --text-faint: #6c8b85;

  --danger: #ef6461;
  --danger-soft: rgba(239, 100, 97, 0.14);
  --warning: #e8b64a;
  --warning-soft: rgba(232, 182, 74, 0.14);
  --success: #6fcf97;
  --success-soft: rgba(111, 207, 151, 0.14);
  --gold: #f2c14e;

  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 6px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo,
    monospace;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: radial-gradient(circle at top, #0f1c1a 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

button {
  font-family: inherit;
}

::selection {
  background: var(--accent-soft-strong);
  color: var(--text);
}

/* Scrollbars (Webkit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dark);
}

/* ==========================================================================
   Header
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(10, 18, 17, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.app-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-title .brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #06110f;
  font-weight: 800;
  font-size: 0.95rem;
}

.network-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-strong);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  min-width: 96px;
}

.status-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.status-value {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
}

.status-value.accent {
  color: var(--accent-bright);
  font-weight: 700;
}

/* Signed-in account chip + balance, shown in the header once an account exists */
.account-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.account-bar:empty {
  display: none;
}

.account-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-strong);
  border-radius: var(--radius-sm);
}

.account-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent-bright);
}

.account-address {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-faint);
}

.account-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.app-root {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 64px;
}

.app-footer {
  text-align: center;
  color: var(--text-faint);
  padding: 24px 20px 40px;
  font-size: 0.78rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.panel + .panel {
  margin-top: 16px;
}

.panel h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--text);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.section-title h2 {
  margin: 0;
}

.muted {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.faint {
  color: var(--text-faint);
}

/* ==========================================================================
   Account signup card
   ========================================================================== */

.account-card {
  border: 1px solid var(--accent-soft-strong);
  background: linear-gradient(135deg, var(--accent-soft), var(--panel) 60%);
}

.account-card p.muted {
  margin: 0 0 14px;
}

/* ==========================================================================
   Buttons & Forms
   ========================================================================== */

button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease,
    opacity 0.15s ease;
  min-height: 40px;
}

button:hover:not(:disabled) {
  background: var(--panel-hover);
  border-color: var(--accent-dark);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06110f;
}

button.btn-primary:hover:not(:disabled) {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
}

button.btn-danger-outline {
  border-color: var(--danger);
  color: var(--danger);
  background: transparent;
}

button.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}

button.btn-block {
  width: 100%;
}

button.btn-small {
  padding: 6px 10px;
  font-size: 0.75rem;
  min-height: 32px;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.9rem;
  min-height: 44px;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

label {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-row .field {
  flex: 1 1 140px;
  min-width: 120px;
}

/* ==========================================================================
   Lobby
   ========================================================================== */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.game-card {
  background: var(--panel-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.1s ease, background 0.15s ease;
  color: var(--text);
}

.game-card:hover {
  border-color: var(--accent);
  background: var(--panel-hover);
  transform: translateY(-2px);
}

.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-id {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.game-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.82rem;
}

.game-stats .stat-label {
  color: var(--text-faint);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-stats .stat-value {
  font-weight: 700;
  color: var(--text);
}

.empty-state {
  color: var(--text-faint);
  padding: 30px 10px;
  text-align: center;
  font-size: 0.9rem;
}

/* Phase badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-lobby {
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px solid rgba(232, 182, 74, 0.35);
}

.badge-revealing {
  color: var(--gold);
  background: var(--warning-soft);
  border: 1px solid rgba(232, 182, 74, 0.35);
}

.badge-revealing .badge-dot {
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.badge-active {
  color: var(--accent-bright);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-strong);
}

.badge-active .badge-dot {
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.badge-finished {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

/* ==========================================================================
   Game view
   ========================================================================== */

.game-header-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.game-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.deadline-line {
  margin-top: 4px;
  font-size: 0.72rem;
}

.recover-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 2px 2px 12px;
  color: var(--text-faint);
}

.recover-bar .btn-small {
  color: var(--text-faint);
  background: transparent;
}

.back-link {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 6px 4px;
  font-weight: 600;
  min-height: auto;
}

.back-link:hover {
  color: var(--accent);
  background: transparent;
  border: none;
}

.game-header-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.game-header-stats .stat-label {
  color: var(--text-faint);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-header-stats .stat-value {
  font-weight: 700;
  font-size: 1rem;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .game-layout {
    grid-template-columns: 1fr;
  }

  /* Mobile ergonomics: the top action bar, winner banner and the player's
     own bingo card are more useful than the 75-tile draw board, which would
     otherwise push everything below the fold. Reorders the existing
     flex/grid children only — no markup changes. */
  #game-body {
    display: flex;
    flex-direction: column;
  }

  #draw-bar-panel {
    order: 1;
  }

  #winner-section {
    order: 2;
  }

  #reveal-section {
    order: 3;
  }

  .game-layout {
    order: 4;
  }

  .tx-log-panel {
    order: 5;
  }

  /* Within the game layout: the bingo card column before the draw board. */
  .game-layout > div {
    order: 1;
  }

  #draw-panel {
    order: 2;
  }
}

/* ==========================================================================
   Draw bar — the prominent "Draw next number" control at the top of the
   game area, above both the draw board and the card.
   ========================================================================== */

.draw-bar-panel {
  padding: 14px 18px;
}

#draw-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.action-bar-form {
  /* Lets the join button inside the form participate directly in the
     #draw-bar flex layout, as if the form itself were not there. */
  display: contents;
  margin: 0;
}

.draw-btn-big {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(112, 199, 186, 0.18);
}

.draw-bar-number {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* BINGO alert — replaces the "Draw next number" button in the top action
   bar the moment the current player's own card has a completed line. Needs
   to read as unmistakably different from the normal teal buttons, so it
   gets a warm/gold accent plus a gentle pulse. */
button.btn-primary.bingo-alert {
  background: #ffb020;
  border-color: #ffb020;
  color: #1a1207;
  box-shadow: 0 6px 22px rgba(255, 176, 32, 0.4);
  animation: bingo-alert-pulse 1.4s ease-in-out infinite;
}

button.btn-primary.bingo-alert:hover:not(:disabled) {
  background: #ffc04d;
  border-color: #ffc04d;
}

@keyframes bingo-alert-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 176, 32, 0.55);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 176, 32, 0);
  }
}

.bingo-alert-subtitle {
  color: #ffb020;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  button.btn-primary.bingo-alert {
    animation: none;
  }
}

/* ==========================================================================
   Draw board
   ========================================================================== */

.big-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  color: var(--accent-bright);
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

.big-number.empty {
  color: var(--text-faint);
  font-size: 1.1rem;
  border-color: var(--border);
  background: var(--panel-alt);
}

.big-number.pop {
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop-in {
  0% {
    transform: scale(0.4);
    opacity: 0;
    box-shadow: 0 0 0 0 var(--accent-soft-strong);
  }
  60% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 0 14px rgba(112, 199, 186, 0);
  }
  100% {
    transform: scale(1);
  }
}

.draw-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.draw-meta .draw-count {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 700;
}

.draw-board {
  display: inline-grid;
  grid-template-columns: repeat(5, clamp(34px, 6.4vw, 38px));
  grid-auto-rows: clamp(34px, 6.4vw, 38px);
  gap: 3px;
}

.draw-board .letter-header {
  text-align: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--accent);
  display: grid;
  place-items: center;
}

.draw-cell {
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  font-size: 0.66rem;
  color: var(--text-faint);
  font-family: var(--mono);
}

.draw-cell.drawn {
  background: var(--accent-soft-strong);
  border-color: var(--accent);
  color: var(--accent-bright);
  font-weight: 700;
}

/* ==========================================================================
   Bingo card
   ========================================================================== */

.bingo-card {
  display: inline-grid;
  grid-template-columns: repeat(5, clamp(52px, 11vw, 60px));
  grid-auto-rows: clamp(52px, 11vw, 60px);
  gap: 6px;
}

.bingo-card .letter-header {
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
  display: grid;
  place-items: center;
}

.bingo-cell {
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.bingo-cell.marked {
  background: var(--accent-soft-strong);
  border-color: var(--accent);
  color: var(--accent-bright);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.bingo-cell.free {
  background: var(--warning-soft);
  border-color: var(--gold);
  color: var(--gold);
  font-size: 1.15rem;
}

.bingo-cell.win-line {
  animation: cell-glow 1.2s ease-in-out infinite;
}

@keyframes cell-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--accent-soft-strong);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(112, 199, 186, 0.18);
  }
}

.card-owner-name {
  font-weight: 700;
  margin-bottom: 10px;
}

.claim-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Spectator: many small cards */
.spectator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.mini-card-wrap {
  background: var(--panel-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px;
}

.mini-card-name {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mini-bingo-card {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}

.mini-cell {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  font-size: 0.62rem;
  color: var(--text-faint);
  font-family: var(--mono);
}

.mini-cell.marked {
  background: var(--accent-soft-strong);
  border-color: var(--accent);
  color: var(--accent-bright);
}

.mini-cell.free {
  background: var(--warning-soft);
  border-color: var(--gold);
  color: var(--gold);
}

.claimed-tag {
  font-size: 0.62rem;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 1px 6px;
}

/* ==========================================================================
   Join form
   ========================================================================== */

.join-panel {
  border: 1px dashed var(--accent-soft-strong);
}

/* ==========================================================================
   Reveal panel (commit-reveal seed progress)
   ========================================================================== */

.reveal-panel {
  border: 1px dashed var(--accent-soft-strong);
  margin-bottom: 16px;
}

.reveal-panel .reveal-progress {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-bright);
}

/* ==========================================================================
   Winner banner
   ========================================================================== */

.winner-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), rgba(242, 193, 78, 0.1));
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
}

.winner-banner .winner-trophy {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 6px;
}

.winner-banner h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  color: var(--gold);
}

.winner-banner .winner-payout {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-bright);
  margin: 6px 0 14px;
}

.winner-banner .winner-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.winner-banner .winner-payout-status {
  color: var(--success);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 4px;
}

/* Confetti */
.confetti-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 14px;
  opacity: 0.9;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(0.4, 0.2, 0.6, 1);
  animation-fill-mode: forwards;
  border-radius: 2px;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) translateX(var(--drift, 0px)) rotate(540deg);
    opacity: 0.4;
  }
}

/* ==========================================================================
   Transaction log
   ========================================================================== */

.tx-log-panel {
  padding: 0;
  overflow: hidden;
}

.tx-log-panel summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tx-log-panel summary::-webkit-details-marker {
  display: none;
}

.tx-log-panel summary::after {
  content: "▾";
  color: var(--text-faint);
  transition: transform 0.15s ease;
}

.tx-log-panel[open] summary::after {
  transform: rotate(180deg);
}

.tx-log-panel summary .tx-log-hint {
  font-weight: 400;
  color: var(--text-faint);
  font-size: 0.72rem;
}

.tx-log-list {
  list-style: none;
  margin: 0;
  padding: 0 18px 16px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  flex-wrap: wrap;
}

.tx-item .tx-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-bright);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.tx-item .tx-id {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
  flex: 1 1 200px;
}

.tx-item .tx-mined {
  font-size: 0.66rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.tx-empty {
  color: var(--text-faint);
  font-size: 0.82rem;
  padding: 0 18px 16px;
}

/* ==========================================================================
   Toasts
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}

.toast {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.2s ease;
  font-size: 0.85rem;
}

.toast.toast-error {
  border-left-color: var(--danger);
}

.toast.toast-success {
  border-left-color: var(--success);
}

.toast-message {
  flex: 1;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-faint);
  padding: 0 2px;
  min-height: auto;
  font-size: 1rem;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text);
  background: transparent;
  border: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==========================================================================
   Misc utility
   ========================================================================== */

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hidden {
  display: none !important;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.copy-btn.copied {
  border-color: var(--success);
  color: var(--success);
}

.error-panel {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .app-header {
    padding: 12px 14px;
  }
  .app-root {
    padding: 14px 12px 48px;
  }
  .big-number {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
  .draw-btn-big {
    width: 100%;
    justify-content: center;
  }
  #draw-bar {
    gap: 12px;
  }
  .bingo-cell {
    font-size: 0.9rem;
  }
}

/* Safety banner — this build is a testnet demo, and anyone who runs it should
   see why it is unsafe before they touch it, not only if they read the README. */
.safety-banner {
  background: rgba(255, 176, 32, 0.12);
  border-bottom: 1px solid rgba(255, 176, 32, 0.45);
  color: var(--text, #e6efed);
  /* Sized to stay on a single line even on a narrow phone. */
  font-size: 0.8rem;
  line-height: 1.3;
  padding: 0.5rem 0.75rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 420px) {
  .safety-banner { font-size: 0.72rem; }
}
.safety-banner strong {
  color: #ffb020;
  margin-right: 0.35rem;
}

/* Faucet/server details live in the footer, small and muted, so they cannot be
   mistaken for the player's own balance in the header. */
.app-footer .status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin-top: 0.6rem;
  opacity: 0.55;
}
.app-footer .status-item { display: flex; gap: 0.4rem; align-items: baseline; }
.app-footer .status-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; }
.app-footer .status-value { font-family: ui-monospace, Consolas, monospace; font-size: 0.72rem; }
