/* Replay Shape — tema "mesa de sinuca": grafite, feltro verde, borda de madeira, verde-limão. */
:root {
  --bg: #0a0d0b;
  --bg-2: #111713;
  --panel: #151c17;
  --line: #26302a;
  --text: #f2f5f0;
  --muted: #9aa79c;
  --lime: #a3e635;
  --lime-2: #bef264;
  --lime-ink: #10200a;
  --amber: #f5b83d;
  --red: #f87171;
  --felt: #0f5132;
  --felt-2: #0a3a24;
  --felt-3: #072a1a;
  --wood: #6b4220;
  --wood-2: #4a2c14;
  --wood-3: #8b5a2b;
  --pocket: #050605;
  --radius: 26px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 50% -10%, #17221b 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
a { color: var(--lime); }
button { font: inherit; }
[hidden] { display: none !important; }

.demo-ribbon {
  width: 100%;
  max-width: 460px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: repeating-linear-gradient(-45deg, #3a2a05, #3a2a05 10px, #2c2004 10px, #2c2004 20px);
  border: 1px solid #6b4d0a;
  color: #fde68a;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.topbar { width: 100%; max-width: 460px; padding: 18px 4px 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-ball { width: 38px; height: 38px; filter: drop-shadow(0 2px 6px rgba(163, 230, 53, .35)); }
.brand-text { color: var(--lime); font-weight: 800; letter-spacing: .06em; font-size: 17px; line-height: 1.05; }

.app { width: 100%; max-width: 460px; flex: 1; }

/* ---- A "mesa": borda de madeira + feltro + caçapas ---------------------- */
.table {
  position: relative;
  padding: 12px;
  border-radius: calc(var(--radius) + 10px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.10), transparent 35%),
    repeating-linear-gradient(95deg, var(--wood) 0 7px, var(--wood-2) 7px 9px, var(--wood-3) 9px 12px, var(--wood) 12px 18px);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.06), inset 0 -6px 12px rgba(0,0,0,.35);
}
.table::before, .table::after { /* marcadores (diamantes) na madeira */
  content: "";
  position: absolute;
  top: 25%;
  width: 6px; height: 6px;
  background: #e9dcc0;
  transform: translateY(-50%) rotate(45deg);
  opacity: .7;
}
.table::before { left: 3px; }
.table::after { right: 3px; }
.felt {
  position: relative;
  min-height: 420px;
  padding: 30px 22px 26px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.07), transparent 60%),
    radial-gradient(140% 120% at 50% 50%, var(--felt) 0%, var(--felt-2) 70%, var(--felt-3) 100%);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.25), inset 0 10px 30px rgba(0,0,0,.35);
  overflow: hidden;
}
.felt > .pocket { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: var(--pocket);
  box-shadow: inset 0 3px 6px rgba(255,255,255,.08), 0 0 0 3px rgba(0,0,0,.25); }
.pocket.tl { top: -9px; left: -9px; } .pocket.tr { top: -9px; right: -9px; }
.pocket.bl { bottom: -9px; left: -9px; } .pocket.br { bottom: -9px; right: -9px; }
.pocket.ml { top: 50%; left: -15px; transform: translateY(-50%); }
.pocket.mr { top: 50%; right: -15px; transform: translateY(-50%); }

