:root { -webkit-font-smoothing: antialiased; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #000000;
  color: #ffffff;
}

body {
  font-family: 'Newsreader', serif;
}

/* Staggered entrance animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-in {
  opacity: 0;
  animation: fadeUp 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

/* Sentence card hover */
.sentence-card:hover {
  background: var(--card-hover) !important;
  transform: translateY(-1px);
}
.sentence-card:active {
  transform: translateY(0) scale(0.997);
}
.sentence-card.playing {
  animation: pulseGlow 1.6s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(200,163,78,0.25); }
  50%      { box-shadow: 0 0 0 3px rgba(200,163,78,0.15); }
}

/* Button micro-interactions */
.toggle-btn:hover, .refresh-btn:hover {
  filter: brightness(1.25);
  transform: translateY(-1px);
}
.toggle-btn, .refresh-btn {
  transition: transform 0.15s, filter 0.15s;
}

/* Speaking waveform */
.wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}
.wave i {
  display: inline-block;
  width: 3px;
  border-radius: 2px;
  height: 6px;
  animation: bounce 0.9s ease-in-out infinite;
}
.wave i:nth-child(2) { animation-delay: 0.15s; }
.wave i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 100% { height: 5px; }
  50%      { height: 18px; }
}

/* Speed slider */
.speed-slider {
  height: 4px;
  cursor: pointer;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .anim-in, .sentence-card.playing, .wave i { animation: none; }
  .anim-in { opacity: 1; }
}