/* ═══════════════════════════════════════════════
   WINGO Color Trading — Premium Dark Theme
   ═══════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  /* Background */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Game Colors */
  --green: #22c55e;
  --green-glow: rgba(34, 197, 94, 0.4);
  --green-bg: rgba(34, 197, 94, 0.1);
  --green-dark: #166534;

  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.4);
  --red-bg: rgba(239, 68, 68, 0.1);
  --red-dark: #991b1b;

  --violet: #a855f7;
  --violet-glow: rgba(168, 85, 247, 0.4);
  --violet-bg: rgba(168, 85, 247, 0.1);
  --violet-dark: #6b21a8;

  /* Accent */
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.3);
  --blue: #3b82f6;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-active: rgba(255, 255, 255, 0.15);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);

  /* Fonts */
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'Orbitron', monospace;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Background Particles ─── */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-particles::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(34, 197, 94, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(239, 68, 68, 0.05) 0%, transparent 50%);
  animation: bgDrift 20s ease-in-out infinite alternate;
}

@keyframes bgDrift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-3%, 3%) rotate(3deg); }
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* ─── App Container ─── */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 100px;
}

/* ─── Header ─── */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg-primary) 60%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--violet), var(--green));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.logo-w {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 20px;
  color: white;
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 22px;
  background: linear-gradient(135deg, var(--violet), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
}

.balance-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.balance-card.pulse {
  animation: balancePulse 0.6s ease;
}

@keyframes balancePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); border-color: var(--gold); box-shadow: 0 0 20px var(--gold-glow); }
  100% { transform: scale(1); }
}

.balance-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.balance-amount {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--gold);
}

/* ─── Timer Section ─── */
.timer-section {
  text-align: center;
  padding: 24px 0 16px;
}

.period-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.period-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 600;
}

.period-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  padding: 4px 16px;
  border-radius: var(--radius-sm);
  letter-spacing: 2px;
}

.timer-container {
  display: flex;
  justify-content: center;
}

.timer-ring {
  position: relative;
  width: 180px;
  height: 180px;
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-track {
  fill: none;
  stroke: var(--bg-glass);
  stroke-width: 6;
}

.timer-progress {
  fill: none;
  stroke: var(--green);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 553;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.5s ease;
  filter: drop-shadow(0 0 8px var(--green-glow));
}

.timer-progress.locked {
  stroke: var(--red);
  filter: drop-shadow(0 0 8px var(--red-glow));
}

.timer-progress.result {
  stroke: var(--violet);
  filter: drop-shadow(0 0 8px var(--violet-glow));
}

.timer-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.timer-phase {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--green);
  font-weight: 700;
  transition: color 0.3s ease;
}

.timer-phase.locked { color: var(--red); }
.timer-phase.result { color: var(--violet); }

.timer-digits {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 38px;
  color: var(--text-primary);
  letter-spacing: 2px;
  line-height: 1;
}

.timer-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── Results Strip ─── */
.results-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.results-strip::-webkit-scrollbar { display: none; }

.strip-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.strip-balls {
  display: flex;
  gap: 8px;
  flex: 1;
}

.strip-ball {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
  position: relative;
  animation: ballPop 0.4s ease-out;
  box-shadow: var(--shadow-sm);
}

