﻿/* ============================================================
   modal.css — Shared Modal / Profile / Bet-History Styles
   Used by pages that need modals but do not load main.css.
   DO NOT add topbar / game / lobby rules here.
   ============================================================ */

/* ── Modal overlay ───────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}
.modal.open { display: flex; }

/* ── Modal box ───────────────────────────────────────────── */
.modal-box {
  width: 320px;
  background: #1b1230;
  padding: 20px;
  border-radius: 16px;
  border: 2px solid gold;
  box-shadow: 0 0 30px rgba(0,0,0,.5);
}
.modal-box h2 { margin-top: 0; margin-bottom: 18px; color: gold; }
.modal-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: none;
  border-radius: 10px;
  outline: none;
  background: #2b2345;
  color: #fff;
  box-sizing: border-box;
}
.modal-box button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
}
.modal-box form button {
  background: linear-gradient(#ffd700, #ff9800);
  color: #000;
}
.close-btn {
  margin-top: 10px;
  background: #444 !important;
  color: #fff !important;
}

/* ── Profile tabs ────────────────────────────────────────── */
.profile-tabs {
  display: flex;
  gap: 6px;
  margin: 16px 0;
}
.profile-tab {
  flex: 1;
  border: none;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  background: #2b2345;
  color: #ccc;
  font-size: 12px;
  font-weight: bold;
}
.profile-tab.active { background: gold; color: #000; }
.profile-tab-content { display: none; }
.profile-tab-content.active { display: block; }
.profile-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.profile-stat-label { color: #aaa; font-size: 13px; }
.profile-stat-value { font-weight: bold; color: #fff; }

/* ── Bet history ─────────────────────────────────────────── */
.bh-empty { text-align: center; color: #888; padding: 28px 0; font-size: 13px; }
.bh-stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 14px 8px;
  margin-bottom: 14px;
}
.bh-stat-item { text-align: center; }
.bh-stat-val  { font-size: 18px; font-weight: bold; color: #fff; line-height: 1.2; }
.bh-stat-lbl  { font-size: 10px; color: #888; margin-top: 3px; }
.bh-filter-bar { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bh-filter {
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: #aaa;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
}
.bh-filter.active, .bh-filter:hover { background: #ffd700; color: #000; border-color: #ffd700; font-weight: bold; }
.bh-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.bh-row:last-child { border-bottom: none; }
.bh-game-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.bh-amount { font-weight: bold; font-size: 14px; line-height: 1.3; }
.bh-meta { font-size: 11px; color: #888; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bh-note { font-size: 10px; color: #666; margin-top: 2px; }
.bh-badge { flex-shrink: 0; font-size: 11px; font-weight: bold; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.bh-badge-win  { background: rgba(0,230,118,0.12); color: #00e676; border: 1px solid rgba(0,230,118,0.3); }
.bh-badge-lose { background: rgba(255,85,85,0.12); color: #ff7070; border: 1px solid rgba(255,85,85,0.25); }
.bh-badge-pending { background: rgba(255,193,7,0.12); color: #ffc107; border: 1px solid rgba(255,193,7,0.3); }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .modal-box { width: 95% !important; max-width: 95%; }
  .profile-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .profile-tab  { font-size: 11px; padding: 8px; }
  .bh-stats     { grid-template-columns: repeat(2,1fr); }
}
