:root {
  --bg: #0b0b0b;
  --bg-2: #121212;
  --card: #161616;
  --card-2: #1d1d1d;
  --line: #2a2a2a;
  --line-2: #3a3a3a;
  --text: #f5f5f5;
  --text-2: #b5b5b5;
  --text-3: #8a8a8a;
  --gold: #e8c468;
  --gold-2: #f5d98c;
  --gold-dark: #3a2a00;
  --gold-soft: rgba(232, 196, 104, 0.12);
  --green: #1fa36b;
  --green-2: #23b878;
  --red: #e5534b;
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-title: 'Sora', var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.2; margin: 0; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--text-3); }
.gold { color: var(--gold); }
.red { color: var(--red); }

#fireworks { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* topbar */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(11, 11, 11, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-title); font-size: 17px; }
.brand b { color: var(--gold); font-weight: 700; }
.brand-ball { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--gold-dark); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.countdown { display: flex; align-items: center; gap: 6px; }
.cd-label { font-size: 12px; color: var(--text-3); margin-right: 4px; }
.cd-box { display: flex; flex-direction: column; align-items: center; min-width: 42px; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); }
.cd-box b { font-family: var(--font-title); color: var(--gold); font-size: 16px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd-box small { font-size: 10px; color: var(--text-3); }

/* hero */
.hero { padding: 56px 0 28px; text-align: center; }
.eyebrow { display: inline-block; margin: 0 0 16px; padding: 6px 14px; border: 1px solid rgba(232, 196, 104, 0.35); border-radius: 999px; color: var(--gold); font-size: 13px; background: var(--gold-soft); }
.hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 700; max-width: 820px; margin: 0 auto; letter-spacing: -0.02em; }
.lead { color: var(--text-2); font-size: clamp(16px, 2vw, 19px); max-width: 640px; margin: 18px auto 0; }
.last-result { margin: 28px auto 0; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.last-result:empty { display: none; }
.last-result .lr-title { font-size: 13px; color: var(--text-3); }
.last-result .lr-next { font-size: 14px; color: var(--text-2); }
.last-result .lr-next b { color: var(--gold); }

/* balls */
.balls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ball { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-title); font-weight: 600; font-size: 15px; background: radial-gradient(circle at 32% 28%, var(--gold-2), var(--gold) 55%, #b8923a); color: var(--gold-dark); box-shadow: inset 0 -3px 6px rgba(0,0,0,.25), 0 2px 8px rgba(232,196,104,.15); font-variant-numeric: tabular-nums; }
.ball.sm { width: 32px; height: 32px; font-size: 13px; }
.ball.fixed { outline: 2px solid #fff; outline-offset: 2px; }
.ball.hit { background: radial-gradient(circle at 32% 28%, #5fe0a5, var(--green) 60%); color: #032015; }
.ball.miss { background: var(--card-2); color: var(--text-3); box-shadow: none; }
.ball.pop { animation: pop .45s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(0) rotate(-120deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

/* tabs */
.tabs { display: flex; gap: 8px; justify-content: center; margin: 24px auto 20px; flex-wrap: wrap; }
.tab { padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-weight: 500; transition: .2s; }
.tab:hover { border-color: var(--gold); color: var(--text); }
.tab.active { background: var(--gold); color: var(--gold-dark); border-color: var(--gold); font-weight: 600; }

/* panels */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; margin-bottom: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.panel h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.num-badge { width: 28px; height: 28px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(232,196,104,.4); display: inline-grid; place-items: center; font-size: 14px; }
.sub { font-size: 15px; color: var(--text-2); font-weight: 600; margin: 24px 0 12px; }

/* generator */
.gen-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; margin-top: 18px; }
.gen-controls { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 14px; color: var(--text-2); font-weight: 500; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type=number], input[type=text], input[type=email], select {
  height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); outline: none; width: 100%;
}
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); }
.seg button { flex: 1 1 auto; border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-size: 14px; white-space: nowrap; }
.seg button.on { background: var(--card-2); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(232,196,104,.45); }
.seg.small button { padding: 6px 10px; font-size: 13px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); cursor: pointer; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--green); margin-top: 2px; flex: none; }

.volante { display: grid; gap: 6px; }
.volante.mega { grid-template-columns: repeat(10, 1fr); }
.volante.loto { grid-template-columns: repeat(5, 1fr); max-width: 300px; }
.vn { aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-2); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; transition: .15s; padding: 0; }
.vn:hover { border-color: var(--gold); color: var(--text); }
.vn.fix { background: var(--gold); color: var(--gold-dark); border-color: var(--gold); font-weight: 700; }
.vn.exc { background: rgba(229,83,75,.12); color: var(--red); border-color: rgba(229,83,75,.5); text-decoration: line-through; }
.link { align-self: flex-start; background: none; border: 0; color: var(--text-3); font-size: 13px; padding: 0; text-decoration: underline; }