.strip-ball.green { background: linear-gradient(135deg, #16a34a, #22c55e); }
.strip-ball.red { background: linear-gradient(135deg, #dc2626, #ef4444); }
.strip-ball.violet { background: linear-gradient(135deg, #9333ea, #a855f7); }
.strip-ball.red-violet {
  background: linear-gradient(135deg, #dc2626, #9333ea);
}
.strip-ball.green-violet {
  background: linear-gradient(135deg, #16a34a, #9333ea);
}

@keyframes ballPop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── Betting Section ─── */
.betting-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.betting-section.disabled {
  pointer-events: none;
  opacity: 0.5;
  filter: grayscale(0.3);
}

.bet-group {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.bet-group-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.payout-info {
  font-size: 11px;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: none;
}

/* ─── Color Buttons ─── */
.color-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.color-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.color-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: inherit;
}

.green-btn { background: var(--green-bg); }
.green-btn::before { background: linear-gradient(135deg, rgba(34,197,94,0.2), transparent); }
.green-btn:hover, .green-btn.active { border-color: var(--green); box-shadow: 0 0 20px var(--green-glow); }
.green-btn:hover::before, .green-btn.active::before { opacity: 1; }

.violet-btn { background: var(--violet-bg); }
.violet-btn::before { background: linear-gradient(135deg, rgba(168,85,247,0.2), transparent); }
.violet-btn:hover, .violet-btn.active { border-color: var(--violet); box-shadow: 0 0 20px var(--violet-glow); }
.violet-btn:hover::before, .violet-btn.active::before { opacity: 1; }

.red-btn { background: var(--red-bg); }
.red-btn::before { background: linear-gradient(135deg, rgba(239,68,68,0.2), transparent); }
.red-btn:hover, .red-btn.active { border-color: var(--red); box-shadow: 0 0 20px var(--red-glow); }
.red-btn:hover::before, .red-btn.active::before { opacity: 1; }

.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
}

.green-dot { background: linear-gradient(135deg, #16a34a, #4ade80); }
.violet-dot { background: linear-gradient(135deg, #7c3aed, #c084fc); }
.red-dot { background: linear-gradient(135deg, #dc2626, #f87171); }

.payout-tag {
  font-size: 10px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ─── Number Grid ─── */
.number-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.number-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: var(--bg-glass);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.number-btn:hover {
  border-color: var(--border-active);
  background: var(--bg-glass-hover);
  transform: translateY(-2px);
}

.number-btn.active {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 16px var(--gold-glow);
}

.num-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

.num-colors {
  display: flex;
  gap: 3px;
}

.nc {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.nc.green { background: var(--green); }
.nc.red { background: var(--red); }
.nc.violet { background: var(--violet); }

/* ─── Size Buttons ─── */
.size-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.size-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px;
  background: var(--bg-glass);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.size-btn:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.size-btn.active {
  box-shadow: 0 0 16px var(--gold-glow);
}

.small-btn.active {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
}

.big-btn.active {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.1);
}

.size-range {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ─── Amount Grid ─── */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.amount-btn {
  padding: 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.amount-btn:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.amount-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 12px var(--gold-glow);
}

.custom-amount-row {
  display: flex;
  gap: 8px;
}

.amount-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  transition: border-color 0.2s ease;
}

.amount-input-wrap:focus-within {
  border-color: var(--gold);
}

.currency-symbol {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  margin-right: 6px;
}

.amount-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  padding: 10px 0;
  width: 100%;
}

.amount-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
}

/* Hide number input spinner */
.amount-input::-webkit-inner-spin-button,
.amount-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.amount-input { -moz-appearance: textfield; }

/* ─── Place Bet Button ─── */
.place-bet-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: white;
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #a855f7);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.place-bet-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.place-bet-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.4);
}

.place-bet-btn:not(:disabled):active {
  transform: translateY(0);
}

.bet-btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
}

.place-bet-btn:not(:disabled) .bet-btn-glow {
  animation: btnShimmer 3s infinite;
}

@keyframes btnShimmer {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.bet-btn-text {
  position: relative;
  z-index: 1;
}

/* ─── Active Bets ─── */
.active-bets-section {
  margin-top: 20px;
}

.section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 12px;
}

.active-bets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.active-bet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  0% { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: translateX(0); }
}

.bet-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bet-item-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.bet-item-dot.green { background: var(--green); }
.bet-item-dot.red { background: var(--red); }
.bet-item-dot.violet { background: var(--violet); }
.bet-item-dot.number { background: var(--gold); }
.bet-item-dot.size { background: var(--blue); }

.bet-item-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.bet-item-amount {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--gold);
}

/* ─── History Table ─── */
.history-section {
  margin-top: 24px;
}

.history-table-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table thead th {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.history-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.history-table tbody tr:last-child {
  border-bottom: none;
}

.history-table tbody tr:hover {
  background: var(--bg-glass-hover);
}

.history-table td {
  padding: 10px 14px;
  color: var(--text-secondary);
}

.history-table .td-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.history-table .td-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
}

.td-color-badges {
  display: flex;
  gap: 4px;
}

.color-badge {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.color-badge.green { background: var(--green-bg); color: var(--green); }
.color-badge.red { background: var(--red-bg); color: var(--red); }
.color-badge.violet { background: var(--violet-bg); color: var(--violet); }

.size-badge {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  background: var(--bg-glass);
  color: var(--text-secondary);
}

/* ─── My Bets Section ─── */
.my-bets-section {
  margin-top: 24px;
  padding-bottom: 40px;
}

.my-bets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.my-bet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: slideIn 0.3s ease;
}

.my-bet-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.my-bet-period {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.my-bet-detail {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.my-bet-result {
  text-align: right;
}

.my-bet-amount {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.my-bet-payout {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}

.my-bet-payout.won { color: var(--green); }
.my-bet-payout.lost { color: var(--red); }

/* ─── Result Modal ─── */
.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.result-overlay.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.result-modal {
  text-align: center;
  padding: 40px 32px;
  max-width: 340px;
  width: 90%;
}

.result-ball-container {
  margin-bottom: 24px;
}

.result-ball {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: resultBounce 0.8s ease;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  position: relative;
}

.result-ball::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 20%;
  width: 30%;
  height: 20%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  filter: blur(4px);
}

.result-ball.green { background: linear-gradient(135deg, #16a34a, #4ade80); box-shadow: 0 0 60px var(--green-glow); }
.result-ball.red { background: linear-gradient(135deg, #dc2626, #f87171); box-shadow: 0 0 60px var(--red-glow); }
.result-ball.violet { background: linear-gradient(135deg, #7c3aed, #c084fc); box-shadow: 0 0 60px var(--violet-glow); }
.result-ball.red-violet { background: linear-gradient(135deg, #dc2626, #9333ea); box-shadow: 0 0 60px var(--violet-glow); }
.result-ball.green-violet { background: linear-gradient(135deg, #16a34a, #9333ea); box-shadow: 0 0 60px var(--violet-glow); }

@keyframes resultBounce {
  0% { transform: scale(0) rotate(-180deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(10deg); }
  80% { transform: scale(0.95) rotate(-5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.result-number {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 48px;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.result-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.result-colors {
  display: flex;
  gap: 6px;
}

.result-size {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result-outcome {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-outcome.won {
  color: var(--green);
}

.result-outcome.lost {
  color: var(--text-muted);
}

.result-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ─── Toast Notifications ─── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: white;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  box-shadow: var(--shadow-md);
  max-width: 320px;
}

.toast.success { background: rgba(34, 197, 94, 0.9); }
.toast.error { background: rgba(239, 68, 68, 0.9); }
.toast.info { background: rgba(59, 130, 246, 0.9); }
.toast.warning { background: rgba(245, 158, 11, 0.9); }

@keyframes toastIn {
  0% { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* ─── Responsive ─── */
@media (max-width: 380px) {
  .number-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .number-btn { padding: 8px 2px; }
  .num-value { font-size: 16px; }
  .timer-digits { font-size: 32px; }
  .timer-ring { width: 160px; height: 160px; }
  .amount-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .app-container {
    max-width: 520px;
  }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-active);
}

/* ─── Selection ─── */
::selection {
  background: rgba(168, 85, 247, 0.3);
  color: white;
}
