/* ============================================
   AWAZ — ROMAN URDU TRANSCRIBER
   Palette: Sahara Dusk (warm cultural tones)
   Fonts: Playfair Display + Plus Jakarta Sans
============================================ */

:root {
  --bg:          #F9F3EB;
  --bg-card:     #FFFFFF;
  --bg-deep:     #F2E6D9;
  --bg-dark:     #3D2B1F;

  --gold:        #C9956B;
  --gold-deep:   #8B4513;
  --gold-light:  #E6C07B;
  --gold-pale:   #F5E6D0;

  --ink:         #2C1810;
  --ink-mid:     #5B3A29;
  --ink-soft:    #8B6B55;
  --ink-muted:   #B89880;

  --accent:      #C9956B;
  --accent2:     #7B3F00;
  --green:       #2D6A1E;
  --red:         #C0392B;

  --border:      rgba(139,69,19,0.12);
  --border-gold: rgba(201,149,107,0.3);
  --shadow:      0 4px 24px rgba(61,43,31,0.08);
  --shadow-lg:   0 12px 48px rgba(61,43,31,0.14);

  --font-display: 'Playfair Display', serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;
  --font-urdu:    'Noto Nastaliq Urdu', serif;

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: var(--gold-deep); text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }
textarea, input { font-family: var(--font-body); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ===== BACKGROUND ORNAMENTS ===== */
.bg-ornament {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orn {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
}
.orn1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  top: -200px; right: -200px;
}
.orn2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--gold-deep) 0%, transparent 70%);
  bottom: -100px; left: -100px;
}
.orn3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--gold-light) 0%, transparent 70%);
  top: 50%; left: 40%;
  transform: translate(-50%, -50%);
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249,243,235,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 68px;
}
.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-mark svg { width: 38px; height: 38px; }
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-family: var(--font-urdu);
  font-size: 22px;
  color: var(--gold-deep);
  line-height: 1;
}
.logo-sub {
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.header-nav {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.nav-pill {
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.nav-pill:hover { background: var(--gold-pale); color: var(--ink); }
.nav-pill.active {
  background: var(--gold-deep);
  color: white;
  border-color: var(--gold-deep);
}
.header-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-muted);
  transition: var(--transition);
}
.badge-dot.recording { background: #e74c3c; animation: blink 0.8s ease-in-out infinite; }
.badge-dot.ready { background: var(--green); }

/* ===== MAIN ===== */
.app-main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  position: relative;
  z-index: 1;
}

/* ===== PANELS ===== */
.panel { display: none; }
.panel.active { display: block; animation: fadeInUp 0.4s ease both; }

/* ===== HERO STRIP ===== */
.hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding: 28px 36px;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--ink-mid) 100%);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.hero-strip::before {
  content: 'آواز';
  position: absolute;
  right: -20px; top: -20px;
  font-family: var(--font-urdu);
  font-size: 120px;
  color: rgba(255,255,255,0.04);
  pointer-events: none;
  line-height: 1;
}
.hero-text { flex: 1; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  line-height: 1.2;
}
.hero-title em { color: var(--gold-light); font-style: italic; }
.hero-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  max-width: 500px;
  line-height: 1.6;
}
.hero-langs {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.lang-chip {
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.lang-chip:hover { background: rgba(255,255,255,0.15); color: white; }
.lang-chip.active {
  background: var(--gold);
  border-color: var(--gold);
  color: white;
}

/* ===== MAIN GRID ===== */
.main-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  align-items: start;
}

/* ===== LEFT COL ===== */
.left-col { display: flex; flex-direction: column; gap: 20px; }

/* MIC CARD */
.mic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.mic-card.recording {
  border-color: rgba(231,76,60,0.3);
  box-shadow: 0 0 0 4px rgba(231,76,60,0.06), var(--shadow);
}
.mic-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  margin-bottom: 16px;
}
.mic-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mic-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0;
  transition: var(--transition);
}
.r1 { width: 80px; height: 80px; }
.r2 { width: 110px; height: 110px; }
.r3 { width: 140px; height: 140px; }
.mic-ring.pulse {
  animation: ringPulse 1.5s ease-out infinite;
}
.r2.pulse { animation-delay: 0.3s; }
.r3.pulse { animation-delay: 0.6s; }

