/* GPU-OPTIMIZED THEME SWITCHING - Light/Dark Mode */

/* Theme ripple animation (kept for potential future use) */
.theme-ripple {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ripple-color, rgba(0, 255, 204, 0.3));
  transform: translate(-50%, -50%) scale(0);
  opacity: 0.6;
  pointer-events: none;
  z-index: 9999;
  will-change: transform, opacity;
}

.theme-ripple.active {
  animation: rippleExpand 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes rippleExpand {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(150); opacity: 0; }
}

/* Grid layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  position: relative;
  z-index: 1;
}

.wide {
  grid-column: 1 / -1;
}

/* Card styling */
.card {
  border-radius: 24px;
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--panel-top), var(--panel-bot));
  position: relative;
  overflow: visible; /* Changed to visible to show nested borders like FAQ */
}

/* Typography */
h1, h2, h3 {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
}

/* Buttons */
.btn {
  border-radius: 50px;
  border-width: 1px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.02em;
}

/* Pills */
.pill {
  border-radius: 50px;
  border: 1px solid rgba(0, 255, 204, 0.3);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: 
    opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
    transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for child reveal elements */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal:nth-child(4) { transition-delay: 0.2s; }
.reveal:nth-child(5) { transition-delay: 0.25s; }
.reveal:nth-child(6) { transition-delay: 0.3s; }

/* Cards animate from slightly larger transform */
.card.reveal {
  transform: translateY(40px);
  transition-duration: 0.7s;
}

/* Element transitions */
.grid, .card, .btn, .pill {
  transition: border-color 0.4s ease, background 0.4s ease, border-radius 0.4s ease;
}

header {
  position: relative;
  z-index: 10;
  transition: background 0.5s ease;
}

body {
  transition: background 0.5s ease;
  position: relative;
  min-height: 100vh;
}

main {
  position: relative;
  z-index: 2;
}

/* Stats bar theming */
.stats-bar {
  transition: background 0.4s ease, border-color 0.4s ease;
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

/* Light mode specific body background - handled in themes.css */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .theme-ripple { display: none; }
}

@media (max-width: 768px) {
  .card { grid-column: span 1 !important; }
}
