/* ==========================================================
   GAMESBOY.NET - CORE DESIGN SYSTEM & TOKENS
   Standard: 100% Dark Mode & Minimalist (Zero Neon, Matte Charcoal)
   ========================================================== */

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

:root {
  /* Surfaces */
  --bg-base: #0a0c10;
  --bg-surface: #11141c;
  --bg-elevated: #181c26;
  --bg-hover: #1f2533;
  --bg-subtle: #242c3d;

  /* Borders */
  --border-subtle: #1e2433;
  --border-normal: #2a3347;
  --border-focus: #3b82f6;

  /* Typography Colors */
  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #0a0c10;

  /* Accent Colors (Matte, non-neon) */
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-emerald: #10b981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.12);
  --accent-rose: #ef4444;
  --accent-rose-bg: rgba(239, 68, 68, 0.12);
  --accent-indigo: #6366f1;

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --transition-fast: 150ms ease;
  --transition-normal: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Typography Helpers */
.font-mono {
  font-family: var(--font-mono);
}
.text-muted {
  color: var(--text-muted);
}
.text-dim {
  color: var(--text-dim);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-blue);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--accent-blue-hover);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-normal);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.btn-success {
  background: var(--accent-emerald);
  color: #ffffff;
}
.btn-danger {
  background: var(--accent-rose);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-success {
  background: var(--accent-emerald-bg);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: var(--accent-amber-bg);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: var(--accent-rose-bg);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-slate {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Inputs & Form Controls */
.input, .select, .textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-normal);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

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

/* Cards & Surface Containers */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* Tables */
.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.table th {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

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

.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-normal);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-subtle);
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-close {
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}
.modal-close:hover {
  color: var(--text-main);
}
