:root {
  --bg: #0a0712;
  --bg-soft: #120b20;
  --surface: rgba(26, 18, 44, 0.72);
  --surface-solid: #16102a;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f0ff;
  --muted: #a89bc4;
  --lime: #c6f24e;
  --pink: #ff4d8d;
  --cyan: #5ef3ff;
  --gold: #ffd75e;
  --violet: #8b5cff;
  --danger: #ff6b6b;
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-deep: 0 30px 80px rgba(0, 0, 0, 0.55);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sprite { position: absolute; }

/* ---------- fundo ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.backdrop::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(139, 92, 255, 0.28), transparent 70%),
    radial-gradient(900px 600px at 100% 110%, rgba(255, 77, 141, 0.14), transparent 70%),
    linear-gradient(180deg, #0a0712 0%, #0b0716 55%, #070510 100%);
}

.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.orb-a { width: 520px; height: 520px; left: -160px; top: -120px; background: rgba(139, 92, 255, 0.35); }
.orb-b { width: 460px; height: 460px; right: -140px; top: 180px; background: rgba(94, 243, 255, 0.16); }
.orb-c { width: 520px; height: 520px; left: 30%; bottom: -260px; background: rgba(198, 242, 78, 0.12); }

.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 25%, transparent 75%);
}

/* ---------- topo ---------- */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 24px;
  max-width: 1240px; margin: 0 auto;
  padding: 22px 24px 10px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { width: 44px; height: 44px; filter: drop-shadow(0 0 12px rgba(198, 242, 78, 0.35)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 20px; letter-spacing: 0.2px; }
.brand-text small { color: var(--muted); font-size: 11.5px; letter-spacing: 0.4px; text-transform: uppercase; }

.topbar-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-left: 6px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.3px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #d9d1ee;
  white-space: nowrap;
}
.pill-warn { border-color: rgba(255, 215, 94, 0.35); color: var(--gold); background: rgba(255, 215, 94, 0.08); }
.pill-18 { border-color: rgba(255, 77, 141, 0.4); color: #ff9dbb; background: rgba(255, 77, 141, 0.1); }

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.balance {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1;
  padding: 8px 14px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(198, 242, 78, 0.12), rgba(198, 242, 78, 0.04));
  border: 1px solid rgba(198, 242, 78, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.balance-label { font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase; color: #cfe48f; }
.balance-value { font-size: 21px; font-variant-numeric: tabular-nums; color: var(--lime); }

.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04); color: #cfc7e4;
  cursor: pointer; transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.09); color: #fff; transform: translateY(-1px); }
.icon-btn:focus-visible, .round-btn:focus-visible, .spin:focus-visible, .ghost-btn:focus-visible,
.mini-btn:focus-visible, .wide-btn:focus-visible, .auto-select select:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}
.icon-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg path:first-child:not(.wave):not(.mute) { fill: none; }
#soundBtn svg path:first-child { fill: currentColor; stroke: none; }
#soundBtn[aria-pressed="true"] { color: var(--lime); border-color: rgba(198, 242, 78, 0.4); }
#soundBtn .mute { opacity: 0; }
#soundBtn[aria-pressed="false"] .wave { opacity: 0.35; }
#soundBtn[aria-pressed="false"] .mute { opacity: 1; }

/* ---------- layout ---------- */
.layout {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 640px) 340px;
  gap: 22px; align-items: start; justify-content: center;
  max-width: 1100px; margin: 12px auto 0;
  padding: 0 24px;
}

/* ---------- máquina ---------- */
.machine {
  position: relative;
  padding: 16px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(40, 28, 66, 0.9), rgba(18, 12, 32, 0.95));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.marquee {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 6px 12px;
  font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted);
}
.marquee-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.marquee-center {
  flex: 1; justify-content: center;
  color: #0b0714; font-weight: 800;
  background: linear-gradient(90deg, var(--lime), #eaffb0 40%, var(--cyan));
  border-radius: 999px;
  max-width: max-content; margin: 0 auto;
  padding: 5px 14px;
  box-shadow: 0 0 24px rgba(198, 242, 78, 0.4);
  animation: bonusPulse 2.4s ease-in-out infinite;
}
.marquee-center[hidden] { display: none; }
.bonus-icon { font-size: 13px; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: blink 2s ease-in-out infinite;
}

.reels-frame {
  position: relative;
  padding: 12px;
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(139, 92, 255, 0.22), transparent 65%),
    #0b0716;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 2px 24px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.reels {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  position: relative; z-index: 1;
}

