* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

h1 {
  font-size: 1.6rem;
  color: #1a1a2e;
  margin-bottom: 24px;
}

.container {
  width: 100%;
  max-width: 640px;
}

/* ── Selector de idioma ────────────────────────────────────────────────────── */

.lang-select {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #555;
}

.lang-select select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  outline: none;
  background: #fff;
}

/* ── Área de texto ─────────────────────────────────────────────────────────── */

.textarea-wrapper {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

#transcripcion {
  width: 100%;
  min-height: 260px;
  padding: 20px;
  border: none;
  outline: none;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #222;
  resize: vertical;
  font-family: inherit;
  background: transparent;
}

#transcripcion::placeholder {
  color: #aaa;
}

/* ── Controles ─────────────────────────────────────────────────────────────── */

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.btn-mic {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: #4361ee;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.35);
}

.btn-mic:hover {
  background: #3a56d4;
}

.btn-mic:active {
  transform: scale(0.95);
}

.btn-mic.recording {
  background: #e63946;
  box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.5);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0  rgba(230, 57, 70, 0.5); }
  70%  { box-shadow: 0 0 0 18px rgba(230, 57, 70, 0); }
  100% { box-shadow: 0 0 0 0  rgba(230, 57, 70, 0); }
}

.btn-mic svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.btn-secondary {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  background: #e9ecef;
  color: #333;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #dee2e6;
}

/* ── Estado ────────────────────────────────────────────────────────────────── */

.status {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: #666;
  min-height: 22px;
}

.status.error {
  color: #e63946;
}
