/*
 * Tokens e base do design system "Lume" (v3). Fonte: design-system/cassino-lanterna/MASTER.md.
 * Carregue SEMPRE primeiro; shell.css (casca) e as folhas de cada tela vêm depois.
 * Fontes (Outfit 600–900 e Inter 400–700) vêm do Google Fonts, no <head> de cada página.
 */
:root {
  color-scheme: dark;
  /* superfícies */
  --bg-0: #0b131c; --bg-1: #111d29; --bg-2: #192836; --bg-3: #22354a; --bg-4: #2c4259; --line: #2a3e52;
  /* texto */
  --ink: #eef3f8; --muted: #93a7ba; --subtle: #6b8196;
  /* ação e semântica */
  --lume: #ffc43d; --lume-hi: #ffd977; --lume-lo: #f0a81c; --lume-edge: #b97a0c; --on-lume: #1a1204;
  --win: #2ff58a; --win-lo: #13c56b; --win-edge: #0b7c43; --on-win: #04210f;
  --loss: #ff5a6e; --sel: #4c9bff; --vip: #a37bff; --live: #ff3b5c;
  /* tipografia */
  --f-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-display: 'Outfit', 'Inter', system-ui, sans-serif;
  /* forma e espaço */
  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  /* movimento */
  --d-instant: 80ms; --d-fast: 140ms; --d-base: 220ms; --d-slow: 360ms; --d-reveal: 520ms;
  --e-out: cubic-bezier(.22, 1, .36, 1); --e-in: cubic-bezier(.55, 0, 1, .45);
  --e-inout: cubic-bezier(.65, 0, .35, 1); --e-spring: cubic-bezier(.34, 1.56, .64, 1);
  /* layout */
  --side-w: 240px; --top-h: 64px; --bnav-h: 64px;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-padding-top: 80px; }
body { background: var(--bg-0); color: var(--ink); font: 500 14px/1.45 var(--f-ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
input, select { font: inherit; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--bg-2); padding: 8px 12px; border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { left: 12px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- botões ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-md); font-weight: 700; white-space: nowrap;
  transition: transform var(--d-instant) var(--e-out), filter var(--d-fast), box-shadow var(--d-fast) var(--e-out), background var(--d-fast); }
.btn-lume { background: linear-gradient(180deg, var(--lume-hi), var(--lume) 55%, var(--lume-lo)); color: var(--on-lume); box-shadow: 0 4px 0 var(--lume-edge), 0 8px 22px rgba(255, 196, 61, .22); }
.btn-lume:hover { filter: brightness(1.06); box-shadow: 0 4px 0 var(--lume-edge), 0 10px 30px rgba(255, 196, 61, .4); }
.btn-lume:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lume-edge), 0 4px 12px rgba(255, 196, 61, .25); }
.btn-win { background: linear-gradient(180deg, #7dffb9, var(--win) 50%, var(--win-lo)); color: var(--on-win); box-shadow: 0 4px 0 var(--win-edge), 0 8px 22px rgba(47, 245, 138, .25); }
.btn-win:hover { filter: brightness(1.05); }
.btn-win:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--win-edge); }
.btn-stop { background: var(--loss); color: #2a0008; box-shadow: 0 4px 0 #a3233a; }
.btn-2 { background: var(--bg-3); color: var(--ink); }
.btn-2:hover { background: var(--bg-4); }
.btn-2:active, .btn-ghost:active { transform: scale(.97); }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); }
.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; transform: none; }
.btn-lume::after, .btn-win::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
.btn-lume:hover::after, .btn-win:hover::after { transform: translateX(120%); transition: transform 700ms var(--e-out); }
.btn-bet { width: 100%; height: 52px; font-size: 16px; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--muted); transition: background var(--d-fast), color var(--d-fast); }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }

/* ---------- keyframes de biblioteca (MASTER §5.3) ---------- */
@keyframes flicker { 0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 196, 61, .55)); } 45% { filter: drop-shadow(0 0 16px rgba(255, 196, 61, .8)); } 55% { filter: drop-shadow(0 0 8px rgba(255, 196, 61, .45)); } }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 59, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes ember { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-10px); } }
@keyframes twinkle { 0%, 100% { transform: scale(.6) rotate(0); opacity: .6; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
@keyframes bnc { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(34px); } }
@keyframes dotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes balUp { 0% { color: var(--win); text-shadow: 0 0 14px rgba(47, 245, 138, .7); } 100% { color: var(--ink); text-shadow: none; } }
@keyframes shake { 0%, 100% { transform: translate(0); } 15% { transform: translate(-7px, 3px); } 30% { transform: translate(6px, -4px); } 45% { transform: translate(-5px, -2px); } 60% { transform: translate(4px, 3px); } 80% { transform: translate(-2px, 1px); } }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translateY(-620px) translateX(30px); opacity: 0; } }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bubble { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px); } }

/* artes com movimento ocioso (cards, banners, palco) */
.fl { animation: float 4.2s ease-in-out infinite; }
.fl2 { animation: float 5.1s ease-in-out -1.2s infinite; }
.emb circle { animation: ember 3.4s ease-in-out infinite; }
.emb circle:nth-child(2) { animation-delay: -1s; }
.emb circle:nth-child(3) { animation-delay: -2s; }
.emb circle:nth-child(4) { animation-delay: -.5s; }
.spark { transform-box: fill-box; transform-origin: center; animation: twinkle 1.4s ease-in-out infinite; }
.bnc { animation: bnc 1.6s cubic-bezier(.5, 0, .5, 1) infinite; }

/*
 * Movimento reduzido (MASTER §5.5): `prefers-reduced-motion: reduce` ou o botão "Movimento reduzido"
 * (html[data-motion=reduced]). Anima menos, mas cor, texto, contorno e valor permanecem.
 * html[data-motion=full] é a escolha explícita de quem pediu movimento mesmo com o sistema em "reduzir".
 */
[data-motion=reduced] *, [data-motion=reduced] *::before, [data-motion=reduced] *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
[data-motion=reduced] .fl, [data-motion=reduced] .fl2, [data-motion=reduced] .emb circle, [data-motion=reduced] .spark, [data-motion=reduced] .bnc,
[data-motion=reduced] .rays, [data-motion=reduced] .l-rings, [data-motion=reduced] .l-streaks, [data-motion=reduced] .embers, [data-motion=reduced] .live-dot, [data-motion=reduced] .brand svg { animation: none !important; }
[data-motion=reduced] .embers, [data-motion=reduced] .l-rings, [data-motion=reduced] .rays { display: none; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion=full]) *, :root:not([data-motion=full]) *::before, :root:not([data-motion=full]) *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  :root:not([data-motion=full]) .fl, :root:not([data-motion=full]) .fl2, :root:not([data-motion=full]) .emb circle, :root:not([data-motion=full]) .spark, :root:not([data-motion=full]) .bnc,
  :root:not([data-motion=full]) .rays, :root:not([data-motion=full]) .l-rings, :root:not([data-motion=full]) .l-streaks, :root:not([data-motion=full]) .embers, :root:not([data-motion=full]) .live-dot, :root:not([data-motion=full]) .brand svg { animation: none !important; }
  :root:not([data-motion=full]) .embers, :root:not([data-motion=full]) .l-rings, :root:not([data-motion=full]) .rays { display: none; }
}
