/* ============================================================
   STYLE.CSS – Global stylesheet master import
   Simulador Examen CR
   ============================================================ */

@import url('variables.css');
@import url('reset.css');
@import url('typography.css');
@import url('layout.css');
@import url('animations.css');
@import url('components.css');
@import url('utilities.css');
@import url('responsive.css');
@import url('simulator.css');

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  display: flex;
  align-items: center;
  /* safe-area for iPhone notch / Dynamic Island */
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  background: rgba(248, 250, 252, 0.8);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    height           var(--anim-duration-base) var(--anim-easing),
    background       var(--anim-duration-base) var(--anim-easing),
    box-shadow       var(--anim-duration-base) var(--anim-easing),
    border-color     var(--anim-duration-base) var(--anim-easing);
}

[data-theme="dark"] .header {
  background: rgba(2, 6, 23, 0.85);
  border-color: var(--color-border);
}

.header.scrolled {
  height: var(--header-height-shrunk);
  box-shadow: var(--shadow-md);
  border-color: transparent;
  background: rgba(248, 250, 252, 0.92);
}

[data-theme="dark"] .header.scrolled {
  background: rgba(2, 6, 23, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  transition: opacity var(--anim-duration-fast) var(--anim-easing);
}
.logo:hover { opacity: 0.8; }

.logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), #8B5CF6);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
/* Logo text: hide on very small phones to save space */
.logo-text {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  white-space: nowrap;
}
@media (max-width: 359px) {
  .logo-text { display: none; }
}

/* Desktop Nav — hidden by default (mobile-first), shown at md via responsive.css */
.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: color var(--anim-duration-fast) var(--anim-easing),
              background-color var(--anim-duration-fast) var(--anim-easing);
}
.nav-link:hover    { color: var(--color-text); background: var(--color-bg-subtle); }
.nav-link.active   { color: var(--color-primary); }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--anim-duration-fast) var(--anim-easing);
}
.theme-toggle:hover { background: var(--color-bg-subtle); color: var(--color-text); }

/* Hamburger */
.hamburger {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--color-text-muted);
}
.hamburger:hover { background: var(--color-bg-subtle); }
.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transform-origin: center;
  transition: transform var(--anim-duration-base) var(--anim-easing),
              opacity var(--anim-duration-base) var(--anim-easing);
}
.hamburger.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav Drawer */
.nav-mobile {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  /* safe-area so it doesn't go behind home indicator on iPhone */
  padding-bottom: max(var(--space-6), env(safe-area-inset-bottom, var(--space-6)));
  padding-left:   max(var(--space-6), env(safe-area-inset-left, var(--space-6)));
  padding-right:  max(var(--space-6), env(safe-area-inset-right, var(--space-6)));
  padding-top: var(--space-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  z-index: calc(var(--z-header) - 1);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition:
    transform   var(--anim-duration-base) var(--anim-easing-out),
    opacity     var(--anim-duration-base) var(--anim-easing-out),
    visibility  var(--anim-duration-base) var(--anim-easing-out);
}
.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.nav-mobile .nav-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-1);
}
.nav-mobile .btn { width: 100%; justify-content: center; margin-top: var(--space-4); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  /* On mobile the hero handles its own top offset. On tablet+ it's overridden by responsive.css */
  padding-top: calc(var(--header-height) + var(--space-12));
  padding-bottom: var(--space-12);
  overflow: hidden;
  position: relative;
}

@media (min-width: 768px) {
  .hero {
    padding-top: calc(var(--header-height) + var(--space-20));
    padding-bottom: var(--space-20);
  }
}

/* Subtle grid/mesh background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(37,99,235,0.07) 0%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(139,92,246,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  position: relative;
  z-index: 1;
}

@media (min-width: 1024px) {
  .hero-layout { grid-template-columns: 1fr 1fr; align-items: center; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary-50);
  border: 1px solid var(--color-primary-200);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  margin-bottom: var(--space-6);
}
[data-theme="dark"] .hero-badge {
  background: rgba(37,99,235,0.12);
  border-color: rgba(37,99,235,0.3);
}
.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: 500px;
  margin-bottom: var(--space-8);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
.hero-trust-avatars {
  display: flex;
  margin-right: var(--space-1);
}
.hero-trust-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-surface);
  margin-left: -8px;
  background: linear-gradient(135deg, var(--color-primary-light), #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
}
.hero-trust-avatar:first-child { margin-left: 0; }
.hero-trust-text { font-size: var(--text-sm); color: var(--color-text-muted); }
.hero-trust-text strong { color: var(--color-text); }

/* Hero Visual / Stats Panel */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hero-stats-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}
.hero-stats-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), #8B5CF6);
}
.hero-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.hero-stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: 1;
}
.hero-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-mini-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
}
.hero-mini-card .badge { font-size: 10px; }

/* ============================================================
   SECTIONS – Home page
   ============================================================ */

/* Section header */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-16);
}
.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.section-title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.section-desc {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* Benefits */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}
.benefit-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  transition: all var(--anim-duration-base) var(--anim-easing);
}
.benefit-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-200);
  transform: translateY(-3px);
}
.benefit-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--color-primary-50);
  color: var(--color-primary);
}
[data-theme="dark"] .benefit-icon-wrap {
  background: rgba(37,99,235,0.12);
}
.benefit-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.benefit-desc { font-size: var(--text-sm); color: var(--color-text-muted); line-height: var(--leading-relaxed); }

/* How it works */
.steps-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-8);
  position: relative;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}
.step-number {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  flex-shrink: 0;
}
.step-title { font-size: var(--text-base); font-weight: var(--font-weight-semibold); color: var(--color-text); }
.step-desc  { font-size: var(--text-sm); color: var(--color-text-muted); line-height: var(--leading-relaxed); }