.btn-primary { height: 54px; border: 0; border-radius: 12px; background: var(--green); color: #fff; font-weight: 600; font-size: 17px; font-family: var(--font-title); transition: .2s; box-shadow: 0 6px 24px rgba(31,163,107,.25); }
.btn-primary:hover { background: var(--green-2); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.99); }
.btn-primary.small { height: 44px; font-size: 15px; padding: 0 22px; box-shadow: none; }
.btn-ghost { height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 13px; }
.btn-ghost:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.btn-ghost:disabled { opacity: .4; cursor: default; }

.gen-output { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; min-height: 420px; }
.out-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.out-head h3 { font-size: 17px; }
.out-actions { display: flex; gap: 6px; }
.games { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.game-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; color: var(--text-3); }
.game-top b { color: var(--text-2); }
.game .balls { justify-content: flex-start; gap: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--card-2); color: var(--text-2); border: 1px solid var(--line); }
.tag.good { color: #7fe0b4; border-color: rgba(31,163,107,.4); background: rgba(31,163,107,.1); }
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--text-3); gap: 14px; }
.empty-balls { display: flex; gap: 8px; }
.empty-balls span { width: 34px; height: 34px; border-radius: 50%; border: 1.5px dashed var(--line-2); }
.cost { margin-top: 14px; font-size: 13px; color: var(--text-3); }
.cost:empty { display: none; }
.cost b { color: var(--gold); }

/* stats */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 16px; }
.stat-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat-card small { display: block; color: var(--text-3); font-size: 12.5px; }
.stat-card b { font-family: var(--font-title); font-size: 24px; color: var(--text); }
.stat-card b.gold { color: var(--gold); }

