/* =========================================================
   design-system.css — TriviaGames Player UI
   Modern Arcade / Synthwave + Corporate Dark Mode
   ========================================================= */

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

/* ── CSS Custom Properties ── */
:root {
  /* Backgrounds */
  --bg-base:       #0b0c10;
  --bg-card:       rgba(15, 23, 42, 0.6);   /* slate-900 / 60% */
  --bg-card-solid: #0f172a;
  --bg-overlay:    rgba(11, 12, 16, 0.85);

  /* Accent Colors */
  --cyan-400:    #22d3ee;
  --cyan-500:    #06b6d4;
  --fuchsia-400: #e879f9;
  --fuchsia-500: #d946ef;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --red-500:     #ef4444;
  --orange-500:  #f97316;
  --amber-400:   #fbbf24;

  /* Text */
  --text-primary:   #f1f5f9;  /* slate-100 */
  --text-secondary: #cbd5e1;  /* slate-300 */
  --text-muted:     #94a3b8;  /* slate-400 */

  /* Borders */
  --border-subtle: rgba(51, 65, 85, 0.6);  /* slate-700 / 60% */
  --border-accent: rgba(34, 211, 238, 0.3);

  /* Glow */
  --glow-cyan:    0 0 20px rgba(34, 211, 238, 0.25);
  --glow-fuchsia: 0 0 20px rgba(232, 121, 249, 0.25);

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Transitions */
  --transition: all 0.2s ease;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Animated background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Glass Card ── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card--glow {
  box-shadow: var(--glow-cyan);
  border-color: var(--border-accent);
}

/* ── Gradient top border (modal/special cards) ── */
.gradient-top-border {
  position: relative;
  overflow: hidden;
}
.gradient-top-border::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan-500), var(--fuchsia-500));
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover  { transform: scale(1.05); }
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--cyan-500);
  color: #0b0c10;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}
.btn-primary:hover { background: var(--cyan-400); box-shadow: 0 0 25px rgba(34, 211, 238, 0.5); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover { color: var(--text-primary); border-color: var(--cyan-500); }

.btn-danger {
  background: var(--red-500);
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-md); }
.btn-full { width: 100%; }

/* ── Status Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-emerald { background: rgba(6, 78, 59, 0.5); color: var(--emerald-400); border: 1px solid rgba(52, 211, 153, 0.3); }
.badge-red     { background: rgba(127, 29, 29, 0.5); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-amber   { background: rgba(120, 53, 15, 0.5); color: var(--amber-400); border: 1px solid rgba(251, 191, 36, 0.3); }
.badge-cyan    { background: rgba(8, 51, 68, 0.5); color: var(--cyan-400); border: 1px solid rgba(34, 211, 238, 0.3); }

/* ── Typography helpers ── */
.text-gradient {
  background: linear-gradient(135deg, var(--cyan-400), var(--fuchsia-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mono { font-family: var(--font-mono); }

/* ── Input ── */
.input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}
.input:focus { border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15); }
.input::placeholder { color: var(--text-muted); }

/* ── Alert / Error banner ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(127, 29, 29, 0.4); border: 1px solid rgba(239, 68, 68, 0.4); color: #fca5a5; }
.alert-success { background: rgba(6, 78, 59, 0.4); border: 1px solid rgba(52, 211, 153, 0.4); color: #6ee7b7; }

/* ── Pulse animation ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ── Spin animation ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }

/* ── Slide-in from bottom ── */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.slide-in-up { animation: slideInUp 0.5s ease forwards; }

/* ── Glow text ── */
.glow-cyan    { text-shadow: 0 0 20px rgba(34, 211, 238, 0.6); }
.glow-fuchsia { text-shadow: 0 0 20px rgba(232, 121, 249, 0.6); }

/* ── Layout helpers ── */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}
.flex-center { display: flex; align-items: center; justify-content: center; }
.full-page   { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar        { width: 4px; height: 4px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: rgba(34,211,238,.25); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(34,211,238,.5); }
* { scrollbar-width: thin; scrollbar-color: rgba(34,211,238,.25) transparent; }