/* ---- Tipografia ------------------------------------------------------- */
.eyebrow { margin: 0 0 6px; color: var(--lime); font-weight: 700; letter-spacing: .12em; font-size: 12px; text-transform: uppercase; }
h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.1; letter-spacing: -.01em; }
h2 { margin: 0 0 4px; font-size: 22px; }
.sub { margin: 0; color: #c9d4cb; font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }

/* ---- Blocos ----------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.08); font-size: 13px; font-weight: 600;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--lime); box-shadow: 0 0 0 4px rgba(163,230,53,.18); animation: pulse 1.8s infinite; }
.dot.warn { background: var(--amber); }
.dot.off { background: var(--red); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(163,230,53,0); } }

.price-card {
  padding: 18px 18px 16px; border-radius: 18px;
  background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.07);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
}
.price-card .label { color: #c9d4cb; font-size: 15px; }
.price { color: var(--lime); font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.price.big { color: var(--text); font-size: 46px; text-align: center; display: block; }

/* ---- Botões (grandes, uma mão) --------------------------------------- */
.btn {
  appearance: none; border: 0; cursor: pointer; width: 100%; min-height: 64px; padding: 14px 18px;
  border-radius: 18px; font-weight: 800; font-size: 19px; letter-spacing: .06em; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
  transition: transform .08s ease, filter .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn-primary { background: linear-gradient(180deg, var(--lime-2), var(--lime)); color: var(--lime-ink);
  box-shadow: 0 10px 24px rgba(163,230,53,.25), inset 0 -3px 0 rgba(0,0,0,.15); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary[disabled] { background: #3b4a33; color: #8fa086; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: rgba(0,0,0,.30); color: var(--text); border: 1.5px solid rgba(255,255,255,.14);
  text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 17px; min-height: 56px; }
.btn-ghost:hover { border-color: rgba(255,255,255,.3); }
.btn-small { min-height: 44px; font-size: 15px; }
.btn-demo-ok { background: #14532d; color: #dcfce7; border: 1.5px dashed #4ade80; text-transform: none; letter-spacing: 0; font-size: 15px; min-height: 50px; }
.btn-demo-no { background: #3f1515; color: #fecaca; border: 1.5px dashed #f87171; text-transform: none; letter-spacing: 0; font-size: 15px; min-height: 50px; }
.cue { /* taco decorativo sob o botão principal */
  height: 6px; margin: -4px 18px 0; border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #f3e6c8 0 8%, #2b1a0c 8% 10%, #b07a3c 10% 70%, #2b1a0c 70% 100%); opacity: .9;
}
.link-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.link-row a, .link-row button.linklike { color: #d9f99d; text-decoration: underline; text-underline-offset: 3px;
  background: none; border: 0; padding: 6px 2px; cursor: pointer; font-size: 14px; }

/* ---- Pix ---------------------------------------------------------------- */
.qr-card { background: #fff; color: #111; border-radius: 20px; padding: 16px; display: grid; place-items: center; gap: 6px; }
.qr-card img { width: 100%; max-width: 230px; aspect-ratio: 1; image-rendering: pixelated; }
.qr-card .tag { font-size: 12px; font-weight: 700; color: #92400e; background: #fef3c7; padding: 3px 8px; border-radius: 6px; }
.copy-box { display: flex; gap: 8px; }
.copy-box input { flex: 1; min-width: 0; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; color: #cfd8d1; padding: 0 12px; font-size: 13px; }
.status-line { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 17px; }
.status-line.wait { color: var(--amber); }
.status-line.ok { color: var(--lime); }
.status-line.err { color: var(--red); }
.demo-box { border: 1.5px dashed #b45309; background: rgba(120, 53, 15, .25); border-radius: 16px; padding: 14px; }
.demo-box p { margin: 0 0 10px; color: #fde68a; font-size: 13px; }
.demo-box .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---- Processamento: bola rolando (indicador indeterminado, sem progresso falso) */
.rolling { position: relative; height: 54px; margin: 8px 0 2px; }
.rolling::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgba(255,255,255,.08); }
.cue-ball { display: inline-block; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 20%, #e6e6dc 45%, #b8b8ad 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.rolling .cue-ball { position: absolute; top: 12px; animation: roll 2.2s ease-in-out infinite alternate; }
@keyframes roll { from { left: 0; transform: rotate(0); } to { left: calc(100% - 30px); transform: rotate(540deg); } }
.spin { animation: spin 1s linear infinite; vertical-align: middle; margin-right: 10px; width: 20px; height: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 16px; }
.steps li .mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); display: grid; place-items: center; font-size: 13px; flex: none; }
.steps li.done { color: var(--text); }
.steps li.done .mark { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.steps li.now { color: var(--text); font-weight: 700; }
.steps li.now .mark { border-color: var(--lime); border-top-color: transparent; animation: spin 1s linear infinite; }

/* ---- Vídeo ---------------------------------------------------------------- */
.player { width: 100%; border-radius: 18px; background: #000; aspect-ratio: 16 / 9; display: block;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.ok-badge { display: flex; align-items: center; gap: 10px; color: var(--lime); font-size: 20px; font-weight: 700; }
.ok-badge svg { width: 30px; height: 30px; flex: none; }

/* ---- Listas, formulários, avisos ------------------------------------------ */
.spot-list { display: flex; flex-direction: column; gap: 12px; }
.spot-item { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: rgba(0,0,0,.30); border: 1px solid rgba(255,255,255,.08); }
.spot-item:hover { border-color: rgba(163,230,53,.5); }
.ball-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; color: #111;
  background: radial-gradient(circle at 50% 50%, #fff 0 34%, transparent 35%), radial-gradient(circle at 35% 30%, #fde047, #ca8a04); }
.ball-num.b2 { background: radial-gradient(circle at 50% 50%, #fff 0 34%, transparent 35%), radial-gradient(circle at 35% 30%, #60a5fa, #1d4ed8); }
.ball-num.b3 { background: radial-gradient(circle at 50% 50%, #fff 0 34%, transparent 35%), radial-gradient(circle at 35% 30%, #f87171, #b91c1c); }
.spot-item .grow { flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: #c9d4cb; }
.field input, .field textarea { background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; color: var(--text);
  padding: 14px; font-size: 17px; font-family: inherit; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--lime); border-color: transparent; }
.notice { padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08); font-size: 14px; color: #c9d4cb; }
.notice.err { border-color: rgba(248,113,113,.5); background: rgba(127,29,29,.25); color: #fecaca; }
.notice.ok { border-color: rgba(163,230,53,.4); color: #d9f99d; }
details.notice summary { cursor: pointer; font-weight: 600; color: var(--text); }
.code-pill { display: inline-block; padding: 4px 10px; border-radius: 8px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.1); }
.loading { display: flex; align-items: center; justify-content: center; min-height: 360px; color: #c9d4cb; }
.loading.short { min-height: 200px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #1f2a22; color: var(--text); padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.1); font-size: 15px; z-index: 10; max-width: calc(100% - 32px); }

.foot { width: 100%; max-width: 460px; display: flex; justify-content: space-between; padding: 22px 6px 26px; color: var(--muted); font-size: 13px; }
.noscript { color: var(--text); }

@media (min-width: 720px) {
  .felt { padding: 36px 30px 30px; }
  h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
