/* KASINO — mobile-first theme (inspirasi TT789: tropis cerah) */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(160deg, #0b3d6e 0%, #0a6ea8 40%, #12b3c8 75%, #f4d06f 120%);
  min-height: 100vh;
  color: #fff;
  user-select: none;
}
.wrap { max-width: 480px; margin: 0 auto; padding: 14px; }

/* ── TOP BAR ── */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,.25); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px;
}
.topbar .brand { font-weight: 800; font-size: 1.05rem; }
.topbar .bal { background: rgba(255,255,255,.15); padding: 5px 12px; border-radius: 20px; font-size: .82rem; font-weight: 700; }
.topbar a { color: #fff; text-decoration: none; font-size: .8rem; }

/* ── KARTU ── */
.card { background: rgba(255,255,255,.12); border-radius: 16px; padding: 16px; margin-bottom: 12px; backdrop-filter: blur(4px); }
.card h2 { margin: 0 0 12px; font-size: .95rem; }
.btn {
  display: block; width: 100%; padding: 13px; border: 0; border-radius: 12px;
  font-size: .95rem; font-weight: 800; cursor: pointer; margin-top: 10px;
}
.btn-primary { background: linear-gradient(90deg, #f9a825, #ffd54f); color: #3e2723; }
.btn-green { background: linear-gradient(90deg, #43a047, #81c784); color: #fff; }
.btn-blue { background: linear-gradient(90deg, #1e88e5, #64b5f6); color: #fff; }
.btn-red { background: linear-gradient(90deg, #e53935, #ef9a9a); color: #fff; }
.btn:disabled { opacity: .5; }

/* ── INPUT ── */
.input {
  width: 100%; padding: 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 12px;
  background: rgba(255,255,255,.12); color: #fff; font-size: .95rem; margin-bottom: 10px;
  outline: none;
}
.input::placeholder { color: rgba(255,255,255,.5); }
label { font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.8); display: block; margin: 6px 0 4px; }

/* ── GRID GAME ── */
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.game-card {
  background: rgba(255,255,255,.14); border-radius: 12px; overflow: hidden; text-align: center;
  cursor: pointer; transition: transform .12s;
}
.game-card:active { transform: scale(.96); }
.game-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: #0b3d6e; }
.game-card .nm { font-size: .68rem; padding: 6px 4px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── NAV BAWAH ── */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: flex; background: rgba(10,30,55,.95);
  border-radius: 16px 16px 0 0; padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.bottomnav a {
  flex: 1; text-align: center; color: rgba(255,255,255,.7); text-decoration: none; font-size: .62rem; font-weight: 700;
}
.bottomnav a .ic { font-size: 1.3rem; display: block; }
.bottomnav a.active { color: #ffd54f; }
.pb { padding-bottom: 80px; }

/* ── SPLASH ── */
.splash {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 100;
  background: linear-gradient(180deg, #7ec8e3, #0a6ea8 60%, #f4d06f);
}
.splash .logo { font-size: 2.6rem; font-weight: 900; text-shadow: 0 4px 20px rgba(0,0,0,.4); }
.splash .spin {
  width: 44px; height: 44px; border: 5px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%; margin-top: 24px;
  animation: sp 1s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }
.splash .pct { margin-top: 12px; font-size: .85rem; font-weight: 700; }

/* ── QR / POPUP ── */
.qrbox { text-align: center; padding: 18px; }
.qrbox img { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 12px; }
.qrbox .oid { font-size: .78rem; color: rgba(255,255,255,.8); word-break: break-all; }
.toast {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.85); color: #fff; padding: 10px 20px; border-radius: 20px;
  font-size: .82rem; z-index: 200; display: none; max-width: 90%;
}
.alert { padding: 10px 14px; border-radius: 10px; font-size: .82rem; margin-bottom: 10px; }
.alert.err { background: rgba(229,57,53,.25); color: #ffcdd2; }
.alert.ok { background: rgba(67,160,71,.25); color: #c8e6c9; }

/* ── TAB LOGIN/REGISTER ── */
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button {
  flex: 1; padding: 11px; border: 0; border-radius: 12px; font-weight: 800; font-size: .88rem;
  background: rgba(255,255,255,.15); color: #fff; cursor: pointer;
}
.tabs button.active { background: #ffd54f; color: #3e2723; }
.hide { display: none; }
