:root {
  --primary: #4f46e5;
  --success: #16a34a;
  --danger: #dc2626;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1f2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

h2 {
  margin-top: 0;
  text-align: center;
}

.subtitle {
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.8;
}

label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
}

select {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
}

#controls {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

button {
  flex: 1;
  padding: 0.75rem;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button.start {
  background: var(--primary);
  color: white;
}

button.stop {
  background: var(--danger);
  color: white;
}

button:active {
  transform: scale(0.97);
}

.status {
  margin-top: 1rem;
  text-align: center;
  padding: 0.5rem;
  border-radius: 10px;
  font-weight: 600;
}

.status.idle {
  background: #e5e7eb;
}

.status.listening {
  background: #fde68a;
}

.status.success {
  background: #bbf7d0;
}

.transcript {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 0.95rem;
  min-height: 48px;
}

.transcript.correct {
  background: #ecfdf5;
  color: var(--success);
}

canvas#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}
