/* Form helpers */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 14px;
  cursor: pointer;
}
.check-row input { margin-top: 2px; accent-color: var(--gold); }
.modal.auth-wide,
#modalAuth .modal { width: min(520px, 100%); }
.modal.game-modal { width: min(920px, 100%); max-height: 92vh; display: flex; flex-direction: column; }
.game-body { overflow: auto; max-height: calc(92vh - 64px); padding: 0 !important; }

/* Provider tag */
.provider-tag {
  position: absolute; bottom: 8px; right: 8px;
  font-size: 9px; font-weight: 800; letter-spacing: .4px;
  background: rgba(0,0,0,.65); color: #f5c518;
  padding: 3px 6px; border-radius: 4px; z-index: 2;
}
.card { position: relative; }
.card-play-hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.45); opacity: 0; transition: .2s; z-index: 3;
  color: #fff; font-weight: 800; letter-spacing: 1px; font-size: 14px;
}
.card:hover .card-play-hint { opacity: 1; }

/* ===== GAME SHELL ===== */
.g-shell { background: #0a0d14; color: #fff; }
.g-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid #1e2a40;
  background: linear-gradient(180deg,#141a26,#0d121b);
}
.g-topbar .left { display: flex; gap: 10px; align-items: center; }
.g-bal { background: #0b1220; border: 1px solid #2a3a55; border-radius: 8px; padding: 6px 12px; font-size: 13px; }
.g-bal b { color: #f5c518; }
.g-prov { font-size: 11px; color: #8b98ad; font-weight: 700; }
.g-stage {
  min-height: 320px;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse at center, #1a2235 0%, #070a10 70%);
}
.g-controls {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px; border-top: 1px solid #1e2a40; background: #0f141e;
}
.g-controls label { font-size: 11px; color: #8b98ad; display: block; margin-bottom: 4px; }
.g-bet-box input {
  width: 110px; background: #0b0e13; border: 1px solid #2a3a55;
  border-radius: 8px; color: #fff; padding: 10px; font-weight: 700;
}
.g-chip {
  border: 1px solid #2a3a55; background: #151c2b; color: #cdd6e5;
  border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.g-chip:hover, .g-chip.on { border-color: #f5c518; color: #f5c518; }
.g-btn {
  border: 0; border-radius: 10px; padding: 12px 18px; font-weight: 800;
  cursor: pointer; font-size: 14px; letter-spacing: .3px;
}
.g-btn:disabled { opacity: .45; cursor: not-allowed; }
.g-btn-gold { background: linear-gradient(180deg,#ffd84d,#f0b400); color: #111; }
.g-btn-green { background: linear-gradient(180deg,#34d399,#059669); color: #04140e; }
.g-btn-red { background: linear-gradient(180deg,#fb7185,#e11d48); color: #fff; }
.g-btn-blue { background: linear-gradient(180deg,#60a5fa,#2563eb); color: #fff; }
.g-btn-dark { background: #1a2233; color: #fff; border: 1px solid #2a3a55; }
.g-log {
  max-height: 90px; overflow: auto; font-size: 12px; color: #8b98ad;
  padding: 0 14px 12px; background: #0f141e;
}
.g-log div { padding: 3px 0; border-bottom: 1px dashed #1a2436; }
.g-log .win { color: #34d399; }
.g-log .lose { color: #fb7185; }
.g-msg {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.75); border: 1px solid #f5c518; color: #f5c518;
  padding: 8px 16px; border-radius: 999px; font-weight: 800; z-index: 5;
  opacity: 0; pointer-events: none; transition: .25s;
}
.g-msg.show { opacity: 1; }

/* CRASH */
.crash-wrap { width: 100%; height: 340px; position: relative; }
.crash-wrap canvas { width: 100%; height: 100%; display: block; }
.crash-multi {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 64px; font-weight: 900; text-shadow: 0 0 30px rgba(245,197,24,.45);
  pointer-events: none; color: #fff;
}
.crash-multi.flew { color: #fb7185; }
.crash-status {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.55); border-radius: 8px; padding: 6px 10px;
  font-size: 12px; color: #cdd6e5;
}

/* SLOT */
.slot-machine {
  width: min(520px, 94%);
  background: linear-gradient(180deg,#2a1a08,#120a04);
  border: 3px solid #f5c518; border-radius: 18px; padding: 16px;
  box-shadow: 0 0 40px rgba(245,197,24,.2);
}
.slot-reels {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  background: #0b0e13; border-radius: 12px; padding: 12px;
}
.slot-reel {
  background: #141a26; border-radius: 10px; overflow: hidden;
  height: 210px; position: relative;
  border: 1px solid #2a3a55;
}
.slot-reel .cell {
  height: 70px; display: grid; place-items: center;
  font-size: 34px; border-bottom: 1px solid #1a2436;
}
.slot-title {
  text-align: center; font-weight: 900; color: #f5c518;
  margin-bottom: 10px; letter-spacing: 1px; font-size: 18px;
}
.slot-pay {
  text-align: center; font-size: 12px; color: #c9a227; margin-top: 10px;
}

/* ROULETTE */
.roulette-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 16px;
  width: min(860px, 96%); padding: 16px;
}
@media (max-width: 720px) {
  .roulette-layout { grid-template-columns: 1fr; }
}
.roulette-wheel-wrap {
  width: 240px; height: 240px; margin: 0 auto; position: relative;
}
.roulette-wheel {
  width: 240px; height: 240px; border-radius: 50%;
  border: 8px solid #f5c518;
  background:
    conic-gradient(
      #1a1a1a 0 9.73deg, #c41e3a 0 19.46deg, #1a1a1a 0 29.19deg, #c41e3a 0 38.92deg,
      #1a1a1a 0 48.65deg, #c41e3a 0 58.38deg, #1a1a1a 0 68.11deg, #c41e3a 0 77.84deg,
      #1a1a1a 0 87.57deg, #c41e3a 0 97.3deg, #1a1a1a 0 107.03deg, #c41e3a 0 116.76deg,
      #1a1a1a 0 126.49deg, #c41e3a 0 136.22deg, #1a1a1a 0 145.95deg, #c41e3a 0 155.68deg,
      #1a1a1a 0 165.41deg, #c41e3a 0 175.14deg, #1a1a1a 0 184.87deg, #c41e3a 0 194.6deg,
      #1a1a1a 0 204.33deg, #c41e3a 0 214.06deg, #1a1a1a 0 223.79deg, #c41e3a 0 233.52deg,
      #1a1a1a 0 243.25deg, #c41e3a 0 252.98deg, #1a1a1a 0 262.71deg, #c41e3a 0 272.44deg,
      #1a1a1a 0 282.17deg, #c41e3a 0 291.9deg, #1a1a1a 0 301.63deg, #c41e3a 0 311.36deg,
      #1a1a1a 0 321.09deg, #c41e3a 0 330.82deg, #1a1a1a 0 340.55deg, #c41e3a 0 350.28deg,
      #0a7a32 0 360deg
    );
  transition: transform 4s cubic-bezier(.12,.75,.12,1);
  box-shadow: inset 0 0 30px #000, 0 0 20px rgba(0,0,0,.5);
}
.roulette-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 18px solid #f5c518;
  z-index: 2;
}
.roulette-center {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 28px; font-weight: 900; pointer-events: none;
  text-shadow: 0 2px 8px #000;
}
.roulette-bets { display: grid; gap: 8px; }
.roulette-bets .row { display: flex; flex-wrap: wrap; gap: 6px; }
.r-bet {
  min-width: 54px; padding: 10px 8px; border-radius: 8px; border: 1px solid #2a3a55;
  background: #151c2b; color: #fff; font-weight: 800; cursor: pointer; font-size: 13px;
}
.r-bet.red { background: #8b1530; }
.r-bet.black { background: #1a1a1a; }
.r-bet.green { background: #0a7a32; }
.r-bet.on { outline: 2px solid #f5c518; }

/* BLACKJACK */
.bj-table {
  width: min(720px, 96%);
  background: radial-gradient(ellipse at center, #0d6b45 0%, #064a30 70%);
  border: 6px solid #c9a227; border-radius: 180px / 60px;
  padding: 28px 24px 36px; min-height: 320px;
}
.bj-hand { text-align: center; margin: 14px 0; }
.bj-label { font-size: 12px; color: #d1fae5; margin-bottom: 8px; font-weight: 700; }
.bj-cards { display: flex; justify-content: center; gap: 8px; min-height: 96px; flex-wrap: wrap; }
.bj-card {
  width: 62px; height: 88px; border-radius: 8px;
  background: #fff; color: #111; display: grid; place-items: center;
  font-weight: 900; font-size: 18px; box-shadow: 0 4px 10px rgba(0,0,0,.35);
  border: 1px solid #ddd;
}
.bj-card.red { color: #c41e3a; }
.bj-card.back {
  background: repeating-linear-gradient(45deg,#1e3a8a,#1e3a8a 6px,#1e40af 6px,#1e40af 12px);
  color: transparent;
}
.bj-total { font-size: 13px; color: #f5c518; font-weight: 800; margin-top: 6px; }

/* BACCARAT */
.bac-board {
  width: min(640px, 96%); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px;
}
.bac-side {
  background: #1a0a14; border: 2px solid #c9a227; border-radius: 14px; padding: 16px; text-align: center;
}
.bac-side.on { box-shadow: 0 0 0 2px #f5c518; }
.bac-side h4 { color: #f5c518; margin-bottom: 10px; }
.bac-tie {
  grid-column: 1 / -1; text-align: center;
  background: #0f172a; border: 1px dashed #f5c518; border-radius: 10px; padding: 10px;
}

/* VERIFY STEP */
.verify-box {
  background: rgba(245,197,24,.06);
  border: 1px solid rgba(245,197,24,.25);
  border-radius: 12px; padding: 14px; margin-bottom: 12px;
}
.verify-box code.big-code {
  display: block; text-align: center; font-size: 28px; letter-spacing: 8px;
  font-weight: 900; color: #f5c518; padding: 10px; background: #0b0e13;
  border-radius: 8px; margin: 10px 0;
}
#codeInputs {
  display: flex; gap: 8px; justify-content: center; margin: 12px 0;
}
#codeInputs input {
  width: 44px; height: 52px; text-align: center; font-size: 22px; font-weight: 900;
  background: #0b0e13; border: 1px solid #2a3a55; border-radius: 10px; color: #fff;
}
#codeInputs input:focus { border-color: #f5c518; }

/* ADMIN SETTINGS */
.admin-tabs { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.admin-tabs button {
  border: 1px solid var(--border); background: var(--bg3); color: var(--muted);
  border-radius: 8px; padding: 8px 12px; font-weight: 700; cursor: pointer; font-size: 12px;
}
.admin-tabs button.active { color: var(--gold); border-color: var(--gold); background: rgba(245,197,24,.1); }
.rtp-grid { display: grid; gap: 12px; }
.rtp-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px;
}
.rtp-card h4 { font-size: 14px; margin-bottom: 8px; }
.rtp-card .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0; }
.rtp-card input[type=range] { flex: 1; accent-color: var(--gold); }
.rtp-card .val { min-width: 52px; text-align: right; color: var(--gold); font-weight: 800; }