.mic-btn {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(139,69,19,0.3);
  position: relative;
  z-index: 2;
}
.mic-btn:hover { transform: scale(1.08); box-shadow: 0 10px 30px rgba(139,69,19,0.4); }
.mic-btn.recording {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  box-shadow: 0 6px 20px rgba(231,76,60,0.4);
  animation: micPulse 1.5s ease-in-out infinite;
}
.mic-icon, .stop-icon { width: 28px; height: 28px; }
.hidden { display: none !important; }

.mic-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.mic-timer {
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}

/* Waveform */
.waveform { height: 40px; display: flex; align-items: center; justify-content: center; }
.wave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 100%;
}
.wave-bars span {
  display: block;
  width: 3px;
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
  opacity: 0.3;
  transition: height 0.1s ease;
}
.wave-bars.active span {
  opacity: 0.8;
  animation: waveAnim 0.8s ease-in-out infinite;
}
.wave-bars.active span:nth-child(2n) { animation-delay: 0.1s; }
.wave-bars.active span:nth-child(3n) { animation-delay: 0.2s; }
.wave-bars.active span:nth-child(4n) { animation-delay: 0.3s; }
.wave-bars.active span:nth-child(5n) { animation-delay: 0.15s; }

/* UPLOAD CARD */
.upload-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.upload-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.upload-hint { font-size: 11px; color: var(--ink-muted); }
.upload-drop {
  border: 2px dashed var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gold-pale);
}
.upload-drop:hover { border-color: var(--gold); background: #f0dfc8; }
.upload-drop.dragover { border-color: var(--gold-deep); background: #e8d4b8; }
.upload-icon { font-size: 28px; margin-bottom: 8px; }
.upload-drop p { font-size: 13px; color: var(--ink-soft); }
.upload-drop strong { color: var(--gold-deep); }
.upload-player { margin-top: 14px; }
.upload-player audio { width: 100%; margin-bottom: 10px; }
.btn-transcribe-file {
  width: 100%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: white;
  border: none;
  padding: 11px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
}
.btn-transcribe-file:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(139,69,19,0.3); }

/* TEXT INPUT CARD */
.text-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.ti-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.ti-hint { font-size: 11px; color: var(--ink-muted); font-weight: 400; }
.text-input-card textarea {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
  resize: vertical;
  outline: none;
  transition: var(--transition);
  line-height: 1.6;
  margin-bottom: 12px;
}
.text-input-card textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,149,107,0.15);
}
.text-input-card textarea::placeholder { color: var(--ink-muted); }
.btn-convert {
  width: 100%;
  background: var(--bg-dark);
  color: var(--gold-light);
  border: none;
  padding: 11px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
}
.btn-convert:hover { background: var(--ink-mid); transform: translateY(-1px); }

/* ===== RIGHT COL ===== */
.right-col { display: flex; flex-direction: column; gap: 20px; }

/* OUTPUT CARD */
.output-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.output-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
}
.output-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}
.output-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.output-actions { display: flex; gap: 6px; }
.action-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.action-btn svg { width: 14px; height: 14px; }
.action-btn:hover { background: var(--gold-pale); color: var(--gold-deep); border-color: var(--border-gold); }
.action-btn.danger:hover { background: #fde8e8; color: var(--red); border-color: rgba(192,57,43,0.2); }

.confidence-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.conf-label { font-size: 11px; color: var(--ink-muted); font-weight: 600; white-space: nowrap; }
.confidence-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--green) 100%);
  border-radius: 3px;
  transition: width 0.6s ease;
  width: 0%;
}
.conf-score { font-size: 12px; font-weight: 700; color: var(--gold-deep); white-space: nowrap; }

.output-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  max-height: 400px;
}
.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
  color: var(--ink-muted);
}
.placeholder-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.output-placeholder p { font-size: 15px; margin-bottom: 6px; }
.placeholder-hint { font-size: 12px; }

.transcript-block {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
  animation: fadeInUp 0.3s ease both;
}
.transcript-text {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 6px;
}
.transcript-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--ink-muted);
}
.transcript-time { }
.transcript-lang {
  background: var(--gold-pale);
  color: var(--gold-deep);
  padding: 1px 8px;
  border-radius: 100px;
  font-weight: 600;
}

