:root {
  --bg: #0f1220;
  --card: #191d31;
  --text: #e8ecff;
  --muted: #aab3d9;
  --primary: #6f8cff;
  --primary-hover: #5a79f7;
  --ok: #2ecc71;
  --warn: #f1c40f;
  --error: #ff6b6b;
  --border: #2b3152;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top, #1d2240, var(--bg));
  color: var(--text);
  min-height: 100vh;
}

.container {
  width: min(980px, 92vw);
  margin: 2rem auto;
  display: grid;
  gap: 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
}

.hero p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.card {
  background: color-mix(in srgb, var(--card), black 10%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgb(0 0 0 / 20%);
}

.drop-zone {
  border: 2px dashed #465091;
  border-radius: 14px;
  padding: 2rem 1rem;
  text-align: center;
  transition: 0.2s ease;
  background: rgb(255 255 255 / 2%);
}

.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgb(111 140 255 / 12%);
}

.drop-title {
  margin: 0;
  font-size: 1.1rem;
}

.drop-subtitle {
  color: var(--muted);
}

.selected-file {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.mode-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mode-toggle {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  background: #0f1531;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.mode-option {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 1.1rem;
  border-radius: 9px;
  cursor: pointer;
  transition: 0.15s ease;
}

.mode-option:hover:not(.active) {
  color: var(--text);
}

.mode-option.active {
  background: var(--primary);
  color: white;
}

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

.actions-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

#transcribeBtn {
  display: inline-flex;
  margin: 0;
}

.hidden {
  display: none !important;
}

.progress-wrap {
  margin-top: 0.9rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.progress-stage {
  color: var(--text);
}

.progress-percent {
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 10px;
  width: 100%;
  background: #0f1531;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #5a79f7, #77a8ff);
  transition: width 0.25s ease;
}

.status {
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

.status.processing {
  color: var(--warn);
}

.status.completed {
  color: var(--ok);
}

.status.failed {
  color: var(--error);
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}

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

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

.btn.primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.ghost {
  background: #242b4b;
  color: var(--text);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.result-header h2 {
  margin: 0;
}

.result-actions {
  display: flex;
  gap: 0.5rem;
}

#transcriptOutput {
  width: 100%;
  min-height: 300px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #101429;
  color: var(--text);
  padding: 0.9rem;
  line-height: 1.45;
}

