:root {
  --bg: #060608;
  --text: #f2f2f7;
  --muted: #9a9ab0;
  --orange: #f7931a;
  --blue: #2f7bff;
  --line: #24243a;
  --card: #14141f;
  --gold: #ffd24a;
  --accent: #18e0c8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; user-select: none;
}

/* ===================== ARENA SPLIT ===================== */
.arena { position: fixed; inset: 0; }
.side {
  position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden;
  transition: clip-path .45s cubic-bezier(.6,.2,.2,1), filter .3s;
}
.side--orange { background: radial-gradient(120% 100% at 0% 50%, rgba(247,147,26,.35), transparent 60%), linear-gradient(135deg, #2a1700, #0c0900); clip-path: polygon(0 0, 54% 0, 46% 100%, 0 100%); justify-content: flex-start; }
.side--blue { background: radial-gradient(120% 100% at 100% 50%, rgba(47,123,255,.35), transparent 60%), linear-gradient(225deg, #001834, #04060c); clip-path: polygon(54% 0, 100% 0, 100% 100%, 46% 100%); justify-content: flex-end; }
.arena.lean-orange .side--orange { clip-path: polygon(0 0, 70% 0, 62% 100%, 0 100%); }
.arena.lean-orange .side--blue   { clip-path: polygon(70% 0, 100% 0, 100% 100%, 62% 100%); filter: brightness(.7); }
.arena.lean-blue   .side--blue   { clip-path: polygon(30% 0, 100% 0, 100% 100%, 38% 100%); }
.arena.lean-blue   .side--orange { clip-path: polygon(0 0, 30% 0, 38% 100%, 0 100%); filter: brightness(.7); }

.side__content { padding: 0 6vw; max-width: 42%; display: flex; flex-direction: column; gap: 13px; }
.side--blue .side__content { align-items: flex-end; text-align: right; }
.side__tag { font-size: .78rem; font-weight: 700; letter-spacing: .16em; padding: 6px 14px; border-radius: 999px; width: fit-content; }
.side--orange .side__tag { color: var(--orange); border: 1px solid rgba(247,147,26,.4); background: rgba(247,147,26,.08); }
.side--blue   .side__tag { color: #6ea8ff; border: 1px solid rgba(47,123,255,.4); background: rgba(47,123,255,.08); }
.side__pot { font-size: clamp(2.3rem, 7vw, 5rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px; text-shadow: 0 4px 40px rgba(0,0,0,.6); }
.side__cur { font-size: .55em; opacity: .85; }
.side--orange .side__pot { color: #ffd089; }
.side--blue   .side__pot { color: #aecbff; }
.side__meta { display: flex; gap: 20px; color: var(--muted); font-size: .92rem; flex-wrap: wrap; }
.side__meta b { color: var(--text); }
.side--orange .side__mult b { color: var(--orange); }
.side--blue   .side__mult b { color: #6ea8ff; }
.side__btn { margin-top: 8px; font: inherit; font-weight: 800; font-size: 1.05rem; border: none; border-radius: 14px; padding: 16px 28px; cursor: pointer; color: #000; transition: transform .15s, box-shadow .25s, filter .2s; width: fit-content; }
.side__btn:active { transform: scale(.96); }
.side--orange .side__btn { background: var(--orange); }
.side--orange .side__btn:hover { box-shadow: 0 12px 40px rgba(247,147,26,.5); filter: brightness(1.08); }
.side--blue   .side__btn { background: var(--blue); color: #fff; }
.side--blue   .side__btn:hover { box-shadow: 0 12px 40px rgba(47,123,255,.55); filter: brightness(1.1); }

/* ===================== CENTRO ===================== */
.center { position: fixed; inset: 0; z-index: 10; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.center > * { pointer-events: auto; }
.jackpot { margin-top: 4.5vh; text-align: center; background: rgba(10,9,4,.78); backdrop-filter: blur(14px); border: 1px solid rgba(255,210,74,.4); border-radius: 18px; padding: 14px 34px; box-shadow: 0 0 50px rgba(255,210,74,.15); }
.jackpot__label { display: block; font-size: .7rem; letter-spacing: .2em; color: var(--gold); margin-bottom: 4px; }
.jackpot__val { font-size: clamp(2rem,4.5vw,3.2rem); font-weight: 900; font-variant-numeric: tabular-nums; color: var(--gold); text-shadow: 0 0 30px rgba(255,210,74,.4); }
.jackpot__val .side__cur { color: var(--gold); }
.jackpot__sub { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.jackpot__sub b { color: var(--text); }
.center__row { margin-top: 12px; display: flex; gap: 12px; }
.chip { background: rgba(10,10,16,.72); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 13px; padding: 9px 20px; text-align: center; min-width: 140px; }
.chip__label { display: block; font-size: .62rem; letter-spacing: .2em; color: var(--muted); }
.chip__val { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.chip__val .side__cur { color: var(--orange); }
.timer.is-urgent .chip__val { color: #ff5b5b; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .4; } }
.vs { position: absolute; top: 52%; left: 50%; transform: translate(-50%,-50%) rotate(-8deg); font-size: clamp(1.8rem,5vw,3.6rem); font-weight: 900; color: #fff; text-shadow: 0 0 30px rgba(0,0,0,.9); background: rgba(6,6,8,.5); border: 2px solid rgba(255,255,255,.18); width: clamp(70px,10vw,118px); height: clamp(70px,10vw,118px); border-radius: 50%; display: grid; place-items: center; }

/* ===================== HUD ===================== */
.hud { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; pointer-events: none; }
.hud__left, .hud__right { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.brand__logo { display: grid; place-items: center; width: 32px; height: 32px; background: #fff; color: #000; border-radius: 9px; }
.roompill { display: flex; align-items: center; gap: 8px; font: inherit; font-size: .88rem; font-weight: 600; background: rgba(20,20,31,.7); backdrop-filter: blur(10px); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: border-color .2s; }
.roompill:hover { border-color: var(--accent); }
.roompill__dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 8px #2ecc71; }
.roompill__chev { color: var(--muted); }
.curswitch { display: flex; gap: 3px; background: rgba(20,20,31,.7); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.curswitch button { font: inherit; font-size: .82rem; font-weight: 700; color: var(--muted); background: transparent; border: none; border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: background .2s, color .2s; }
.curswitch button:hover { color: var(--text); }
.curswitch button.is-active[data-cur="usdt"] { background: #2775ca; color: #fff; }
.curswitch button.is-active[data-cur="btc"] { background: var(--btc); color: #000; }
.iconbtn { width: 40px; height: 40px; border-radius: 10px; background: rgba(20,20,31,.7); backdrop-filter: blur(10px); border: 1px solid var(--line); color: var(--text); font-weight: 700; cursor: pointer; }
.iconbtn:hover { border-color: #fff; }

/* ===================== TICKER ===================== */
.ticker { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; height: 38px; background: rgba(6,6,8,.85); border-top: 1px solid var(--line); overflow: hidden; }
.ticker__track { display: flex; gap: 30px; white-space: nowrap; padding: 10px 0; animation: scroll 34s linear infinite; will-change: transform; }
.ticker__track span { color: var(--muted); font-size: .84rem; }
.ticker__track b.o { color: var(--orange); } .ticker__track b.b { color: #6ea8ff; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ===================== MODAIS GENÉRICOS ===================== */
.modal, .result, .lobby { position: fixed; inset: 0; z-index: 50; background: rgba(4,4,6,.78); backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.modal, .result { display: grid; place-items: center; padding: 18px; }
.modal.is-open, .result.is-open, .lobby.is-open { opacity: 1; visibility: visible; }
.modal__box, .result__box { position: relative; width: min(460px, 95vw); max-height: 92vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 30px; transform: translateY(10px) scale(.98); transition: transform .25s; }
.modal.is-open .modal__box, .result.is-open .result__box { transform: none; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 9px; background: transparent; border: 1px solid var(--line); color: var(--muted); cursor: pointer; z-index: 2; }
.modal__close:hover { color: #fff; border-color: #fff; }
.modal__tag { font-size: .76rem; font-weight: 700; letter-spacing: .12em; color: var(--orange); }
.modal__box.is-blue .modal__tag { color: #6ea8ff; }
.modal__title { font-size: 1.4rem; font-weight: 800; margin: 5px 0 18px; }

.field { margin-bottom: 18px; }
.field > label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 9px; font-weight: 600; }
.field__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.field__head label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.quickpick { font: inherit; font-size: .8rem; font-weight: 700; background: #0c0c14; border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 6px 12px; cursor: pointer; }
.quickpick:hover { border-color: var(--gold); color: var(--gold); }
.field__count { font-size: .82rem; color: var(--muted); margin-top: 8px; } .field__count b { color: var(--text); }
.addline { width: 100%; margin-top: 10px; font: inherit; font-weight: 700; font-size: .92rem; background: rgba(24,224,200,.1); border: 1px dashed var(--accent); color: var(--accent); border-radius: 11px; padding: 11px; cursor: pointer; transition: filter .2s, opacity .2s; }
.addline:hover:not(:disabled) { filter: brightness(1.15); }
.addline:disabled { opacity: .4; cursor: not-allowed; border-style: solid; border-color: var(--line); color: var(--muted); background: transparent; }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: flex; align-items: center; gap: 10px; background: #0c0c14; border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; }
.line__nums { display: flex; gap: 6px; flex: 1; }
.line__n { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: .95rem; background: radial-gradient(circle at 35% 28%, #2c2c40, #0b0b14); border: 1px solid var(--line); }

/* bolinhas numeradas (montar combinação) */
.slots { display: flex; justify-content: center; gap: 14px; margin-bottom: 14px; }
.slot { width: 62px; height: 62px; display: grid; place-items: center; font-size: 1.9rem; font-weight: 800; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #2c2c40, #0b0b14); border: 2px solid var(--line); cursor: pointer; transition: border-color .15s, transform .12s, box-shadow .15s; }
.slot:hover { border-color: var(--muted); }
.slot.empty { color: #3a3a4d; }
.slot.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(24,224,200,.18); transform: translateY(-2px); }
.palette { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-bottom: 12px; }
.palette button { aspect-ratio: 1; font-size: 1.05rem; font-weight: 800; color: var(--text); background: radial-gradient(circle at 35% 28%, #242434, #0a0a12); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; padding: 0; display: grid; place-items: center; transition: transform .1s, border-color .15s; }
.palette button:hover { border-color: var(--accent); transform: scale(1.1); }
.line__cost { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.line__rm { width: 26px; height: 26px; border-radius: 7px; background: transparent; border: 1px solid var(--line); color: var(--muted); cursor: pointer; font-size: .8rem; }
.line__rm:hover { color: #ff5b5b; border-color: #ff5b5b; }
.numgrid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.numgrid button { aspect-ratio: 1; font: inherit; font-size: .82rem; font-weight: 700; background: #0c0c14; border: 1px solid var(--line); color: var(--text); border-radius: 8px; cursor: pointer; transition: transform .12s, background .15s, border-color .15s; display: grid; place-items: center; padding: 0; }
.numgrid button:hover { border-color: var(--muted); }
.numgrid button.is-sel { transform: scale(1.06); }
.modal__box .numgrid button.is-sel { background: var(--orange); border-color: var(--orange); color: #000; }
.modal__box.is-blue .numgrid button.is-sel { background: var(--blue); border-color: var(--blue); color: #fff; }
.numgrid button:disabled:not(.is-sel) { opacity: .35; cursor: not-allowed; }
.amounts { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.amounts button { font: inherit; font-weight: 700; padding: 13px 0; border-radius: 11px; background: #0c0c14; border: 1px solid var(--line); color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; }
.amounts button:hover { border-color: var(--muted); }
.amounts button.is-active { border-color: var(--orange); background: rgba(247,147,26,.12); color: var(--orange); }
.modal__box.is-blue .amounts button.is-active { border-color: var(--blue); background: rgba(47,123,255,.14); color: #6ea8ff; }
.payout { display: flex; flex-direction: column; gap: 10px; background: #0c0c14; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 20px; }
.payout > div { display: flex; justify-content: space-between; align-items: center; }
.payout b { font-variant-numeric: tabular-nums; }
.payout__jack { color: var(--gold) !important; }
.payout__tiers { font-size: .82rem; justify-content: flex-start !important; }
.muted { color: var(--muted); }
.modal__confirm { width: 100%; font: inherit; font-weight: 800; font-size: 1.05rem; border: none; border-radius: 13px; padding: 15px; cursor: pointer; background: var(--orange); color: #000; transition: filter .2s, transform .15s; }
.modal__box.is-blue .modal__confirm { background: var(--blue); color: #fff; }
.modal__confirm:hover { filter: brightness(1.08); }
.modal__confirm:active { transform: scale(.98); }
.modal__confirm:disabled { background: #2a2a38; color: var(--muted); cursor: not-allowed; filter: none; }
.modal__fine { margin-top: 14px; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.how { padding-left: 18px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; } .how li { line-height: 1.5; } .how b { color: var(--text); }
.odds { width: 100%; border-collapse: collapse; font-size: .86rem; }
.odds th, .odds td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.odds th { color: var(--muted); font-weight: 600; font-size: .76rem; }
.odds td:first-child { font-weight: 600; }

/* ===================== RESULTADO ===================== */
.result__box { text-align: center; }
.result__label { font-size: .78rem; letter-spacing: .25em; color: var(--muted); }
.draw { display: flex; justify-content: center; gap: 14px; margin: 22px 0; }
.rwin { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; background: radial-gradient(circle at 35% 28%, #30304a, #07070d); border: 3px solid var(--line); box-shadow: inset 0 -6px 14px rgba(0,0,0,.5); }
.rwin.spinning { animation: spinpulse .3s infinite; color: var(--muted); }
@keyframes spinpulse { 0%,100%{ transform: translateY(-2px) scale(1.02);} 50%{ transform: translateY(2px) scale(.98);} }
.rwin.locked { border-color: #4a4a66; transition: transform .2s; }
.rwin.hit { border-color: var(--gold); background: radial-gradient(circle at 35% 28%, #6a5410, #1a1405); color: var(--gold); box-shadow: 0 0 22px rgba(255,210,74,.6), inset 0 -6px 14px rgba(0,0,0,.4); }
.result__side { font-size: 2.4rem; font-weight: 900; margin: 6px 0; }
.result__side.win-orange { color: var(--orange); text-shadow: 0 0 40px rgba(247,147,26,.6); }
.result__side.win-blue { color: #6ea8ff; text-shadow: 0 0 40px rgba(47,123,255,.6); }
.result__msg { color: var(--text); margin-bottom: 22px; line-height: 1.5; }
.result__msg .big { display: block; font-size: 1.6rem; font-weight: 800; margin-top: 6px; }
.result__msg .win { color: #2ecc71; } .result__msg .gold { color: var(--gold); }

/* ===================== LOBBY / SALAS ===================== */
.lobby__inner { position: absolute; inset: 0; display: flex; flex-direction: column; max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.lobby__head { display: flex; align-items: center; justify-content: space-between; padding: 26px 4px 14px; }
.lobby__head h2 { font-size: 1.8rem; font-weight: 800; }
.lobby__head .modal__close { position: static; }
.lobby__tabs { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ltab { font: inherit; font-weight: 600; font-size: .92rem; background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 9px 16px; cursor: pointer; transition: all .2s; }
.ltab:hover { color: var(--text); }
.ltab.is-active { color: #000; background: var(--accent); border-color: var(--accent); }
.lobby__body { flex: 1; overflow-y: auto; padding: 22px 4px 30px; }
.lpanel { display: none; animation: fade .3s ease; }
.lpanel.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.room { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: border-color .2s, transform .15s; }
.room:hover { border-color: var(--accent); transform: translateY(-2px); }
.room__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.room__name { font-weight: 800; font-size: 1.05rem; }
.room__badge { font-size: .66rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .04em; }
.room__badge.pub { background: rgba(24,224,200,.14); color: var(--accent); }
.room__badge.priv { background: rgba(247,147,26,.14); color: var(--orange); }
.room__badge.duel { background: rgba(255,91,91,.16); color: #ff8a8a; }
.room__host { color: var(--muted); font-size: .82rem; margin-bottom: 14px; }
.room__stats { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .84rem; margin-bottom: 16px; }
.room__stats b { color: var(--text); }
.room__jack { color: var(--gold); }
.room__enter { width: 100%; font: inherit; font-weight: 700; border: 1px solid var(--line); background: #0c0c14; color: var(--text); border-radius: 11px; padding: 11px; cursor: pointer; transition: all .2s; }
.room__enter:hover { background: var(--accent); color: #000; border-color: var(--accent); }

.duel-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; }
.duel-cta p { flex: 1; min-width: 240px; }
.btn-accent { font: inherit; font-weight: 800; border: none; background: var(--accent); color: #000; border-radius: 12px; padding: 13px 22px; cursor: pointer; transition: filter .2s, transform .15s; white-space: nowrap; }
.btn-accent:hover { filter: brightness(1.08); } .btn-accent:active { transform: scale(.97); }
.btn-full { width: 100%; margin-top: 6px; }

.join { max-width: 460px; }
.join label { display: block; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.join__row { display: flex; gap: 10px; }
.join__row input, .f input, .f select { font: inherit; background: #0c0c14; border: 1px solid var(--line); color: var(--text); border-radius: 11px; padding: 13px 15px; outline: none; }
.join__row input { flex: 1; text-transform: uppercase; letter-spacing: .06em; }
.join__row input:focus, .f input:focus, .f select:focus { border-color: var(--accent); }
#join-msg { margin-top: 12px; }

.create__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.f { display: flex; flex-direction: column; gap: 7px; }
.f span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.created { max-width: 460px; }
.created__ok { font-size: 1.3rem; font-weight: 800; color: #2ecc71; margin-bottom: 12px; }
.created__code { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #0c0c14; border: 1px dashed var(--accent); border-radius: 12px; padding: 14px 18px; margin: 10px 0 18px; font-weight: 800; letter-spacing: .08em; font-size: 1.1rem; }
.created__code button { font: inherit; font-size: .8rem; font-weight: 700; background: var(--accent); color: #000; border: none; border-radius: 8px; padding: 7px 14px; cursor: pointer; }

/* ===================== RESPONSIVO ===================== */
@media (max-width: 820px) {
  .net { display: none; } .brand__name { display: none; }
  .side { align-items: flex-start; }
  .side--orange { clip-path: polygon(0 0, 100% 0, 100% 44%, 0 52%); justify-content: center; }
  .side--blue   { clip-path: polygon(0 52%, 100% 44%, 100% 100%, 0 100%); justify-content: center; align-items: flex-end; }
  .arena.lean-orange .side--orange { clip-path: polygon(0 0,100% 0,100% 60%,0 68%); }
  .arena.lean-orange .side--blue   { clip-path: polygon(0 68%,100% 60%,100% 100%,0 100%); }
  .arena.lean-blue .side--blue     { clip-path: polygon(0 36%,100% 28%,100% 100%,0 100%); }
  .arena.lean-blue .side--orange   { clip-path: polygon(0 0,100% 0,100% 28%,0 36%); }
  .side__content { max-width: 88%; padding: 7vh 8vw; align-items: center !important; text-align: center !important; }
  .side__pot { font-size: clamp(2rem,11vw,3rem); }
  .center { justify-content: center; } .jackpot { margin-top: 0; } .vs { display: none; }
  .ball { width: 38px; height: 38px; font-size: .9rem; }
  .create__grid { grid-template-columns: 1fr; }
}