.interim-strip {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: rgba(201,149,107,0.05);
  display: flex;
  align-items: center;
  gap: 10px;
}
.interim-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.interim-text {
  font-size: 14px;
  color: var(--ink-soft);
  font-style: italic;
}

/* COMPARE CARD */
.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg-deep);
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
}
.compare-col { padding: 16px 20px; }
.compare-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  font-size: 20px;
  color: var(--gold);
  font-weight: 700;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.compare-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.compare-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.compare-text.roman {
  color: var(--gold-deep);
  font-weight: 600;
}

/* STATS ROW */
.stats-row {
  display: flex;
  gap: 12px;
}
.stat-chip {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-val {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-deep);
  margin-bottom: 2px;
}
.stat-lbl { font-size: 11px; color: var(--ink-muted); font-weight: 600; }

/* PHRASES CARD */
.phrases-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.phrases-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}
.phrases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.phrase-btn {
  padding: 10px 12px;
  background: var(--gold-pale);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-deep);
  transition: var(--transition);
  text-align: left;
}
.phrase-btn:hover { background: var(--gold); color: white; border-color: var(--gold); }

/* ===== HISTORY PANEL ===== */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.panel-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
}
.btn-clear-history {
  background: transparent;
  border: 1px solid rgba(192,57,43,0.2);
  color: var(--red);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-clear-history:hover { background: #fde8e8; }

.history-list { display: flex; flex-direction: column; gap: 14px; }
.history-empty {
  text-align: center;
  padding: 60px;
  color: var(--ink-muted);
}
.history-empty span { font-size: 40px; display: block; margin-bottom: 12px; }
.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.3s ease both;
}
.hi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.hi-meta { display: flex; gap: 10px; align-items: center; }
.hi-time { font-size: 12px; color: var(--ink-muted); }
.hi-lang {
  background: var(--gold-pale);
  color: var(--gold-deep);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}
.hi-actions { display: flex; gap: 6px; }
.hi-text {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
  font-weight: 500;
}

/* ===== ABOUT PANEL ===== */
.about-layout { max-width: 900px; margin: 0 auto; }
.about-hero {
  text-align: center;
  padding: 40px 0 32px;
}
.about-logo {
  font-family: var(--font-urdu);
  font-size: 64px;
  color: var(--gold-deep);
  margin-bottom: 12px;
  line-height: 1;
}
.about-hero h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.about-hero p { font-size: 15px; color: var(--ink-soft); }
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.about-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.about-icon { font-size: 28px; margin-bottom: 12px; }
.about-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.about-card p { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.about-tips {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.about-tips h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}
.about-tips ul { display: flex; flex-direction: column; gap: 10px; padding-left: 0; list-style: none; }
.about-tips li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.about-tips li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-dark);
  color: var(--gold-light);
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 3000;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); color: white; }
.toast.error { background: var(--red); color: white; }

/* ===== BROWSER WARNING ===== */
.browser-warn {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  width: 90%;
  max-width: 600px;
}
.bw-inner {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.bw-icon { font-size: 20px; flex-shrink: 0; }
.bw-inner strong { display: block; font-size: 14px; color: #856404; margin-bottom: 4px; }
.bw-inner p { font-size: 13px; color: #856404; }
.bw-inner button {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 16px;
  color: #856404;
  flex-shrink: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes ringPulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(231,76,60,0.4); }
  50% { box-shadow: 0 6px 30px rgba(231,76,60,0.7), 0 0 0 8px rgba(231,76,60,0.1); }
}
@keyframes waveAnim {
  0%, 100% { height: 4px; }
  50% { height: 28px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .main-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero-strip { flex-direction: column; align-items: flex-start; padding: 24px; }
  .hero-langs { flex-wrap: wrap; }
  .header-nav { display: none; }
  .phrases-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { flex-wrap: wrap; }
  .stat-chip { min-width: calc(50% - 6px); }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-divider { padding: 4px; border: none; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .app-main { padding: 20px 16px 40px; }
  .hero-title { font-size: 20px; }
  .phrases-grid { grid-template-columns: 1fr 1fr; }
  .output-actions { gap: 4px; }
}