/* ============================================
   WinGo 30S - Complete Styles
   ============================================ */

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

:root {
  --bg-primary:    #0f0f1a;
  --bg-secondary:  #161625;
  --bg-card:       #1e1e30;
  --bg-card2:      #252538;
  --green:         #00c853;
  --green-dark:    #009624;
  --green-glow:    rgba(0,200,83,0.35);
  --red:           #f44336;
  --red-dark:      #b71c1c;
  --red-glow:      rgba(244,67,54,0.35);
  --violet:        #9c27b0;
  --violet-dark:   #6a0080;
  --violet-glow:   rgba(156,39,176,0.35);
  --big:           #ff9800;
  --small:         #2196f3;
  --gold:          #ffd700;
  --text-primary:  #f0f0ff;
  --text-secondary:#a0a0c0;
  --text-muted:    #606080;
  --border:        rgba(255,255,255,0.08);
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
}

html { font-size: 15px; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 40px;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--violet); border-radius: 4px; }

/* ===== TOP HEADER ===== */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1a0a2e 0%, #0d1b3e 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.header-left { display: flex; align-items: center; gap: 10px; }
.back-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text-primary);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.back-btn:hover { background: rgba(255,255,255,0.15); }
.game-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(90deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.game-mode-badge {
  background: linear-gradient(135deg, var(--violet), #3f51b5);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 1px;
}
.header-right { display: flex; align-items: center; gap: 8px; }
.balance-box {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.25);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
}
.balance-box i { width: 14px; height: 14px; }
.icon-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.14); color: var(--text-primary); }
.icon-btn i { width: 16px; height: 16px; }

/* ===== STATUS BAR ===== */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-secondary);
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #666;
  flex-shrink: 0;
  transition: background 0.3s;
}
.status-dot.connected    { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.connecting   { background: var(--gold); animation: pulse-dot 1s infinite; }
.status-dot.disconnected { background: var(--red); }
.server-url { margin-left: auto; color: var(--text-muted); font-size: 0.7rem; }
@keyframes pulse-dot {
  0%,100% { opacity: 1; } 50% { opacity: 0.3; }
}

/* ===== PERIOD SECTION ===== */
.period-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #1a0a2e 0%, #0d1b3e 100%);
  border-bottom: 1px solid var(--border);
}
.period-info { flex: 1; }
.period-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.period-number {
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

/* Timer Ring */
.timer-ring-wrap {
  position: relative;
  width: 80px; height: 80px;
  flex-shrink: 0;
}
.timer-ring { width: 80px; height: 80px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 6; }
.ring-fill {
  fill: none;
  stroke: url(#timerGrad);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.5s;
}
.timer-center {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-primary);
}
.timer-center.warning { color: var(--red); animation: blink 0.5s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }

.last-result-mini { flex: 1; text-align: right; }
.lr-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 4px; }
.lr-number {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}
.lr-colors { display: flex; gap: 4px; justify-content: flex-end; margin-top: 4px; }
.color-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.color-dot.green  { background: var(--green); }
.color-dot.red    { background: var(--red); }
.color-dot.violet { background: var(--violet); }

