/* Look-alike of play.pakakumi.com (demo). Dark grey panels, orange logo, blue BET / orange CASHOUT, green/red busts. */
:root {
  --bg: #2b2b2b; --panel: #3a3a3a; --panel2: #444; --input: #2b2b2b; --line: #4d4d4d; --text: #fff; --muted: #a0a0a0;
  --orange: #f39c12; --orange2: #e48f0e; --blue: #3b8ad8; --blue2: #2f7bc7; --green: #2ecc71; --green2: #27ae60; --red: #e74c3c; --gold: #f1c40f;
  --mono: 'Courier New', Courier, ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', Verdana, system-ui, sans-serif; border-top: 4px solid #7a4d09; }

/* ---- header ---- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; background: var(--bg); }
.logo { font-family: var(--mono); font-weight: 900; font-size: 30px; color: var(--orange); text-shadow: 1px 1px 0 #000, 2px 2px 0 rgba(0,0,0,.6); }
.demo-tag { font-family: 'Segoe UI', Verdana, sans-serif; font-size: 10px; color: #fff; background: var(--red); padding: 2px 6px; border-radius: 3px; vertical-align: middle; margin-left: 8px; letter-spacing: 1px; text-shadow: none; }
.right { display: flex; align-items: center; gap: 8px; }
.deposit { background: var(--orange); color: #fff; font-weight: 700; font-size: 13px; border: 0; border-radius: 4px; padding: 10px 10px; cursor: pointer; text-shadow: 0 1px 0 rgba(0,0,0,.35); font-family: inherit; }
.deposit:hover { background: var(--orange2); }
.wallet { background: #4a4a3a; border: 1px solid #5c5c48; border-radius: 4px; padding: 3px 10px; text-align: center; line-height: 1.2; min-width: 88px; }
.bal { color: var(--gold); font-weight: 800; font-size: 15px; white-space: nowrap; }
.fb { font-size: 10px; color: #ddd; }
.fb span { color: #fff; }
.menu { color: #fff; text-decoration: none; font-size: 26px; padding: 0 2px; line-height: 1; }

main { max-width: 640px; margin: 0 auto; padding: 0 6px 12px; display: grid; gap: 8px; }
section { background: var(--panel); border-radius: 4px; padding: 8px; }

/* ---- game ---- */
.game { padding: 0 0 4px; }
.chart-wrap { position: relative; height: 165px; }
canvas { width: 100%; height: 100%; display: block; }
.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; padding-bottom: 20px; }
.title { font-size: 16px; font-weight: 600; color: #f3f3f3; margin-bottom: 2px; min-height: 0; }
.mult { font-family: var(--mono); font-weight: 700; font-size: 48px; color: #111; line-height: 1.05; text-align: center; letter-spacing: 1px; }
.mult.live { color: var(--green); text-shadow: 0 0 1px rgba(0,0,0,.3); }
.mult.cashed { color: #111; }
.mult .smile { color: var(--green); font-size: 40px; vertical-align: top; margin-right: 6px; }
.mult.busted { color: var(--red); font-size: 40px; line-height: 1.25; white-space: pre-line; }
.mult.wait { color: var(--orange); font-size: 44px; font-family: 'Segoe UI', Verdana, sans-serif; font-weight: 600; letter-spacing: 0; }
.sub { font-family: 'Segoe UI', Verdana, sans-serif; font-size: 18px; font-weight: 700; color: #ddd; margin-top: 2px; min-height: 20px; }
.sub.win { color: var(--green); } .sub.loss { color: var(--red); }
.strip { display: flex; padding: 12px 6px 6px; overflow: hidden; gap: 4px; }
.strip span { flex: 1; text-align: center; font-size: 13px; font-weight: 600; white-space: nowrap; }
.g { color: var(--green); } .r { color: var(--red); }

/* ---- bet panel ---- */
.bet { padding: 10px 12px 10px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: 15px; color: #fff; }
input[type=number] { background: var(--input); border: 1px solid #555; color: #fff; border-radius: 4px; padding: 10px 12px; font-size: 15px; width: 100%; font-family: inherit; }
input[type=number]:focus { outline: none; border-color: var(--blue); }
.big { width: 100%; margin-top: 12px; background: var(--blue); color: #fff; font-weight: 800; font-size: 17px; letter-spacing: 2px; border: 0; border-radius: 5px; padding: 16px 12px; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.big small { font-size: 12px; letter-spacing: 0; font-weight: 700; opacity: .95; }
.big:hover { background: var(--blue2); }
.big:disabled { opacity: .45; cursor: not-allowed; }
.big.orange { background: var(--orange); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.big.orange:hover { background: var(--orange2); }
.big.cash { padding: 12px 12px; }
.big.grey { background: #7f7f7f; }
.tools { display: flex; align-items: center; gap: 10px; margin-top: 12px; min-height: 30px; }
.conn { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #3a6a3a; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.conn i { width: 6px; height: 6px; border-radius: 50%; background: #555; display: block; }
.conn.on { border-color: var(--green2); }
.conn.on i { background: var(--green); }
.note { flex: 1; font-size: 12px; color: var(--muted); min-height: 16px; }
.note.win { color: var(--green); } .note.loss { color: #ff6b6b; }
.autobet { flex-direction: row; align-items: center; gap: 8px; font-size: 12px; color: #999; font-weight: 400; cursor: pointer; user-select: none; }
.autobet input { display: none; }
.switch { width: 50px; height: 26px; border-radius: 13px; background: #555; position: relative; transition: .2s; }
.switch b { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.switch em { position: absolute; right: 8px; top: 3px; font-style: normal; color: #fff; font-size: 15px; font-weight: 700; }
.autobet input:checked + .switch { background: var(--green2); }
.autobet input:checked + .switch b { left: 27px; }
.autobet input:checked + .switch em { display: none; }
.snd { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #666; background: #333; color: #fff; cursor: pointer; font-size: 13px; padding: 0; }

/* ---- tabs ---- */
.tabs { padding: 8px; }
.tabs nav { display: flex; background: #303030; border-radius: 3px; overflow: hidden; }
.tab { flex: 1; background: transparent; border: 0; color: #ccc; padding: 11px 6px; font-size: 13px; cursor: pointer; font-family: inherit; }
.tab.active { background: #4a4a4a; color: var(--orange); font-weight: 600; }
.pane { display: none; padding: 8px 0 0; }
.pane.active { display: block; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; padding: 6px; border-bottom: 1px solid var(--line); }
td { padding: 7px 6px; border-bottom: 1px solid #454545; font-weight: 600; }
td.dim { color: #999; font-weight: 400; }
.hist-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.hist-grid span { background: #464646; border: 1px solid #555; border-radius: 4px; text-align: center; padding: 8px 2px; font-size: 13px; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.stat { background: #303030; border-radius: 3px; padding: 8px 4px; text-align: center; }
.stat .k { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.stat .v { font-family: var(--mono); font-weight: 700; font-size: 14px; margin-top: 3px; }
.chat { font-size: 13px; color: #bbb; display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.chat div b { color: var(--orange); margin-right: 6px; font-weight: 600; }
.chat div .t { float: right; color: #666; font-size: 11px; }
.chat div.win { color: var(--green); } .chat div.loss { color: var(--red); }
.foot { text-align: center; color: #777; font-size: 11px; margin: 4px 0 0; }
@media (max-width: 480px) { .hist-grid { grid-template-columns: repeat(5, 1fr); } .mult { font-size: 40px; } .mult.busted { font-size: 32px; } .strip span:nth-child(n+10) { display: none; } .stats { grid-template-columns: repeat(2, 1fr); } .logo { font-size: 24px; } }
