:root {
  /* Surface — black-blue, not navy */
  --bg-base: #07080F;
  --bg-surface: #0E1018;
  --bg-elevated: #161824;
  --bg-hover: #1C1F2E;

  /* Borders — barely visible until hovered */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(139, 92, 246, 0.40);

  /* Text */
  --text-primary: #F4F4F5;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --text-disabled: #52525B;

  /* Brand — electric violet, NOT pastel */
  --brand-50:  #F5F3FF;
  --brand-400: #A78BFA;
  --brand-500: #8B5CF6;
  --brand-600: #7C3AED;
  --brand-700: #6D28D9;
  --brand-800: #5B21B6;

  /* Accent — cyan for action/info */
  --accent-cyan: #22D3EE;
  --accent-cyan-dim: #0891B2;

  /* Semantic */
  --success: #10B981;
  --warning: #F59E0B;
  --danger:  #EF4444;
  --hot:     #FB7185;

  /* Gradient — used sparingly, hero only */
  --gradient-brand: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 50%, #22D3EE 100%);
  --gradient-text:  linear-gradient(135deg, #C4B5FD 0%, #A78BFA 40%, #22D3EE 100%);

  /* Glow */
  --glow-brand: 0 0 24px rgba(139, 92, 246, 0.35);
  --glow-cyan:  0 0 24px rgba(34, 211, 238, 0.30);

  /* Shadows */
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-card-hover: 0 0 0 1px rgba(139, 92, 246, 0.45), 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.85);

  /* Type */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

/* Body baseline */
html, body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: hidden; }

/* Subtle dotted texture — applied globally */
body {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.025) 1px, transparent 0);
  background-size: 32px 32px;
  background-attachment: fixed;
}

/* Mobile-safe tables */
@media (max-width: 768px) {
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Selection */
::selection { background: rgba(139, 92, 246, 0.35); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--bg-hover); }

/* Utility classes used across pages */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-brand { box-shadow: var(--glow-brand); }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card-hover);
}

.btn-primary {
  background: var(--brand-600);
  color: #fff;
  font-weight: 600;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 150ms, transform 100ms;
}
.btn-primary:hover { background: var(--brand-500); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { background: var(--bg-elevated); color: var(--text-disabled); cursor: not-allowed; }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 150ms;
}
.btn-secondary:hover { background: var(--bg-hover); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-new     { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.badge-hot     { background: rgba(251, 113, 133, 0.15); color: #FB7185; }
.badge-pro     { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.badge-credits { background: rgba(139, 92, 246, 0.15); color: #A78BFA; }
