:root {
  --bg: #0f0f0f;
  --card: #1c1c1c;
  --border: #2e2e2e;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --danger: #ef4444;
  --text: #e5e5e5;
  --text-muted: #9ca3af;
  --radius: 14px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100svh;
  padding: 1rem;
  -webkit-tap-highlight-color: transparent;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

/* Header */
header {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.3rem;
}

.stats {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.4rem;
  opacity: 0.6;
}

/* Taalkeuze */
.lang-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.lang-row label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-row select {
  flex: 1;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.lang-row select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Opnameknop — centraal, prominent */
.record-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.record-btn {
  width: 172px;
  height: 172px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  touch-action: manipulation;
  user-select: none;
}

.record-btn:hover {
  background: #242424;
}

.record-btn:active {
  transform: scale(0.94);
}

.record-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.record-btn.recording {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50%       { box-shadow: 0 0 0 18px rgba(239, 68, 68, 0); }
}

.mic-icon {
  width: 44px;
  height: 44px;
}

.record-btn.recording .mic-icon {
  color: var(--danger);
}

.record-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  padding: 0 14px;
  line-height: 1.3;
}

.status {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 1.4em;
  text-align: center;
}

/* Kaarten */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.hidden {
  display: none !important;
}

/* Transcriptie */
.transcription-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  white-space: pre-wrap;
  min-height: 2em;
}

/* Verwerking */
.processing-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

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

/* Resultaat */
.result-textarea {
  width: 100%;
  background: #111;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.75;
  padding: 0.875rem;
  resize: vertical;
  font-family: inherit;
  min-height: 180px;
  transition: border-color 0.15s;
}

.result-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.action-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-primary {
  flex: 1;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover  { background: var(--accent-dark); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  flex: 1;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s, transform 0.1s;
}

.btn-secondary:hover  { background: var(--border); }
.btn-secondary:active { transform: scale(0.97); }

.btn-block {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
}

.copy-status {
  text-align: center;
  font-size: 0.875rem;
  color: var(--accent);
  min-height: 1.4em;
  margin-top: 0.5rem;
}

/* Foutkaart */
.error-card {
  border-color: var(--danger);
}

.error-card > p {
  color: var(--danger);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Desktop: iets meer ruimte */
@media (min-width: 480px) {
  body { padding: 2rem; }
  h1   { font-size: 1.6rem; }
  .record-btn { width: 188px; height: 188px; }
  .mic-icon   { width: 48px; height: 48px; }
}
