
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #c9a84c;
  --gold-light: #f0d080;
  --gold-dim: #7a6030;
  --dark: #0a0d13;
  --dark2: #131820;
  --dark3: #1c2330;
  --dark4: #242d3d;
  --cell-light: #e8d5a3;
  --cell-dark: #4a7c59;
  --red: #c0392b;
  --red-light: #e74c3c;
  --green: #27ae60;
  --green-light: #2ecc71;
  --blue: #2980b9;
  --blue-light: #3498db;
  --border: #2a3448;
  --text: #e8eef8;
  --text-dim: #7a8aaa;
  --success: #00c853;
  --danger: #ff3d57;
  --warning: #ffb300;
  --trc20: #ef0027;
}

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 10% 10%, rgba(201,168,76,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(39,174,96,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(41,128,185,0.04) 0%, transparent 70%);
}

/* ===== SCREENS ===== */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; flex-direction: column; align-items: center; }

/* ===== AUTH SCREEN ===== */
#auth-screen {
  justify-content: center;
  padding: 20px;
}
.auth-box {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.1);
  position: relative;
  overflow: hidden;
}
.auth-box::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 0%, rgba(201,168,76,0.06), transparent 60%);
  pointer-events: none;
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .logo-icon { font-size: 3rem; }
.auth-logo h1 {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(201,168,76,0.4);
  margin: 6px 0 4px;
}
.auth-logo p { color: var(--text-dim); font-size: 0.85rem; }

.auth-tabs {
  display: flex;
  background: var(--dark3);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}
