/*
 * QuantrazGG Design System
 * Version: 1.0
 * Created: 2026-03-26
 * 
 * Color Palette: Dark Navy + Gold (matching quantrazgg.com)
 * Typography: Orbitron (display) + Inter (body)
 */

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

/* ===== CSS VARIABLES ===== */
:root {
  /* Background Colors */
  --bg-primary: #0f1729;        /* Dark navy - main background */
  --bg-secondary: #1a2332;      /* Slightly lighter navy */
  --bg-card: #243044;           /* Card/panel backgrounds */
  --bg-card-hover: #2d3b52;     /* Card hover state */
  --bg-input: #0a0f18;          /* Input field backgrounds */
  --bg-light: #F5F5F7;          /* Light sections (if needed) */
  
  /* Accent Colors */
  --accent: #CBC493;            /* Electric blue - primary accent */
  --accent-soft: #d4cfa8;       /* Lighter blue for hover */
  --accent-dark: #b5ae82;       /* Darker blue for active */
  --accent-glow: rgba(203, 196, 147, 0.3);  /* Glow effect */
  --accent-subtle: rgba(203, 196, 147, 0.1); /* Very subtle accent */
  
  /* Text Colors */
  --text-primary: rgba(255, 255, 255, 0.95);   /* Primary text on dark */
  --text-secondary: rgba(255, 255, 255, 0.70); /* Secondary text */
  --text-muted: rgba(255, 255, 255, 0.45);     /* Muted/disabled text */
  --text-dark: #1A1A2E;         /* Text on light backgrounds */
  --text-accent: #CBC493;       /* Accent colored text */
  
  /* Functional Colors */
  --success: #00C853;           /* Green - success states */
  --success-soft: rgba(0, 200, 83, 0.2);
  --warning: #FFB300;           /* Amber - warnings */
  --warning-soft: rgba(255, 179, 0, 0.2);
  --error: #FF5252;             /* Red - errors */
  --error-soft: rgba(255, 82, 82, 0.2);
  --info: #CBC493;              /* Blue - info (same as accent) */
  
  /* Game-Specific Colors */
  --wheel-red: #E53935;         /* Roulette red */
  --wheel-black: #212121;       /* Roulette black */
  --wheel-green: #43A047;       /* Roulette green (0, 00) */
  --gold: #FFD700;              /* Gold for special elements */
  --gold-soft: rgba(255, 215, 0, 0.2);
  
  /* Typography */
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Font Sizes */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  
  /* Spacing */
  --space-1: 0.25rem;     /* 4px */
  --space-2: 0.5rem;      /* 8px */
  --space-3: 0.75rem;     /* 12px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-8: 2rem;        /* 32px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-16: 4rem;       /* 64px */
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);
  --shadow-glow-strong: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-glow);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  
  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 1000;
  --z-tooltip: 1100;
}

/* ===== RESET & BASE STYLES ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-4);
  color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin: 0 0 var(--space-4);
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-soft);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-glow);
}

/* Secondary/Ghost Button */
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--accent);
  color: var(--bg-primary);
}

/* Danger Button */
.btn-danger {
  background: var(--error);
  color: white;
  border-color: var(--error);
}

.btn-danger:hover:not(:disabled) {
  background: #FF7070;
  border-color: #FF7070;
}

/* Success Button */
.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-success:hover:not(:disabled) {
  background: #00E064;
  border-color: #00E064;
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-subtle);
}

.card-header {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

/* ===== PANELS ===== */
.panel {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.panel-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ===== FORMS ===== */
input, select, textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

input::placeholder {
  color: var(--text-muted);
}

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

th, td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: var(--text-xs);
  background: var(--bg-input);
}

tr:hover td {
  background: var(--bg-card-hover);
}

/* ===== MODALS/POPUPS ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}

.modal {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
  color: var(--text-primary);
}

/* ===== ALERTS ===== */
.alert {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.alert-success {
  background: var(--success-soft);
  border: 1px solid var(--success);
  color: var(--success);
}

.alert-warning {
  background: var(--warning-soft);
  border: 1px solid var(--warning);
  color: var(--warning);
}

.alert-error {
  background: var(--error-soft);
  border: 1px solid var(--error);
  color: var(--error);
}

.alert-info {
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--radius-full);
}

.badge-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: var(--bg-primary);
}

.badge-error {
  background: var(--error);
  color: white;
}

/* ===== GAME-SPECIFIC STYLES ===== */

/* Spin Button - Special styling */
.spin-button {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  padding: var(--space-4) var(--space-10);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 3px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-glow);
}

.spin-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-strong);
}

.spin-button:active {
  transform: translateY(0);
}

/* Skip Turn Button */
.skip-button {
  background: linear-gradient(135deg, var(--error) 0%, #CC4444 100%);
}

/* Team Colors */
.team-yes { color: var(--success); }
.team-no { color: var(--error); }

/* Coin/Token Display */
.token-display {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
}

.token-icon {
  width: 24px;
  height: 24px;
}

.token-value {
  font-size: var(--text-xl);
  color: var(--gold);
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes glow {
  0%, 100% { box-shadow: var(--shadow-glow); }
  50% { box-shadow: var(--shadow-glow-strong); }
}

.animate-fadeIn { animation: fadeIn var(--transition-base); }
.animate-slideUp { animation: slideUp var(--transition-base); }
.animate-pulse { animation: pulse 2s infinite; }
.animate-glow { animation: glow 2s infinite; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root {
    --text-4xl: 1.875rem;
    --text-3xl: 1.5rem;
    --text-2xl: 1.25rem;
  }
  
  .btn {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-xs);
  }
  
  .card, .panel {
    padding: var(--space-4);
  }
  
  .modal {
    padding: var(--space-4);
    margin: var(--space-4);
    max-width: calc(100vw - var(--space-8));
  }
}

@media (max-width: 480px) {
  body {
    font-size: var(--text-sm);
  }
  
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  h3 { font-size: var(--text-lg); }
}
