:root {
  --bg-start: #eef2ff;
  --bg-end: #e0f2fe;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --text: #1e293b;
  --muted: #64748b;
  --card-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 480px;
  padding: 24px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 48px 32px;
  box-shadow: 0 20px 50px rgba(30, 41, 59, 0.12);
  text-align: center;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

h2 {
  margin: 16px 0 8px;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.5;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}
.btn-danger:hover {
  background: var(--danger-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  margin-top: 12px;
  box-shadow: none;
}
.btn-secondary:hover {
  color: var(--text);
}

.mic-pulse {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mic-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.35);
  animation: pulse 1.6s ease-out infinite;
}

.mic-icon {
  font-size: 2.4rem;
  z-index: 1;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.6);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.timer {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  border: 5px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #6366f1);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.eta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.check-icon {
  font-size: 2.6rem;
  margin-bottom: 4px;
}

.divider {
  text-align: center;
  color: var(--muted);
  margin: 12px 0;
  font-size: 0.85rem;
}