.auth-tab.active { background: var(--gold); color: #000; }

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.form-input::placeholder { color: var(--text-dim); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-block { width: 100%; }
.btn-gold {
  background: linear-gradient(135deg, #f0d080, var(--gold), #a07830);
  color: #000;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,168,76,0.4); }
.btn-dark {
  background: var(--dark3);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-dark:hover { background: var(--dark4); }
.btn-green {
  background: linear-gradient(135deg, #2ecc71, #1a8a4a);
  color: #fff;
}
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(46,204,113,0.3); }
.btn-red {
  background: linear-gradient(135deg, #e74c3c, #8B0000);
  color: #fff;
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(231,76,60,0.3); }
.btn-blue {
  background: linear-gradient(135deg, #3498db, #1a5c8a);
  color: #fff;
}
.btn-blue:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(52,152,219,0.3); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: 7px; }

.auth-divider {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 12px 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { right: 0; }
.auth-divider::after { left: 0; }

/* ===== TOP NAVBAR ===== */
#main-screen { padding: 0; }
.navbar {
  width: 100%;
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar-brand {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gold);
}
.navbar-wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.navbar-wallet:hover { border-color: var(--gold); }
.navbar-balance { font-size: 0.88rem; font-weight: 700; color: var(--gold); }
.navbar-user {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #7a5020);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  color: #000;
  border: 2px solid var(--gold-dim);
}
.vip-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #000;
}

/* ===== TABS ===== */
.main-tabs {
  width: 100%;
  display: flex;
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.main-tab {
  flex: 1;
  min-width: 80px;
  padding: 12px 8px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.main-tab .tab-icon { font-size: 1.1rem; }
.main-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.tab-content { display: none; width: 100%; flex: 1; }
.tab-content.active { display: block; }

/* ===== GAME TAB ===== */
.game-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 10px;
  gap: 10px;
}
.bet-selector {
  width: 100%;
  max-width: 520px;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.bet-selector h3 {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.bet-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bet-option {
  flex: 1;
  min-width: 70px;
  padding: 8px 6px;
  background: var(--dark3);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.bet-option.selected { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.1); }
.bet-option:hover { border-color: var(--gold-dim); }

/* Scorebar */
.scorebar {
  display: flex;
  width: 100%;
  max-width: 520px;
  gap: 8px;
  align-items: center;
}
.player-card {
  flex: 1;
  background: var(--dark2);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.player-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
}
.player-card.red::before { background: linear-gradient(135deg, rgba(192,57,43,0.15), transparent); }
.player-card.green::before { background: linear-gradient(135deg, rgba(39,174,96,0.15), transparent); }
.player-card.active { border-color: var(--gold); box-shadow: 0 0 16px rgba(201,168,76,0.3); }
.player-card.active::before { opacity: 1; }
.piece-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.5);
}
.piece-icon.red { background: radial-gradient(circle at 35% 35%, #e74c3c, #7b241c); }
.piece-icon.green { background: radial-gradient(circle at 35% 35%, #2ecc71, #1a6b3a); }
.player-info { flex: 1; }
.player-name { font-size: 0.78rem; font-weight: 700; opacity: 0.8; }
.player-score { font-size: 1.2rem; font-weight: 900; color: var(--gold); }
.turn-badge {
  font-size: 0.6rem; font-weight: 700;
  background: var(--gold); color: #000;
  padding: 2px 5px; border-radius: 4px;
  opacity: 0; transition: opacity 0.3s;
}
.player-card.active .turn-badge { opacity: 1; }

.status-bar {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.83rem;
  font-weight: 700;
  text-align: center;
  width: 100%;
  max-width: 520px;
  color: var(--gold);
  min-height: 34px;
  display: flex; align-items: center; justify-content: center;
}

.board-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 0 3px var(--gold), 0 0 0 5px var(--dark3);
}
#board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(90vw, 480px);
  height: min(90vw, 480px);
  user-select: none;
}
.cell {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  cursor: default;
}
.cell.light { background: var(--cell-light); }
.cell.dark  { background: var(--cell-dark); }
.cell.dark.possible { background: #5a9e72; cursor: pointer; }
.cell.dark.possible::after {
  content: '';
  position: absolute;
  width: 30%; height: 30%;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  pointer-events: none;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1);opacity:.8} 50%{transform:scale(1.3);opacity:.4} }
.cell.dark.selected { background: #3d8a5a; }
.piece {
  width: 76%; height: 76%;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.piece:hover { transform: scale(1.08); }
.piece.selected { transform: scale(1.12); }
.piece.red-piece {
  background: radial-gradient(circle at 35% 30%, #f05540, #8B0000);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6), inset 0 1px 2px rgba(255,180,160,0.4);
  border: 2px solid rgba(255,100,80,0.3);
}
.piece.red-piece.selected { box-shadow: 0 0 0 3px #fff, 0 4px 16px rgba(255,80,60,0.6); }
.piece.green-piece {
  background: radial-gradient(circle at 35% 30%, #4de080, #155d2a);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6), inset 0 1px 2px rgba(150,255,180,0.4);
  border: 2px solid rgba(80,220,120,0.3);
}
.piece.green-piece.selected { box-shadow: 0 0 0 3px #fff, 0 4px 16px rgba(80,200,120,0.6); }
.piece.king::after {
  content: '♛';
  position: absolute;
  font-size: clamp(11px,2.5vw,16px);
  color: rgba(255,215,0,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  pointer-events: none;
}
.controls { display: flex; gap: 8px; }

/* ===== WALLET TAB ===== */
.wallet-section { padding: 16px; max-width: 520px; width: 100%; margin: 0 auto; }
.balance-card {
  background: linear-gradient(135deg, var(--dark3), var(--dark4));
  border: 1px solid var(--gold-dim);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 0%, rgba(201,168,76,0.08), transparent 60%);
  pointer-events: none;
}
.balance-label { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 6px; }
.balance-amount {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(201,168,76,0.3);
}
.balance-amount span { font-size: 1rem; color: var(--text-dim); }
.balance-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: 4px; }

.wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.section-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 14px;
}
.section-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.deposit-address {
  background: var(--dark3);
  border: 1px dashed var(--gold-dim);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.deposit-address p {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.address-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.address-text {
  flex: 1;
  font-size: 0.72rem;
  color: var(--gold-light);
  font-family: monospace;
  word-break: break-all;
  line-height: 1.4;
}
.trc20-badge {
  background: var(--trc20);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.txid-input { margin-top: 10px; }
.txid-status {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  display: none;
}
.txid-status.pending {
  background: rgba(255,179,0,0.15);
  border: 1px solid var(--warning);
  color: var(--warning);
  display: block;
}
.txid-status.approved {
  background: rgba(0,200,83,0.15);
  border: 1px solid var(--success);
  color: var(--success);
  display: block;
}

/* ===== TURN TIMER ===== */
.player-timer {
  font-size: 1rem;
  font-weight: 900;
  color: var(--gold);
  min-width: 28px;
  text-align: center;
  transition: color 0.3s;
}
.player-timer.urgent { color: var(--danger); animation: timerPulse 0.5s ease-in-out infinite alternate; }
@keyframes timerPulse { from { transform: scale(1); } to { transform: scale(1.2); } }
.timer-bar-wrap {
  width: 32px;
  height: 4px;
  background: var(--dark3);
  border-radius: 2px;
  overflow: hidden;
}
.timer-bar {
  height: 100%;
  width: 100%;
  border-radius: 2px;
  background: var(--gold);
  transition: width 1s linear, background 0.3s;
}
.timer-bar.urgent { background: var(--danger); }

/* ===== BET CARDS ===== */
.bet-card {
  background: var(--dark2);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.bet-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}
.bet-card.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,0.1);
  box-shadow: 0 0 18px rgba(201,168,76,0.2);
}
.bet-card.selected::after {
  content: '✓';
  position: absolute;
  top: 7px; left: 10px;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--gold);
  background: rgba(201,168,76,0.2);
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 18px;
}
.bet-card.locked {
  opacity: 0.4;
  cursor: not-allowed;
}
.bet-card.locked::before {
  content: '🔒';
  position: absolute;
  top: 7px; right: 8px;
  font-size: 0.8rem;
}
.bet-card-icon { font-size: 1.8rem; margin-bottom: 6px; }
.bet-card-name { font-size: 1rem; font-weight: 900; color: var(--text); }
.bet-card-sub { font-size: 0.7rem; color: var(--text-dim); margin-top: 2px; }
.bet-card-prize {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  margin-top: 6px;
  background: rgba(0,200,83,0.1);
  border-radius: 6px;
  padding: 3px 6px;
}
.bet-card:first-child .bet-card-prize { color: var(--text-dim); background: transparent; }

/* ===== MODE BUTTONS (AI difficulty / friend) ===== */
.mode-btn {
  background: var(--dark3);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}
.mode-btn:hover { border-color: var(--gold-dim); }
.mode-btn.selected { border-color: var(--gold); background: rgba(201,168,76,0.12); }

/* ===== TRANSACTIONS TABLE ===== */
.tx-table { width: 100%; border-collapse: collapse; }
.tx-table th {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: right;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.tx-table td {
  font-size: 0.8rem;
  padding: 8px;
  border-bottom: 1px solid rgba(42,52,72,0.5);
  vertical-align: middle;
}
.tx-type { font-weight: 700; display: flex; align-items: center; gap: 5px; }
.tx-deposit { color: var(--success); }
.tx-withdraw { color: var(--danger); }
.tx-game-win { color: var(--gold); }
.tx-game-loss { color: var(--red-light); }
.tx-transfer { color: var(--blue-light); }
.tx-referral { color: #b48aff; }
.tx-status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
}
.status-pending { background: rgba(255,179,0,0.15); color: var(--warning); }
.status-done { background: rgba(0,200,83,0.15); color: var(--success); }
.status-fail { background: rgba(255,61,87,0.15); color: var(--danger); }

/* ===== REFERRAL TAB ===== */
.referral-section { padding: 16px; max-width: 520px; width: 100%; margin: 0 auto; }
.ref-card {
  background: linear-gradient(135deg, #1a2340, #0f1a2e);
  border: 1px solid #3a4a6a;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 14px;
}
.ref-code-display {
  background: var(--dark);
  border: 2px dashed var(--gold-dim);
  border-radius: 10px;
  padding: 12px;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 4px;
  margin: 10px 0;
}
.ref-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.ref-stat {
  background: var(--dark3);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}
.ref-stat-val { font-size: 1.3rem; font-weight: 900; color: var(--gold); }
.ref-stat-label { font-size: 0.7rem; color: var(--text-dim); margin-top: 2px; }

/* ===== VIP TAB ===== */
.vip-section { padding: 16px; max-width: 520px; width: 100%; margin: 0 auto; }
.vip-levels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vip-level-card {
  background: var(--dark2);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s;
}
.vip-level-card.current { border-color: var(--gold); background: rgba(201,168,76,0.06); }
.vip-icon { font-size: 2rem; flex-shrink: 0; }
.vip-info { flex: 1; }
.vip-name { font-size: 1rem; font-weight: 900; }
.vip-desc { font-size: 0.75rem; color: var(--text-dim); margin-top: 2px; }
.vip-progress-bar {
  height: 5px;
  background: var(--dark3);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}
.vip-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.5s;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  pointer-events: auto;
  max-width: 320px;
  text-align: center;
}
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.info { border-color: var(--gold); color: var(--gold); }
.toast.warning { border-color: var(--warning); color: var(--warning); }
@keyframes toastIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes toastOut { from{opacity:1} to{opacity:0} }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--dark2);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.8), 0 0 30px rgba(201,168,76,0.2);
  animation: modalIn 0.3s ease;
  max-width: 340px;
  width: 100%;
}
@keyframes modalIn { from{transform:scale(0.85);opacity:0} to{transform:scale(1);opacity:1} }
.modal h2 { font-size: 1.5rem; color: var(--gold); margin-bottom: 8px; }
.modal p { opacity: 0.8; margin-bottom: 20px; font-size: 0.9rem; }
.modal .trophy { font-size: 3rem; margin-bottom: 10px; }

/* ===== TRANSFER MODAL ===== */
.modal-sheet {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  padding: 24px 20px;
  width: 100%;
  max-width: 480px;
  margin-top: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.7);
  animation: sheetIn 0.3s ease;
}
@keyframes sheetIn { from{transform:translateY(50px);opacity:0} to{transform:translateY(0);opacity:1} }

/* ===== PROFILE ===== */
.profile-section { padding: 16px; max-width: 520px; width: 100%; margin: 0 auto; }
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}
.profile-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #7a5020);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #000;
  border: 3px solid var(--gold-dim);
  flex-shrink: 0;
}
.profile-info { flex: 1; }
.profile-username { font-size: 1.2rem; font-weight: 900; }
.profile-joined { font-size: 0.75rem; color: var(--text-dim); margin-top: 2px; }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.profile-stat {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
}
.profile-stat-val { font-size: 1.3rem; font-weight: 900; color: var(--gold); }
.profile-stat-label { font-size: 0.7rem; color: var(--text-dim); margin-top: 2px; }

/* Small helpers */
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.text-dim { color: var(--text-dim); }
.text-gold { color: var(--gold); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; align-items: center; gap: 8px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.empty-state { text-align: center; padding: 30px 20px; color: var(--text-dim); font-size: 0.85rem; }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 10px; }



/* ===== ADMIN STYLES ===== */
#admin-screen { background: var(--dark); }
.adm-tab {
  flex:1; min-width:80px;
  padding:10px 6px;
  border:none; background:transparent;
  color:var(--text-dim);
  font-family:'Tajawal',sans-serif;
  font-size:0.72rem; font-weight:700;
  cursor:pointer;
  border-bottom:2px solid transparent;
  display:flex; flex-direction:column; align-items:center; gap:3px;
  white-space:nowrap; transition:all 0.2s;
}
.adm-tab span { font-size:1.1rem; }
.adm-tab.active { color:var(--gold); border-bottom-color:var(--gold); }
.adm-content { display:none; width:100%; flex:1; overflow-y:auto; }
.adm-content.active { display:block; }
.adm-stats-grid {
  display:grid; grid-template-columns:repeat(2,1fr); gap:10px;
}
.adm-stat-card {
  background:var(--dark2); border:1px solid var(--border);
  border-radius:14px; padding:14px 12px; text-align:center;
}
.adm-stat-card.urgent { border-color:var(--warning); background:rgba(255,179,0,0.05); }
.adm-stat-icon { font-size:1.6rem; margin-bottom:4px; }
.adm-stat-val { font-size:1.4rem; font-weight:900; color:var(--gold); }
.adm-stat-label { font-size:0.72rem; color:var(--text-dim); margin-top:2px; }
.adm-section-title {
  font-size:0.9rem; font-weight:900; color:var(--gold);
  margin-bottom:10px; display:flex; align-items:center; gap:6px;
}
.adm-table-wrap { overflow-x:auto; border-radius:10px; border:1px solid var(--border); }
.adm-table { width:100%; border-collapse:collapse; min-width:500px; }
.adm-table th {
  font-size:0.72rem; color:var(--text-dim); text-align:right;
  padding:8px 10px; background:var(--dark3);
  border-bottom:1px solid var(--border);
}
.adm-table td {
  font-size:0.8rem; padding:9px 10px;
  border-bottom:1px solid rgba(42,52,72,0.4);
  vertical-align:middle;
}
.adm-table tr:last-child td { border-bottom:none; }
.adm-table tr:hover td { background:rgba(255,255,255,0.02); }
.adm-toolbar {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:12px; gap:8px;
}
.adm-search {
  flex:1; padding:9px 12px;
  background:var(--dark3); border:1px solid var(--border);
  border-radius:8px; color:var(--text);
  font-family:'Tajawal',sans-serif; font-size:0.85rem; outline:none;
}
.adm-search:focus { border-color:var(--gold); }
.adm-btn-tiny {
  padding:3px 8px; border-radius:5px; font-size:0.7rem;
  font-family:'Tajawal',sans-serif; font-weight:700;
  cursor:pointer; border:none; margin:1px;
}
.adm-btn { padding:8px 14px; border-radius:8px; font-family:'Tajawal',sans-serif; font-size:0.82rem; font-weight:700; cursor:pointer; border:none; }
.adm-btn-gold { background:var(--gold); color:#000; }
.adm-btn-green { background:var(--green); color:#fff; }
.adm-btn-red { background:var(--red-light); color:#fff; }
.adm-vip-badge { font-size:0.65rem; font-weight:700; padding:2px 7px; border-radius:5px; background:rgba(201,168,76,0.2); color:var(--gold); }
.adm-pass-cell { font-family:monospace; font-size:0.85rem; letter-spacing:2px; }
