*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --accent: #e03131;
  --accent-hover: #c92a2a;
  --text: #f1f3f5;
  --text-muted: #868e96;
  --btn-size: clamp(140px, 30vw, 220px);
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

#status-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
  min-height: 1.2em;
}

#record-btn {
  width: var(--btn-size);
  height: var(--btn-size);
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 0 0 0 rgba(224, 49, 49, 0);
}

#record-btn svg {
  width: 40%;
  height: 40%;
}

#record-btn:hover {
  background: #252525;
  transform: scale(1.03);
}

#record-btn:active {
  transform: scale(0.97);
}

#record-btn.recording {
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}

#record-btn.recording:hover {
  background: var(--accent-hover);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(224, 49, 49, 0.5);
  }
  50% {
    box-shadow: 0 0 0 clamp(12px, 3vw, 24px) rgba(224, 49, 49, 0);
  }
}

#review-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 400px;
}

#review-section[hidden] {
  display: none;
}

audio {
  width: 100%;
  accent-color: var(--accent);
}

#review-actions {
  display: flex;
  gap: 1rem;
}

#discard-btn,
#submit-btn {
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.12s, transform 0.08s;
}

#discard-btn:active,
#submit-btn:active {
  transform: scale(0.97);
}

#discard-btn {
  background: var(--surface);
  color: var(--text-muted);
}

#discard-btn:hover {
  background: #252525;
  color: var(--text);
}

#submit-btn {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

#submit-btn:hover {
  background: var(--accent-hover);
}

#submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#confirmation {
  font-size: 1rem;
  color: var(--text-muted);
}

#confirmation[hidden] {
  display: none;
}

.install-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 2rem));
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  transition: transform 0.35s ease;
  z-index: 100;
}
.install-toast.visible {
  transform: translateX(-50%) translateY(0);
}
.install-toast[hidden] {
  display: none;
}
#install-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
}
#install-dismiss {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.2rem;
}
