@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/*
 * Orbit Crash - Global Styles
 * Modern, space-themed UI with responsive desktop and mobile layouts.
 * Uses Tailwind-inspired utility classes and CSS Grid/Flexbox.
 */

:root {
  --bg-dark: #0b081a;
  --bg-panel: #0f0b20;
  --bg-card: #1a1635;
  --bg-accent: #12142b;
  --primary: #7b61ff;
  --primary-hover: #8b75ff;
  --emerald: #10b981;
  --red: #ef4444;
  --text-main: #ffffff;
  --text-muted: #a09db0;
  --border-color: rgba(255, 255, 255, 0.05);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  user-select: none;
}

#app {
  min-height: 100vh;
  background-color: var(--bg-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}

@media (min-width: 1024px) {
  #app {
    padding: 2rem;
  }
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: var(--bg-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 4rem;
  height: 4rem;
  border: 4px solid rgba(123, 97, 255, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.loading-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
}

.loading-text {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.5rem;
  animation: pulse 2s infinite;
}

/* Main Layout */
.game-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: radial-gradient(circle at center, #0a1931 0%, #02050f 100%);
  border-radius: 1.5rem;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .game-container {
    max-width: 1440px;
    display: grid;
    grid-template-columns: 1fr 380px;
    grid-template-rows: auto auto 1fr;
    grid-template-areas: 
      "history history"
      "main controls"
      "main sidebar";
    align-items: stretch;
    height: calc(100vh - 4rem);
    gap: 1rem;
    padding: 1rem;
  }
}

/* Left Column (Main Game Area on Mobile, Right Area on Desktop) */
.game-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 1024px) {
  .game-main {
    grid-area: main;
    background-color: rgba(26, 22, 53, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
  }
}

.history-bar {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(18, 20, 43, 0.3);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 1024px) {
  .history-bar {
    grid-area: history;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
  }
}

#history-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0;
}

.history-item {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.history-purple { color: #c084fc; background-color: rgba(168, 85, 247, 0.1); }
.history-yellow { color: #facc15; background-color: rgba(234, 179, 8, 0.2); }
.history-pink { color: #f472b6; background-color: rgba(236, 72, 153, 0.1); }
.history-emerald { color: #34d399; background-color: rgba(16, 185, 129, 0.1); }
.history-blue { color: #60a5fa; background-color: rgba(59, 130, 246, 0.1); }
.history-red { color: #f87171; background-color: rgba(239, 68, 68, 0.1); }
.history-orange { color: #fb923c; background-color: rgba(249, 115, 22, 0.1); }

/* Mobile Header */
.mobile-header {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .mobile-header {
    display: none;
  }
}

.balance-badge {
  background-color: var(--bg-accent);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.balance-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--emerald);
  animation: pulse 2s infinite;
}

.balance-amount {
  font-size: 0.875rem;
  font-weight: 900;
  color: #fff;
}

.icon-btn {
  color: var(--text-muted);
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
}

.icon-btn:hover {
  color: white;
}

/* Graph Area */
.graph-area {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
}

@media (min-width: 1024px) {
  .graph-area {
    padding: 0;
  }
}

.graph-container {
  width: 100%;
  height: 100%;
  min-height: 250px;
  background-color: transparent;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (min-width: 1024px) {
  .graph-container {
    min-height: 400px;
    border-radius: 2rem;
  }
}

.graph-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.graph-overlay > * {
  pointer-events: auto;
}

.orbital-scene {
  position: absolute;
  inset: 0;
  z-index: 10;
}

/* Multiplier Display */
#multiplier-container {
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  z-index: 40;
  pointer-events: none;
}

@media (min-width: 1024px) {
  #multiplier-container {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
  }
}

.multiplier-display {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: white;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
  transition: color 0.5s ease, text-shadow 0.5s ease;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .multiplier-display {
    font-size: 5rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
  }
}

.multiplier-display.flew-away {
  color: #ef4444 !important; /* Red for flew away */
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.6) !important;
}

.mult-100 { 
  color: #10b981; /* Emerald/Green */
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.6); 
}
.mult-10 { 
  color: #f472b6; /* Pink */
  text-shadow: 0 0 15px rgba(244, 114, 182, 0.4);
}
.mult-2 { 
  color: #34d399; /* Light Green */
}

/* Popups */
#cashout-popups {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-end;
  z-index: 20;
  max-height: 80%;
  overflow: hidden;
  pointer-events: none;
}

.cashout-popup {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cashout-popup.user-cashout {
  background-color: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
}

.popup-user {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
}

.user-cashout .popup-user {
  color: #6ee7b7;
}

.popup-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.popup-mult {
  font-size: 10px;
  color: var(--emerald);
  font-weight: 900;
}

.popup-amount {
  font-size: 10px;
  color: white;
  font-weight: 900;
}

/* System Notifications */
#system-notifications {
  position: absolute;
  left: 50%;
  top: 25%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  z-index: 30;
  pointer-events: none;
}

.system-notification {
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-width: 1px;
}

.system-notification.cash_out {
  background-color: rgba(16, 185, 129, 0.9);
  border-color: #34d399;
}

.system-notification.lose {
  background-color: rgba(239, 68, 68, 0.9);
  border-color: #f87171;
}

.system-notification.bet_accept {
  background-color: rgba(123, 97, 255, 0.9);
  border-color: #9d85ff;
}

.notif-title {
  font-size: 0.75rem;
  font-weight: 900;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.notif-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.notif-mult {
  font-size: 1.125rem;
  font-weight: 900;
  color: white;
  line-height: 1;
  margin-top: 0.25rem;
}

.notif-amount {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

.notif-amount-main {
  font-size: 0.875rem;
  font-weight: 900;
  color: white;
  margin-top: 0.125rem;
}

/* Waiting State */
#waiting-state {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#countdown-display {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1;
  margin-bottom: 0.25rem;
  text-shadow: 0 0 20px rgba(123, 97, 255, 0.4);
}

@media (min-width: 1024px) {
  #countdown-display {
    font-size: 80px;
  }
}

.waiting-text {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (min-width: 1024px) {
  .waiting-text {
    font-size: 0.875rem;
  }
}

.progress-container {
  width: 12rem;
  height: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .progress-container {
    width: 16rem;
  }
}

#progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-color: var(--primary);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(123, 97, 255, 0.5);
  width: var(--progress, 0%);
  transition: width 0.1s linear;
}

/* Game State */
#game-state {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#crashed-text {
  color: #22d3ee;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 1rem;
  animation: pulse 2s infinite;
  text-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
}

@media (min-width: 1024px) {
  #crashed-text {
    font-size: 2.25rem;
  }
}

/* Right Column: Controls */
.game-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .game-controls {
    grid-area: controls;
    width: 100%;
  }
}