.reel {
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}

.cell {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background:
    radial-gradient(90% 90% at 30% 20%, rgba(255, 255, 255, 0.09), transparent 60%),
    linear-gradient(180deg, #221837, #150e24);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -14px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cell .sym {
  width: 76%; height: 76%;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cell[data-sym="WD"] { background: radial-gradient(90% 90% at 30% 20%, rgba(94, 243, 255, 0.22), transparent 65%), linear-gradient(180deg, #1d2440, #0f1428); }
.cell[data-sym="SC"] { background: radial-gradient(90% 90% at 30% 20%, rgba(255, 215, 94, 0.22), transparent 65%), linear-gradient(180deg, #2e2413, #1a1206); }

.cell.win {
  border-color: rgba(198, 242, 78, 0.9);
  box-shadow: 0 0 0 1px rgba(198, 242, 78, 0.55), 0 0 26px rgba(198, 242, 78, 0.45), inset 0 0 22px rgba(198, 242, 78, 0.16);
  animation: winPulse 0.9s ease-in-out infinite alternate;
}
.cell.win .sym { transform: scale(1.06); filter: drop-shadow(0 0 16px rgba(198, 242, 78, 0.55)); }

.reel.spinning .cell .sym { animation: blurSpin 0.16s linear infinite; }
.reel.spinning .cell { border-color: rgba(139, 92, 255, 0.35); }
.reel.stop-bounce { animation: reelStop 0.32s cubic-bezier(0.2, 1.6, 0.4, 1); }

.paylines {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  pointer-events: none; overflow: hidden;
}
.paylines polyline {
  fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 8px currentColor);
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: drawLine 0.45s ease forwards;
}

.win-pop {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center;
  pointer-events: none;
  font-weight: 900; letter-spacing: -0.5px;
  color: #fff;
  text-shadow: 0 0 24px rgba(198, 242, 78, 0.9), 0 4px 30px rgba(0, 0, 0, 0.8);
  opacity: 0;
  font-size: clamp(28px, 6vw, 56px);
  transform: scale(0.8);
}
.win-pop.show { animation: winPop 1.5s cubic-bezier(0.2, 0.9, 0.2, 1) forwards; }
.win-pop.big { font-size: clamp(36px, 8vw, 76px); color: var(--gold); text-shadow: 0 0 30px rgba(255, 215, 94, 0.9), 0 6px 30px #000; }

.frame-glow {
  position: absolute; inset: -1px; border-radius: 23px; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(139, 92, 255, 0.35), 0 0 40px rgba(139, 92, 255, 0.18);
  opacity: 0.7;
}

.readout {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.readout-item { display: flex; flex-direction: column; gap: 2px; }
.readout-item strong { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.readout-status { margin-left: auto; font-style: italic; }

.controls {
  display: flex; align-items: center; gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.bet-control {
  display: flex; align-items: center; gap: 8px;
  padding: 7px; border-radius: 16px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
}
.round-btn {
  width: 38px; height: 38px; border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text); font-size: 20px; line-height: 1;
  cursor: pointer; transition: background 0.15s ease, transform 0.1s ease;
}
.round-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.round-btn:active:not(:disabled) { transform: scale(0.94); }
.round-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.bet-value { display: flex; flex-direction: column; align-items: center; min-width: 78px; }
.bet-value strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.bet-value small { font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }

.spin {
  position: relative;
  width: 104px; height: 104px; border-radius: 50%;
  border: 0; cursor: pointer;
  display: grid; place-items: center; gap: 1px;
  background:
    radial-gradient(60% 60% at 50% 35%, #f3ffbf, var(--lime) 55%, #7fae12 100%);
  color: #10160a;
  font-weight: 900; letter-spacing: 0.4px;
  box-shadow: 0 16px 40px rgba(198, 242, 78, 0.32), inset 0 3px 10px rgba(255, 255, 255, 0.55), inset 0 -8px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  margin-left: auto;
}
.spin:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 20px 50px rgba(198, 242, 78, 0.45), inset 0 3px 10px rgba(255, 255, 255, 0.6); }
.spin:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
.spin:disabled { filter: saturate(0.4) brightness(0.8); cursor: progress; }
.spin-label { font-size: 17px; }
.spin-key { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; opacity: 0.55; }
.spin-ring {
  position: absolute; inset: -7px; border-radius: 50%;
  border: 1px dashed rgba(198, 242, 78, 0.45);
  animation: slowSpin 14s linear infinite;
}
.spin[data-free="true"] {
  background: radial-gradient(60% 60% at 50% 35%, #d8f7ff, var(--cyan) 55%, #1a7fa0 100%);
  box-shadow: 0 16px 40px rgba(94, 243, 255, 0.35), inset 0 3px 10px rgba(255, 255, 255, 0.5);
}

.aux-controls { display: flex; align-items: center; gap: 8px; }
.ghost-btn {
  padding: 9px 13px; border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: #ddd5f0; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ghost-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.ghost-btn[aria-pressed="true"] { color: var(--lime); border-color: rgba(198, 242, 78, 0.5); background: rgba(198, 242, 78, 0.1); }

.auto-select { position: relative; }
.auto-select select {
  appearance: none;
  padding: 9px 30px 9px 13px; border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a89bc4'/%3E%3C/svg%3E")
    no-repeat right 11px center;
  color: #ddd5f0; font-size: 12px; font-weight: 600; cursor: pointer;
}
.auto-select select option { background: #16102a; }

/* ---------- lateral ---------- */
.side { display: flex; flex-direction: column; gap: 16px; }

.card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h2 { margin: 0; font-size: 13px; letter-spacing: 1.1px; text-transform: uppercase; color: #cfc4ea; }
.chip {
  font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted);
}
.chip-live { color: var(--lime); border-color: rgba(198, 242, 78, 0.35); background: rgba(198, 242, 78, 0.08); }
.chip-free { color: var(--cyan); border-color: rgba(94, 243, 255, 0.4); background: rgba(94, 243, 255, 0.1); }

.round-empty { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.round-detail { display: flex; flex-direction: column; gap: 12px; }
.round-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.round-amounts div, .round-meta div {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 11px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line);
}
.round-amounts span, .round-meta span { font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.round-amounts strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.round-meta { display: flex; flex-direction: column; gap: 6px; }
.round-meta code { font-family: var(--mono); font-size: 11px; color: #d8cff0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.line-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.line-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; padding: 6px 10px; border-radius: 8px;
  background: rgba(198, 242, 78, 0.07);
  border: 1px solid rgba(198, 242, 78, 0.18);
}
.line-list li .line-name { color: #e8ffb6; }
.line-list li .line-pay { font-variant-numeric: tabular-nums; color: var(--lime); font-weight: 700; }
.line-list li.scatter {
  background: rgba(255, 215, 94, 0.08); border-color: rgba(255, 215, 94, 0.25); color: var(--gold);
}

.card-note { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.card-note.small { font-size: 10.5px; margin-top: 8px; }

.hash-row { display: flex; flex-direction: column; gap: 3px; margin: 10px 0; padding: 9px 11px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); }
.hash-row span { font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.hash-row code { font-family: var(--mono); font-size: 10.5px; color: var(--cyan); overflow: hidden; text-overflow: ellipsis; }

.seed-edit { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-bottom: 10px; }
.seed-edit span { grid-column: 1 / -1; font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.seed-edit input {
  min-width: 0; padding: 9px 10px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.35);
  color: var(--text); font-family: var(--mono); font-size: 11px;
}
.mini-btn {
  padding: 8px 12px; border-radius: 9px; border: 1px solid rgba(94, 243, 255, 0.35);
  background: rgba(94, 243, 255, 0.1); color: var(--cyan); font-size: 11px; font-weight: 700; cursor: pointer;
}
.mini-btn:hover { background: rgba(94, 243, 255, 0.18); }

.wide-btn {
  width: 100%; padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.05);
  color: #e6def8; font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.wide-btn:hover { background: rgba(255, 255, 255, 0.1); }
.wide-btn.danger { border-color: rgba(255, 107, 107, 0.3); color: #ffb3b3; }
.wide-btn.danger:hover { background: rgba(255, 107, 107, 0.12); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.stats-grid div { padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.24); border: 1px solid var(--line); }
.stats-grid dt { font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.stats-grid dd { margin: 2px 0 0; font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- rodapé ---------- */
.footer {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 26px auto 30px; padding: 0 24px;
  color: #7d7196; font-size: 11px; line-height: 1.6;
}
.footer p { margin: 0 0 6px; max-width: 900px; }
.footer-tech { font-family: var(--mono); font-size: 10px; color: #5f5677; letter-spacing: 0.2px; }

/* ---------- toasts ---------- */
.toasts {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: min(92vw, 460px);
}
.toast {
  padding: 11px 16px; border-radius: 12px;
  background: rgba(28, 20, 46, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  font-size: 12.5px; color: #efe8ff;
  animation: toastIn 0.25s ease, toastOut 0.3s ease 3.4s forwards;
}
.toast.error { border-color: rgba(255, 107, 107, 0.5); color: #ffc9c9; }
.toast.success { border-color: rgba(198, 242, 78, 0.45); color: #e8ffb6; }

/* ---------- modais ---------- */
.modal {
  border: 0; padding: 0; background: transparent;
  color: var(--text);
  width: min(92vw, 720px);
  max-height: 88vh;
  margin: auto;
}
.modal::backdrop { background: rgba(5, 3, 10, 0.72); backdrop-filter: blur(6px); }
.modal-inner {
  display: flex; flex-direction: column;
  max-height: 88vh;
  border-radius: 20px;
  background: linear-gradient(180deg, #1a1230, #100a1e);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.modal-head h2 { margin: 0; font-size: 15px; letter-spacing: 0.6px; text-transform: uppercase; }
.modal-close { width: 34px; height: 34px; }
.modal-body { padding: 18px; overflow-y: auto; font-size: 13px; line-height: 1.55; }

.modal-body h3 {
  margin: 20px 0 8px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
}
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin: 0 0 10px; color: #cfc6e6; }
.modal-body code { font-family: var(--mono); font-size: 11px; color: var(--cyan); }

.paytable-grid { display: flex; flex-direction: column; gap: 6px; }
.paytable-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line);
}
.paytable-row .sym { width: 38px; height: 38px; }
.paytable-row .name { font-size: 12.5px; }
.paytable-row .name small { display: block; color: var(--muted); font-size: 10.5px; }
.paytable-row .pays { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pay-chip {
  font-size: 11px; font-variant-numeric: tabular-nums;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(198, 242, 78, 0.1); border: 1px solid rgba(198, 242, 78, 0.25); color: #e8ffb6;
}
.pay-chip.muted { background: rgba(255, 255, 255, 0.05); border-color: var(--line); color: var(--muted); }

.line-grids { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.line-grid {
  padding: 10px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line);
  text-align: center;
}
.line-grid svg { width: 100%; height: auto; }
.line-grid span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; }

.rules-list { margin: 0; padding-left: 18px; color: #cfc6e6; }
.rules-list li { margin-bottom: 6px; }

.fair-block { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.fair-block .kv {
  display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 9px; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line);
}
.fair-block .kv span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.fair-block .kv code { word-break: break-all; }

.verify-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.verify-form label { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.verify-form input {
  padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.35); color: var(--text); font-family: var(--mono); font-size: 11.5px;
}
.verify-form .wide { grid-column: 1 / -1; }
.verify-result {
  margin-top: 12px; padding: 12px; border-radius: 10px;
  border: 1px solid rgba(198, 242, 78, 0.3); background: rgba(198, 242, 78, 0.06);
}
.verify-result .grid-mini { margin: 8px auto; }
.verify-result .kv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 12px; color: #d9f7a8; }

.seed-list { display: flex; flex-direction: column; gap: 6px; }
.seed-item {
  display: grid; grid-template-columns: 1fr auto; gap: 6px;
  padding: 8px 10px; border-radius: 9px; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; color: #c9c0e2;
}
.seed-item button { font-size: 10px; }

.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-row {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  padding: 9px 10px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line);
}
.history-row .grid-mini { width: 64px; }
.history-row .meta { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.history-row .meta strong { font-size: 12px; color: var(--text); font-weight: 600; }
.history-row .amount { text-align: right; font-variant-numeric: tabular-nums; }
.history-row .amount strong { display: block; font-size: 14px; }
.history-row .amount small { font-size: 10px; color: var(--muted); }
.history-row.win { border-color: rgba(198, 242, 78, 0.3); }
.history-row.bonus { border-color: rgba(255, 215, 94, 0.4); background: rgba(255, 215, 94, 0.06); }

.grid-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid-mini .gm {
  aspect-ratio: 1; border-radius: 4px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.05);
}
.grid-mini .gm svg { width: 82%; height: 82%; }

/* ---------- celebração ---------- */
.celebration {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(139, 92, 255, 0.35), rgba(5, 3, 10, 0.9) 60%);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease;
}
.celebration[hidden] { display: none; }
.celebration-inner {
  text-align: center; padding: 34px 40px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(40, 28, 66, 0.95), rgba(16, 10, 30, 0.98));
  border: 1px solid rgba(198, 242, 78, 0.35);
  box-shadow: 0 0 80px rgba(198, 242, 78, 0.25), 0 40px 120px rgba(0, 0, 0, 0.7);
  animation: popIn 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.celebration-kicker {
  margin: 0 0 6px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--lime);
}
.celebration-title {
  margin: 0; font-size: clamp(30px, 5vw, 46px); font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.celebration-sub { margin: 8px 0 20px; color: #cfc6e6; font-size: 13px; }

/* ---------- animações ---------- */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes bonusPulse { 0%, 100% { box-shadow: 0 0 18px rgba(198, 242, 78, 0.3); } 50% { box-shadow: 0 0 34px rgba(198, 242, 78, 0.55); } }
@keyframes slowSpin { to { transform: rotate(360deg); } }
@keyframes blurSpin {
  0% { transform: translateY(-4%) scale(0.94); opacity: 0.55; filter: blur(1px); }
  50% { transform: translateY(4%) scale(1); opacity: 0.9; filter: blur(2px); }
  100% { transform: translateY(-4%) scale(0.94); opacity: 0.55; filter: blur(1px); }
}
@keyframes reelStop {
  0% { transform: translateY(-8px); }
  60% { transform: translateY(3px); }
  100% { transform: translateY(0); }
}
@keyframes winPulse {
  from { box-shadow: 0 0 0 1px rgba(198, 242, 78, 0.4), 0 0 18px rgba(198, 242, 78, 0.3); }
  to { box-shadow: 0 0 0 2px rgba(198, 242, 78, 0.8), 0 0 34px rgba(198, 242, 78, 0.6); }
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes winPop {
  0% { opacity: 0; transform: scale(0.7); }
  22% { opacity: 1; transform: scale(1.06); }
  40% { transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(1) translateY(-14px); }
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- responsivo ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 640px); }
  .side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 12px; padding: 16px 16px 8px; }
  .topbar-meta { order: 3; width: 100%; }
  .topbar-actions { margin-left: auto; }
  .layout { padding: 0 16px; gap: 16px; }
  .machine { padding: 12px; border-radius: 20px; }
  .reels-frame { padding: 9px; border-radius: 18px; }
  .paylines { inset: 0; }
  .reels { gap: 7px; }
  .reel { gap: 7px; }
  .cell { border-radius: 11px; }
  .controls { gap: 10px; justify-content: space-between; }
  .spin { width: 86px; height: 86px; margin-left: 0; }
  .spin-label { font-size: 14px; }
  .spin-key { display: none; }
  .readout { gap: 14px; font-size: 11px; }
  .readout-status { width: 100%; margin-left: 0; }
  .bet-control { padding: 5px; }
  .round-btn { width: 34px; height: 34px; }
  .side { grid-template-columns: 1fr; }
  .footer { padding: 0 16px; }
  .modal { width: 100vw; max-height: 92vh; }
  .modal-inner { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .modal-body { padding: 14px; }
  .verify-form { grid-template-columns: 1fr; }
  .history-row { grid-template-columns: 52px 1fr auto; }
  .history-row .grid-mini { width: 52px; }
}

@media (max-width: 420px) {
  .topbar-meta .pill:nth-child(3) { display: none; }
  .balance-value { font-size: 18px; }
  .aux-controls { width: 100%; justify-content: space-between; }
  .auto-select { flex: 1; }
  .auto-select select { width: 100%; }
}


/* ---------- regras ---------- */
.rules-lead {
  margin: 0 0 14px; padding: 10px 12px; border-radius: 10px;
  background: rgba(198, 242, 78, 0.06); border: 1px solid rgba(198, 242, 78, 0.22);
  color: #e2f5b8; font-size: 12.5px; line-height: 1.55;
}
.rule-symbols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.rule-symbol {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 10px; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line);
}
.rule-symbol .sym { width: 34px; height: 34px; flex: 0 0 auto; }
.rule-symbol strong { display: block; font-size: 12.5px; }
.rule-symbol span { font-size: 10.5px; color: var(--muted); line-height: 1.4; }
.footer-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.link-btn {
  background: none; border: 0; padding: 2px 0; cursor: pointer;
  color: #b9aede; font-size: 11px; text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--lime); }
.link-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