/* Stats counter section */
.stats-section {
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  border-radius: var(--radius-2xl);
  padding: var(--space-16) var(--space-12);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E");
  pointer-events: none;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-8);
  position: relative;
}
.counter-item {}
.counter-value {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: var(--font-weight-bold);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.counter-label { font-size: var(--text-sm); opacity: 0.8; font-weight: var(--font-weight-medium); }

/* FAQ */
.faq-section { max-width: 720px; margin-inline: auto; }

/* CTA */
.cta-section {
  text-align: center;
  padding: var(--space-20) var(--space-6);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-border);
}
.cta-title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.cta-desc {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 500px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}
.cta-actions { display: flex; justify-content: center; gap: var(--space-4); flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) 0 var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}
/* Footer responsive rules are in responsive.css (mobile-first) */

.footer-brand-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-top: var(--space-4);
  max-width: 260px;
}
.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--anim-duration-fast) var(--anim-easing);
}
.social-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-50);
}
[data-theme="dark"] .social-link:hover { background: rgba(37,99,235,0.12); }

.footer-col-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.footer-links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--anim-duration-fast) var(--anim-easing);
}
.footer-link:hover { color: var(--color-primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.footer-copyright { font-size: var(--text-sm); color: var(--color-text-subtle); }
.footer-bottom-links {
  display: flex;
  gap: var(--space-6);
}
.footer-bottom-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--anim-duration-fast) var(--anim-easing);
}
.footer-bottom-link:hover { color: var(--color-text); }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-content {
  padding-top: 0; /* hero handles its own top offset */
}

/* ============================================================
   SECTION BACKGROUND VARIANTS
   ============================================================ */
.bg-white  { background-color: var(--color-surface); }
.bg-subtle { background-color: var(--color-bg-subtle); }

/* ============================================================
   THEME TRANSITION — smooth switch without FOUC
   ============================================================ */
html {
  transition:
    background-color var(--anim-duration-base) var(--anim-easing),
    color            var(--anim-duration-base) var(--anim-easing);
}

[data-theme="dark"] { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

/* ============================================================
   SIM COUNTER — used by InfiniteMode
   ============================================================ */
.sim-counter {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-subtle);
  background: var(--color-bg-subtle);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

/* ============================================================
   SCORE DONUT (ResultsScreen)
   ============================================================ */
.score-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.score-donut {
  display: block;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.08));
}

.donut-score-text {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-sans);
  dominant-baseline: middle;
}

.donut-grade-text {
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-sans);
  dominant-baseline: middle;
}

.donut-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* ============================================================
   RESULTS ENCOURAGEMENT
   ============================================================ */
.results-encouragement {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  max-width: 380px;
  margin-inline: auto;
}

/* ============================================================
   CATEGORY BARS (shared by ResultsScreen + Dashboard)
   ============================================================ */
.cat-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.cat-bar-item {}

.cat-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.cat-bar-name {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.cat-bar-pct {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
}

.cat-bar-sub {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  margin-top: var(--space-1);
}

/* ============================================================
   TREND CHART (Dashboard)
   ============================================================ */
.trend-chart-wrap {
  overflow-x: auto;
}

.chart-label {
  font-size: 11px;
  fill: var(--color-text-subtle);
  font-family: var(--font-sans);
}

.chart-label--threshold {
  fill: var(--color-warning);
  font-weight: 600;
}

.chart-grid {
  stroke: var(--color-border);
  stroke-width: 1;
}

.chart-threshold {
  stroke: var(--color-warning);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.chart-caption {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  text-align: center;
  margin-top: var(--space-2);
}

/* ============================================================
   DASHBOARD PAGE
   ============================================================ */
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.dashboard-title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.dashboard-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

/* KPI grid */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
}

.dash-kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: box-shadow var(--anim-duration-base) var(--anim-easing);
}

.dash-kpi-card:hover {
  box-shadow: var(--shadow-md);
}

.dash-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
}

.dash-kpi-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: 1;
}

.dash-kpi-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Two-column layout for streak + errors cards */
.dash-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.dash-section-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.dash-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

/* Streak bar */
.streak-bar {
  margin-top: var(--space-4);
}

.streak-dots {
  display: flex;
  gap: var(--space-2);
  justify-content: space-between;
}

.streak-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
}

.streak-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg-subtle);
  border: 2px solid var(--color-border);
  transition: all var(--anim-duration-base) var(--anim-easing);
}

.streak-dot--active {
  background: var(--color-warning);
  border-color: var(--color-warning);
  box-shadow: 0 0 8px rgba(245,158,11,0.4);
}

.streak-day-label {
  font-size: 10px;
  color: var(--color-text-subtle);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
}

/* Achievements */
.achievements-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.achievement {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: all var(--anim-duration-fast) var(--anim-easing);
}

.achievement--earned {
  border-color: var(--color-success);
  background: var(--color-success-bg);
}

[data-theme="dark"] .achievement--earned {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.3);
}

.achievement--locked {
  opacity: 0.55;
}

.achievement-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.achievement--earned .achievement-icon {
  background: rgba(34,197,94,0.15);
  color: var(--color-success);
}

.achievement-body {
  flex: 1;
  min-width: 0;
}

.achievement-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.achievement-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* History list */
.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
  flex-wrap: wrap;
}

.history-row-left,
.history-row-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.history-mode {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.history-score {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.history-date {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

/* ============================================================
   TEXT COLOR UTILITIES (used in dashboard + results)
   ============================================================ */
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-error   { color: var(--color-error); }
.text-warning { color: var(--color-warning); }
.text-neutral { color: var(--color-text-muted); }