.desktop-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-accent);
  padding: 1rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
  .desktop-header {
    display: flex;
  }
}

.control-panels {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  overflow-y: auto;
}

@media (min-width: 1024px) {
  .control-panels {
    padding: 0;
    flex-direction: column;
    overflow-y: visible;
  }
  
  .bet-panel {
    width: 100%;
  }
}

.bet-panel {
  background-color: rgba(26, 22, 53, 0.4);
  backdrop-filter: blur(12px);
  padding: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 1024px) {
  .bet-panel:hover {
    border-color: rgba(123, 97, 255, 0.3);
  }
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}

.auto-controls {
  display: flex;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  cursor: pointer;
}

.checkbox-indicator {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background-color: transparent;
}

.checkbox-indicator.checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.check-dot {
  width: 0.25rem;
  height: 0.25rem;
  background-color: white;
  border-radius: 50%;
}

.autocashout-input-container {
  background-color: var(--bg-panel);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-prefix {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
  margin-right: 0.25rem;
}

.autocashout-input {
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  color: white;
  width: 2.5rem;
  text-align: center;
  border: none;
  outline: none;
}

.panel-main {
  display: flex;
  gap: 0.5rem;
}

.bet-input-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.bet-input-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-panel);
  border-radius: 0.5rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.125rem;
}

.step-btn {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s;
  border: none;
  cursor: pointer;
}

.step-btn:hover {
  color: white;
}

.step-btn.decrement {
  background-color: #2d2d5a;
}

.step-btn.increment {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 0 8px rgba(123, 97, 255, 0.3);
}

.bet-amount-input {
  flex: 1;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  border: none;
  outline: none;
  width: 100%;
}

.quick-bets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
}

.quick-bet-btn {
  padding: 0.25rem 0;
  background-color: rgba(45, 45, 90, 0.4);
  border-radius: 0.375rem;
  font-size: 9px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
  cursor: pointer;
}

.quick-bet-btn:hover {
  border-color: rgba(123, 97, 255, 0.2);
}