/* ===== HISTORY STRIP ===== */
.history-strip {
  padding: 10px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.history-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.history-title i { width: 12px; height: 12px; }
.history-balls {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.history-balls::-webkit-scrollbar { height: 2px; }
.h-ball {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
  position: relative;
  border: 2px solid transparent;
}
.h-ball.green  { background: radial-gradient(circle, #00e676, #00c853); border-color: #00e676; }
.h-ball.red    { background: radial-gradient(circle, #ff5252, #f44336); border-color: #ff5252; }
.h-ball.violet { background: radial-gradient(circle, #ce93d8, #9c27b0); border-color: #ce93d8; }
.h-ball.green-violet { background: radial-gradient(circle at 30% 50%, #00c853 40%, #9c27b0 60%); }
.h-ball.red-violet   { background: radial-gradient(circle at 30% 50%, #f44336 40%, #9c27b0 60%); }

/* ===== BET CLOSED OVERLAY ===== */
.bet-closed-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 50;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.bet-closed-overlay.active { display: flex; }
.bet-closed-inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: rgba(30,30,50,0.95);
  border: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 30px 50px;
  color: var(--red);
  font-size: 1.2rem;
  font-weight: 700;
  animation: pop-in 0.3s ease;
}
.bet-closed-inner i { width: 40px; height: 40px; }

/* ===== BETTING PANEL ===== */
.betting-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Color Bets */
.color-bets {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.bet-btn {
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.bet-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}
.bet-btn:hover::after { background: rgba(255,255,255,0.1); }
.bet-btn:active { transform: scale(0.96); }
.btn-label { font-size: 1rem; font-weight: 700; color: #fff; }
.btn-sub   { font-size: 0.7rem; color: rgba(255,255,255,0.7); }
.btn-odds  { font-size: 0.72rem; color: rgba(255,255,255,0.8); background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 10px; }

.green-btn  { background: linear-gradient(135deg, #00c853, #1b5e20); box-shadow: 0 4px 15px var(--green-glow); }
.violet-btn { background: linear-gradient(135deg, #9c27b0, #4a148c); box-shadow: 0 4px 15px var(--violet-glow); }
.red-btn    { background: linear-gradient(135deg, #f44336, #b71c1c); box-shadow: 0 4px 15px var(--red-glow); }

/* Number Grid */
.number-grid {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--border);
}
.number-grid-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.odds-tag {
  background: rgba(255,215,0,0.15);
  color: var(--gold);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,215,0,0.3);
}
.number-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.num-btn {
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: all 0.18s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.num-btn:hover { transform: scale(1.1); filter: brightness(1.2); }
.num-btn:active { transform: scale(0.95); }

/* Number colors based on game rules */
.num-0 { background: linear-gradient(135deg, #f44336 50%, #9c27b0 50%); }
.num-1 { background: linear-gradient(135deg, #00c853, #1b5e20); }
.num-2 { background: linear-gradient(135deg, #f44336, #b71c1c); }
.num-3 { background: linear-gradient(135deg, #00c853, #1b5e20); }
.num-4 { background: linear-gradient(135deg, #f44336, #b71c1c); }
.num-5 { background: linear-gradient(135deg, #00c853 50%, #9c27b0 50%); }
.num-6 { background: linear-gradient(135deg, #f44336, #b71c1c); }
.num-7 { background: linear-gradient(135deg, #00c853, #1b5e20); }
.num-8 { background: linear-gradient(135deg, #f44336, #b71c1c); }
.num-9 { background: linear-gradient(135deg, #00c853, #1b5e20); }

/* Big / Small */
.size-bets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.big-btn   { background: linear-gradient(135deg, #ff9800, #e65100); box-shadow: 0 4px 15px rgba(255,152,0,0.3); }
.small-btn { background: linear-gradient(135deg, #2196f3, #0d47a1); box-shadow: 0 4px 15px rgba(33,150,243,0.3); }

/* ===== MY BETS SECTION ===== */
.my-bets-section {
  margin: 0 16px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card2);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.section-header i { width: 15px; height: 15px; }
.my-bets-list { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.empty-bets { text-align: center; color: var(--text-muted); font-size: 0.8rem; padding: 16px; }
.bet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  animation: slide-in 0.3s ease;
}
.bet-item-left { display: flex; align-items: center; gap: 8px; }
.bet-chip {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}
.bet-chip.green  { background: var(--green); }
.bet-chip.red    { background: var(--red); }
.bet-chip.violet { background: var(--violet); }
.bet-chip.big    { background: var(--big); }
.bet-chip.small  { background: var(--small); }
.bet-chip.number { background: linear-gradient(135deg, #7c4dff, #3f51b5); }
.bet-item-name { font-weight: 600; color: var(--text-primary); }
.bet-item-amount { color: var(--gold); font-weight: 600; }

@keyframes slide-in {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===== HISTORY TABLE ===== */
.history-table-section {
  margin: 0 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.tab-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn + .tab-btn { margin-left: 6px; }
.tab-btn.active {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
.history-table-wrap { overflow-x: auto; }
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.history-table th {
  padding: 10px 12px;
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-primary);
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: rgba(255,255,255,0.03); }
.loading-row { text-align: center; color: var(--text-muted); padding: 20px !important; }

.td-number {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1rem;
}
.td-color-badges { display: flex; gap: 4px; }
.color-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #fff;
}
.color-badge.green  { background: var(--green); }
.color-badge.red    { background: var(--red); }
.color-badge.violet { background: var(--violet); }
.size-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 600;
}
.size-badge.big   { background: rgba(255,152,0,0.2); color: var(--big); border: 1px solid rgba(255,152,0,0.4); }
.size-badge.small { background: rgba(33,150,243,0.2); color: var(--small); border: 1px solid rgba(33,150,243,0.4); }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slide-up 0.3s ease;
  border-top: 1px solid var(--border);
}
@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
}
.modal-close {
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text-secondary);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-close i { width: 16px; height: 16px; }
.modal-body { padding: 20px; }

/* Modal header colors */
.modal-header.green  { background: linear-gradient(135deg, rgba(0,200,83,0.2), transparent); border-bottom-color: var(--green); }
.modal-header.red    { background: linear-gradient(135deg, rgba(244,67,54,0.2), transparent); border-bottom-color: var(--red); }
.modal-header.violet { background: linear-gradient(135deg, rgba(156,39,176,0.2), transparent); border-bottom-color: var(--violet); }
.modal-header.big    { background: linear-gradient(135deg, rgba(255,152,0,0.2), transparent); border-bottom-color: var(--big); }
.modal-header.small  { background: linear-gradient(135deg, rgba(33,150,243,0.2), transparent); border-bottom-color: var(--small); }
.modal-header.number { background: linear-gradient(135deg, rgba(124,77,255,0.2), transparent); border-bottom-color: #7c4dff; }

.modal-bet-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}
.modal-bet-label { color: var(--text-muted); font-size: 0.8rem; }
.modal-bet-value { font-weight: 700; font-size: 1rem; }
.modal-bet-odds  { margin-left: auto; color: var(--gold); font-size: 0.85rem; font-weight: 600; }

.modal-section-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Multiplier */
.multiplier-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.mult-btn {
  flex: 1;
  min-width: 44px;
  padding: 7px 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.mult-btn.active, .mult-btn:hover {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

/* Amount */
.amount-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.amt-btn {
  padding: 8px 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.amt-btn:hover {
  background: rgba(255,215,0,0.15);
  border-color: var(--gold);
  color: var(--gold);
}
.custom-amount-row {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  margin-bottom: 16px;
}
.rupee-sign { color: var(--gold); font-weight: 700; font-size: 1rem; margin-right: 6px; }
.amount-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 0;
  outline: none;
}
.amount-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Bet Summary */
.bet-summary {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.summary-row:last-child { border-bottom: none; }
.summary-row span:last-child { color: var(--text-primary); font-weight: 600; }
.win-row span:last-child { color: var(--green) !important; font-size: 1rem; }

.fee-note { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 16px; }

/* Modal Actions */
.modal-actions { display: flex; gap: 10px; }
.cancel-btn {
  flex: 1;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.cancel-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.confirm-btn {
  flex: 2;
  padding: 12px;
  background: linear-gradient(135deg, #7c4dff, #3f51b5);
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(124,77,255,0.4);
}
.confirm-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.confirm-btn:active { transform: translateY(0); }
.confirm-btn i { width: 16px; height: 16px; }

/* ===== RESULT POPUP ===== */
.result-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 300;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.result-popup.active { display: flex; }
.result-popup-inner {
  background: linear-gradient(135deg, #1a0a2e, #0d1b3e);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 30px 40px;
  text-align: center;
  animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 260px;
}
@keyframes pop-in {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.result-popup-period { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }
.result-number-big {
  font-family: 'Orbitron', monospace;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 0 30px currentColor;
}
.result-colors-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.result-color-badge {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}
.result-color-badge.green  { background: var(--green); }
.result-color-badge.red    { background: var(--red); }
.result-color-badge.violet { background: var(--violet); }
.result-size-badge {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.result-win-msg {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  min-height: 28px;
}
.result-win-msg.win  { color: var(--green); }
.result-win-msg.lose { color: var(--red); }
.result-close-btn {
  background: linear-gradient(135deg, #7c4dff, #3f51b5);
  border: none;
  color: #fff;
  padding: 10px 40px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.result-close-btn:hover { filter: brightness(1.1); }

/* ===== RULES MODAL ===== */
.rules-modal-box { border-radius: 20px 20px 0 0; }
.rules-body { font-size: 0.85rem; line-height: 1.6; }
.rules-body h3 { margin-bottom: 8px; color: var(--text-primary); }
.rules-body p  { color: var(--text-secondary); margin-bottom: 16px; }
.rules-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.rules-table th {
  padding: 8px 10px;
  background: var(--bg-card2);
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.rules-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
}
.rules-table .payout { color: var(--gold); font-weight: 700; }
.rules-note {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,152,0,0.1);
  border: 1px solid rgba(255,152,0,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--big);
  font-size: 0.8rem;
}
.rules-note i { width: 16px; height: 16px; flex-shrink: 0; }

/* ===== SERVER MODAL ===== */
.server-modal-box { border-radius: 20px 20px 0 0; }
.field-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; margin-top: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.server-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.server-input:focus { border-color: var(--violet); }
.server-actions { display: flex; gap: 10px; margin-top: 20px; }
.demo-toggle-row { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.toggle-label input[type="checkbox"] { display: none; }
.toggle-slider {
  width: 40px; height: 22px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  top: 2px; left: 2px;
  transition: all 0.2s;
}
.toggle-label input:checked + .toggle-slider { background: var(--violet); border-color: var(--violet); }
.toggle-label input:checked + .toggle-slider::after { left: 20px; background: #fff; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30,30,50,0.95);
  color: var(--text-primary);
  padding: 10px 24px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  opacity: 0;
  transition: all 0.3s;
  z-index: 999;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }
.toast.info    { border-color: var(--violet); color: #a78bfa; }

/* ===== ANIMATIONS ===== */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card2) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 360px) {
  .number-buttons { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .num-btn { font-size: 0.85rem; }
  .color-bets { gap: 6px; }
  .btn-label { font-size: 0.9rem; }
}