/* ============================================
   GameCalcHub.org — Global CSS
   Design system: dark gaming aesthetic
   Accent: lime green (#a3e635) — fresh, game-feel
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

img, video {
  max-width: 100%;
  display: block;
}

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

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

ul, ol {
  list-style: none;
}

/* === CSS VARIABLES — DARK (default) === */
:root {
  /* Colors */
  --bg-root:        #0a0a0a;
  --bg-surface:     #141414;
  --bg-card:        #1c1c1c;
  --bg-card-hover:  #222222;
  --bg-input:       #181818;

  --border:         #2a2a2a;
  --border-focus:   #a3e635;

  --text-primary:   #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted:     #555555;

  --accent:         #a3e635;
  --accent-dim:     #6b9e1a;
  --accent-glow:    rgba(163, 230, 53, 0.15);

  --danger:         #ef4444;
  --warning:        #f59e0b;
  --success:        #22c55e;

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

  /* Scale */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.6);
  --shadow-accent: 0 0 20px rgba(163, 230, 53, 0.2);

  /* Transitions */
  --transition-fast: 0.1s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Layout */
  --max-width: 1280px;
  --nav-height: 60px;
}

/* === LIGHT MODE === */
[data-theme="light"] {
  --bg-root:        #f8f9fa;
  --bg-surface:     #ffffff;
  --bg-card:        #f1f3f5;
  --bg-card-hover:  #e9ecef;
  --bg-input:       #ffffff;

  --border:         #dee2e6;
  --border-focus:   #5a9e0a;

  --text-primary:   #111111;
  --text-secondary: #444444;
  --text-muted:     #888888;

  --accent:         #5a9e0a;
  --accent-dim:     #3d6e07;
  --accent-glow:    rgba(90, 158, 10, 0.1);

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.12);
  --shadow-accent: 0 0 20px rgba(90, 158, 10, 0.15);
}

/* === BASE === */
body {
  background-color: var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

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 {
  color: var(--text-secondary);
  line-height: 1.7;
}

.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }
.text-center { text-align: center; }
.font-mono   { font-family: var(--font-mono); }

/* === LAYOUT === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container { padding: 0 var(--space-8); }
}

.section {
  padding: var(--space-12) 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: 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); }

/* === CARD === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.card-sm {
  padding: var(--space-4);
  border-radius: var(--radius-md);
}

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

.badge-accent {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}

.badge-muted {
  background: var(--border);
  color: var(--text-secondary);
}

/* === DIVIDER === */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-6) 0;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

/* === SELECTION === */
::selection {
  background: var(--accent-glow);
  color: var(--accent);
}

/* === FOCUS === */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* === UTILITIES === */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.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-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); }

/* === ACCENT LINE — signature element === */
/* A thin lime green top border on key sections,
   the single recurring motif across the site */
.accent-line {
  border-top: 2px solid var(--accent);
  padding-top: var(--space-4);
}

.accent-dot::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: var(--space-2);
  vertical-align: middle;
}

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