.action-btn {
  width: 90px;
  border-radius: 0.5rem;
  font-weight: 900;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: white;
  border: none;
  cursor: pointer;
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn.bet {
  background: linear-gradient(to bottom, #8b75ff, #6b51ff);
  box-shadow: 0 2px 10px rgba(107, 81, 255, 0.2);
}

.action-btn.cashout {
  background: linear-gradient(to bottom, #34d399, #059669);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.action-btn.cancel {
  background: linear-gradient(to bottom, #f87171, #dc2626);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
}

.action-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
}

.action-text {
  font-size: 1.125rem;
  line-height: 1;
}

.action-text.text-sm {
  font-size: 0.875rem;
}

.action-sub {
  font-size: 8px;
  font-weight: 700;
  margin-top: 0.125rem;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

/* Tabs and Footer */
.game-footer {
  padding: 0.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 400px;
}

@media (min-width: 1024px) {
  .game-footer {
    grid-area: sidebar;
    padding: 0;
    height: 100%;
    min-height: 0;
    background-color: rgba(26, 22, 53, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
  }
  
  .tabs-nav {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.2);
  }
  
  .tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .tab-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .tab-scroll-area {
    flex: 1;
  }
}

.tabs-nav {
  display: flex;
  background-color: var(--bg-panel);
  border-radius: 9999px;
  padding: 0.125rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.tab-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  transition: all 0.2s;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.tab-btn:hover {
  color: rgba(255, 255, 255, 0.6);
}

.tab-btn.active {
  background-color: #251d45;
  color: white;
}

.tab-content {
  background-color: var(--bg-accent);
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 400px;
}

.tab-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tab-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1a1c3d;
}

.total-bets-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-dot-container {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: var(--emerald);
}

.live-text {
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
}

.tab-scroll-area {
  flex: 1;
  overflow-y: auto;
}

table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}

thead {
  position: sticky;
  top: 0;
  background-color: var(--bg-accent);
  z-index: 10;
}

th {
  padding: 0.5rem 1rem;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

td {
  padding: 0.5rem 1rem;
  font-size: 11px;
}

.user-bet-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-color: rgba(16, 185, 129, 0.05);
}

.user-name {
  font-weight: 700;
  color: #34d399;
}

.bot-bet-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s;
}

.bot-bet-row:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.bot-name {
  color: var(--text-muted);
}

.bet-amount {
  color: rgba(255, 255, 255, 0.5);
}

.mult-badge {
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-weight: 900;
}

.win-amount {
  font-weight: 900;
  color: white;
}

.win-amount.win {
  color: var(--emerald);
}

.empty-table {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* Top Tab Specifics */
.top-filters {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 0.5rem;
  background-color: #1a1c3d;
}

.filter-select {
  flex: 1;
  background-color: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 10px;
  font-weight: 700;
  color: white;
  outline: none;
}

.filter-select:focus {
  border-color: rgba(123, 97, 255, 0.5);
}

.top-bets-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.top-bet-card {
  background-color: #1a1c3d;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
}

.bet-date {
  color: var(--text-muted);
}

.bet-details {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.detail {
  color: rgba(255, 255, 255, 0.4);
}

.detail .val {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

.detail .val.mult {
  color: var(--emerald);
}

.divider {
  width: 1px;
  height: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-container {
  background-color: #1a1c3d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 32rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.step-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.step-title {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.step-title.emerald { color: #34d399; }
.step-title.pink { color: #f472b6; }
.step-title.yellow { color: #facc15; }
.step-title.purple { color: var(--primary); }

.step-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.625;
}

.modal-footer {
  padding: 1.5rem;
  background-color: var(--bg-accent);
}

.modal-btn {
  width: 100%;
  padding: 1rem 0;
  background-color: var(--primary);
  border-radius: 1rem;
  font-weight: 900;
  color: white;
  box-shadow: 0 0 20px rgba(123, 97, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: filter 0.2s;
}

.modal-btn:hover {
  filter: brightness(1.1);
}

/* Utils */
.hidden { display: none !important; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Custom animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* Continuous Animations */
.earth-map { animation: spinEarth 24s linear infinite; }
.rocket-orbit { transform-origin: 400px 400px; }
.flame-inner { transform-origin: 0px 0px; animation: flicker 0.08s linear infinite alternate; }
.flame-outer { transform-origin: 0px 0px; animation: flicker 0.12s linear infinite alternate-reverse; }
.stars-back { transform-origin: 400px 400px; animation: rotateStars 120s linear infinite, twinkle 8s ease-in-out infinite; }
.stars-mid { transform-origin: 400px 400px; animation: rotateStars 80s linear infinite reverse, twinkle 6s ease-in-out infinite 1s; }
.stars-front { transform-origin: 400px 400px; animation: rotateStars 40s linear infinite, twinkle 4s ease-in-out infinite 0.5s; }
.nebula-back { transform-origin: 400px 400px; animation: rotateStars 200s linear infinite; }
.nebula-mid { transform-origin: 400px 400px; animation: rotateStars 140s linear infinite reverse; }

.shooting-star {
  animation: shootingStar 10s linear infinite;
}

.shooting-star:nth-child(1) { animation-delay: 2s; }
.shooting-star:nth-child(2) { animation-delay: 5s; }
.shooting-star:nth-child(3) { animation-delay: 8s; }

@keyframes shootingStar {
  0% { transform: translateX(0) translateY(0); opacity: 0; }
  10% { opacity: 1; }
  20% { transform: translateX(1200px) translateY(200px); opacity: 0; }
  100% { transform: translateX(1200px) translateY(200px); opacity: 0; }
}

@keyframes rotateStars { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes twinkle {
  0%, 100% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}
@keyframes spinEarth { 0% { transform: translateX(0px); } 100% { transform: translateX(600px); } }
@keyframes flicker { 0% { transform: scaleX(0.85) scaleY(0.9); opacity: 0.8; } 100% { transform: scaleX(1.15) scaleY(1.1); opacity: 1; } }
@keyframes shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-4px, -2px) rotate(-2deg); }
  20%, 40%, 60%, 80% { transform: translate(4px, 2px) rotate(2deg); }
}
.animate-shake { animation: shake 0.1s linear infinite; }

svg { display: block; width: 100%; height: 100%; }

