/* LetsTranscriber — broadcast studio aesthetic */
/* Fonts loaded via <link> in HTML so this file applies immediately */

:root {
  --ink: #090a0e;
  --panel: #11131a;
  --panel-2: #181b24;
  --border: #2a2f3d;
  --border-soft: #1e222c;
  --text: #f0ebe3;
  --muted: #8c8799;
  --amber: #e8a838;
  --amber-dim: #c48820;
  --amber-glow: rgba(232, 168, 56, 0.25);
  --success: #5cce8f;
  --error: #f07070;
  --radius: 14px;
  --radius-sm: 8px;
  --font-ui: 'IBM Plex Sans', system-ui, sans-serif;
  --font-display: 'Literata', Georgia, serif;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-ui);
  background: var(--ink);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232, 168, 56, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(92, 206, 143, 0.04), transparent);
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.site-header { margin-bottom: 2rem; animation: fadeUp 0.5s ease both; }

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber), var(--amber-dim));
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: 0 0 24px var(--amber-glow);
}

.brand h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--muted);
  font-size: 0.9rem;
  padding-left: calc(36px + 0.75rem);
}

.nav {
  display: flex;
  gap: 0.25rem;
  margin: 1.5rem 0 2rem;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  width: fit-content;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.nav a:hover { color: var(--text); }
.nav a.active { color: var(--ink); background: var(--amber); }

.card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  animation: fadeUp 0.5s ease both;
}

.card-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

label.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

input[type="text"], input[type="search"], select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.checkbox-row input { width: 1rem; height: 1rem; accent-color: var(--amber); }
.checkbox-row label { color: var(--text); font-size: 0.9rem; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.25rem;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, opacity 0.15s;
}

.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  width: 100%;
  background: linear-gradient(180deg, var(--amber), var(--amber-dim));
  color: var(--ink);
}

.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }

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

.btn-secondary:hover:not(:disabled) {
  border-color: var(--amber);
  background: rgba(232, 168, 56, 0.06);
}

.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.82rem; width: auto; }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 0.75rem;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--amber);
  background: rgba(232, 168, 56, 0.04);
}

.drop-zone-icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.7; }
.drop-zone-text { color: var(--muted); font-size: 0.9rem; }
.drop-zone-text strong { color: var(--text); font-weight: 500; }
.file-hint { font-size: 0.78rem; color: var(--muted); margin-bottom: 1rem; }

.progress-panel {
  display: none;
  margin-top: 1.25rem;
  padding: 1.1rem 1.2rem;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.progress-panel.active { display: block; }

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.progress-stage { font-size: 0.85rem; font-weight: 500; }
.progress-pct { font-size: 0.8rem; font-variant-numeric: tabular-nums; color: var(--amber); font-weight: 600; }

.progress-track {
  height: 6px;
  background: var(--ink);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--amber-dim), var(--amber));
  border-radius: 99px;
  transition: width 0.35s ease;
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 32px;
  margin-bottom: 0.85rem;
}

.waveform span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--amber);
  animation: wave 1.1s ease-in-out infinite;
}

.waveform span:nth-child(1) { animation-delay: 0s; height: 12px; }
.waveform span:nth-child(2) { animation-delay: 0.1s; height: 20px; }
.waveform span:nth-child(3) { animation-delay: 0.2s; height: 28px; }
.waveform span:nth-child(4) { animation-delay: 0.3s; height: 18px; }
.waveform span:nth-child(5) { animation-delay: 0.15s; height: 24px; }
.waveform span:nth-child(6) { animation-delay: 0.25s; height: 14px; }
.waveform span:nth-child(7) { animation-delay: 0.05s; height: 22px; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

.preview-text {
  font-size: 0.82rem;
  color: var(--muted);
  max-height: 4.5rem;
  overflow: hidden;
  line-height: 1.45;
}

.preview-text:not(:empty) { color: var(--text); }

.result-box {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.65;
  min-height: 3rem;
}

.result-box.empty { color: var(--muted); }

.meta-line {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.status { font-size: 0.85rem; margin-top: 0.65rem; }
.status.error { color: var(--error); }
.status.ok { color: var(--success); }

.toolbar { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.toolbar input { margin-bottom: 0; flex: 1; }

.history-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: opacity 0.15s;
}

.history-item:last-child { border-bottom: none; }
.history-item:hover { opacity: 0.8; }

.history-item-text {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-item-meta { font-size: 0.72rem; color: var(--muted); }

.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  margin-right: 0.35rem;
  color: var(--amber);
}

.pagination { display: flex; gap: 0.5rem; align-items: center; margin-top: 1rem; }
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: 0.9rem; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
