/* ============================================
   Base Element Styles
   ============================================ */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* ---- Headings ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
}

h1 { font-size: var(--text-4xl); font-weight: var(--weight-black); }
h2 { font-size: var(--text-3xl); font-weight: var(--weight-extrabold); }
h3 { font-size: var(--text-2xl); font-weight: var(--weight-bold); }
h4 { font-size: var(--text-xl); font-weight: var(--weight-bold); }

@media (max-width: 768px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  h4 { font-size: var(--text-lg); }
}

/* ---- Links ---- */
a {
  color: var(--color-cyan);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

/* ---- Text ---- */
p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

small {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

strong {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

/* ---- Code ---- */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-elevated);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

/* ---- Horizontal Rule ---- */
hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: var(--space-8) 0;
}

/* ---- Selection ---- */
::selection {
  background: rgba(var(--color-primary-rgb), 0.3);
  color: var(--text-primary);
}

/* ---- Scrollbar (Webkit) ---- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-primary);
}

/* ---- Images ---- */
img {
  height: auto;
  object-fit: cover;
}

/* ---- Score / Number Display ---- */
.score-display {
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
}
