/* ================================================
   Human Benchmark — Custom Styles
================================================ */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Hero — pure CSS gradient background, no image dependency */
.hero-bg {
  position: relative;
  background: linear-gradient(135deg, #020d06 0%, #031a0c 20%, #042b15 45%, #064e3b 75%, #065f46 100%);
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    rgba(3,20,10,0.97) 0%,
    rgba(5,35,18,0.93) 40%,
    rgba(8,50,25,0.80) 70%,
    rgba(12,65,32,0.60) 100%
  );
  pointer-events: none;
}
.hero-bg .hero-content {
  position: relative;
  z-index: 1;
}
.hero-heading {
  text-shadow: 0 2px 20px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.5);
}
.hero-sub {
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* Smooth dropdown transition */
.nav-dropdown {
  transform: translateY(-4px);
  transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
}
.group:hover .nav-dropdown {
  transform: translateY(0);
}

/* Test area styles */
.test-stage {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

/* Reaction time states */
.test-stage.waiting   { background: #1e40af; }
.test-stage.ready     { background: #dc2626; }
.test-stage.go        { background: #16a34a; }
.test-stage.too-soon  { background: #ea580c; }
.test-stage.result    { background: #f8fafc; border: 2px solid #e2e8f0; }

/* Progress bar */
.reading-progress {
  position: fixed;
  top: 64px;
  left: 0;
  width: 0%;
  height: 3px;
  background: #2563eb;
  z-index: 40;
  transition: width 0.1s linear;
}

/* Leaderboard rank badges */
.rank-gold   { color: #f59e0b; }
.rank-silver { color: #9ca3af; }
.rank-bronze { color: #f97316; }

/* Card hover ring effect */
.test-card:hover {
  box-shadow: 0 0 0 2px #3b82f6, 0 10px 25px -5px rgba(0,0,0,.08);
}

/* Mobile menu animation */
#mobile-menu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 600px;
  opacity: 1;
}

/* Scrollbar (Webkit) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Focus visible rings */
*:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Stat number animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-animate {
  animation: countUp 0.5s ease forwards;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1e293b;
  color: white;
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 9999;
  animation: slideInToast 0.3s ease;
}
@keyframes slideInToast {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