.heat { display: grid; gap: 5px; }
.heat.mega { grid-template-columns: repeat(10, 1fr); }
.heat.loto { grid-template-columns: repeat(5, 1fr); max-width: 420px; }
.hc { border-radius: 8px; padding: 8px 2px; text-align: center; font-variant-numeric: tabular-nums; border: 1px solid rgba(255,255,255,.04); }
.hc b { display: block; font-family: var(--font-title); font-size: 15px; }
.hc small { font-size: 11px; opacity: .85; }
.heat-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.heat-legend i { width: 140px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #1a1a1a, #5a4520, var(--gold)); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; font-size: 14px; }
.rank.pairs li { grid-template-columns: 80px 1fr auto; }
.rank .bar { height: 8px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.rank .bar i { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
.rank.cold .bar i, #rank-cold .bar i { background: #6aa5e8; }
.rank .val { color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.pair-balls { display: flex; gap: 4px; }

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 54px; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-row .bar { height: 10px; border-radius: 5px; background: var(--card-2); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: var(--green); border-radius: 5px; }
.bar-row span:last-child { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* table */
.table-wrap { overflow-x: auto; margin-top: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--text-3); font-weight: 500; font-size: 12.5px; padding: 10px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.money { color: var(--gold); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .balls { justify-content: flex-start; gap: 4px; flex-wrap: nowrap; }
.table .acc { color: var(--text-3); font-style: italic; }

/* conferidor */
.conf-row { display: flex; gap: 10px; margin-top: 14px; }
.conf-row input { flex: 1; }
.error { color: var(--red); font-size: 13px; min-height: 18px; margin: 8px 0 0; }
.conf-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 8px; }

/* teste grátis */
.free-note { margin: -6px 0 0; font-size: 13px; color: var(--text-2); background: var(--gold-soft); border: 1px solid rgba(232,196,104,.3); border-radius: 10px; padding: 10px 12px; }
.free-note a { color: var(--gold); }
input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
.paywall { border: 2px solid var(--gold); border-radius: 14px; padding: 18px; background: linear-gradient(160deg, rgba(232,196,104,.10), var(--card) 55%); }
.pw-badge { display: inline-block; font-size: 12px; font-weight: 600; color: var(--gold-dark); background: var(--gold); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.paywall h3 { font-size: 18px; margin-bottom: 10px; }
.paywall ul { margin: 0 0 16px; padding-left: 18px; color: var(--text-2); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.paywall s { color: var(--text-3); }
.pw-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; width: 100%; }
.locked { position: relative; overflow: hidden; }
.locked > *:not(.lock-overlay):not(.panel-head) { filter: blur(6px); pointer-events: none; user-select: none; }
.lock-overlay { position: absolute; inset: 70px 0 0; display: flex; justify-content: center; align-items: flex-start; padding-top: 60px; background: linear-gradient(180deg, rgba(22,22,22,.2), rgba(22,22,22,.75)); z-index: 2; }
.lock-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; background: var(--bg-2); border: 1px solid rgba(232,196,104,.45); border-radius: 16px; padding: 22px 26px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.lock-card b { font-family: var(--font-title); font-size: 16px; }
.lock-card a { display: inline-flex; align-items: center; text-decoration: none; }
.lock-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-dark); }

/* upsell */
.upsell { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-color: rgba(232,196,104,.45); background: linear-gradient(120deg, rgba(232,196,104,.08), var(--card) 60%); }
.upsell h2 { font-size: 22px; margin-bottom: 6px; }
.upsell p { margin: 0; max-width: 620px; }
.upsell-btn { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; flex: none; }
@media (max-width: 700px) { .upsell { flex-direction: column; align-items: stretch; text-align: center; } .upsell-btn { justify-content: center; } }

/* facts */
.facts h2 { margin-bottom: 18px; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.fact { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.fact h3 { font-size: 15px; color: var(--gold); margin-bottom: 8px; }
.fact p { margin: 0; color: var(--text-2); font-size: 14px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--text-3); font-size: 13px; margin-top: 24px; }
.footer p { margin: 0 0 10px; max-width: 860px; }
.footer b { color: var(--text-2); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--gold); color: var(--gold-dark); padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; opacity: 0; transition: .25s; z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading { color: var(--text-3); padding: 20px 0; }

@media (max-width: 860px) {
  .gen-grid, .two-col { grid-template-columns: 1fr; }
  .panel { padding: 20px 16px; border-radius: 16px; }
  .hero { padding-top: 36px; }
  .cd-label { display: none; }
  .topbar-inner { justify-content: center; }
}
@media (max-width: 480px) {
  .volante.mega, .heat.mega { grid-template-columns: repeat(6, 1fr); }
  .ball { width: 36px; height: 36px; font-size: 14px; }
  .cd-box { min-width: 36px; }
  .brand { font-size: 15px; }
  .brand > span:last-child { display: none; }
  .topbar-inner { justify-content: space-between; flex-wrap: nowrap; padding: 8px 0; }
}

@media print {
  body { background: #fff; color: #000; }
  .topbar, .hero, .tabs, .gen-controls, #estatisticas, #premios, #conferidor, .facts, .footer, .out-actions, #fireworks { display: none !important; }
  .panel, .gen-output, .game { border: 1px solid #999; background: #fff; }
  .gen-grid { display: block; }
  .ball { background: #fff !important; color: #000; border: 1px solid #000; box-shadow: none; }
  .tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ball.pop { animation: none; }
  html { scroll-behavior: auto; }
}
.paywall s, .paywall b.gold { white-space: nowrap; }

/* conta do cliente */
.conta { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.conta:empty { display: none; }
.conta-entrar { color: var(--gold); text-decoration: none; border: 1px solid rgba(232,196,104,.45); padding: 7px 12px; border-radius: 9px; white-space: nowrap; }
.conta-entrar:hover { background: var(--gold-soft); }
.conta-plano { color: #7fe0b4; background: rgba(31,163,107,.12); border: 1px solid rgba(31,163,107,.45); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.conta-sair { font-size: 13px; }
.pw-login { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--text-3); }
.pw-login a, .lock-login { color: var(--gold); }
.lock-login { font-size: 13px; }
@media (max-width: 480px) {
  .cd-sec { display: none; }
  .conta-entrar { padding: 6px 9px; font-size: 12px; }
  .conta-plano { font-size: 12px; padding: 4px 8px; }
}
