/* ==========================================================================
   Translet AI - Gemini Inspired Modern Stylesheet
   ========================================================================== */

:root {
  /* ── Backgrounds: Deep Black ── */
  --bg-dark: #080808;
  --bg-card: rgba(14, 14, 14, 0.88);
  --bg-card-hover: rgba(20, 20, 20, 0.95);
  --bg-input: rgba(10, 10, 10, 0.8);

  /* ── Borders ── */
  --border-glass: rgba(220, 38, 38, 0.12);
  --border-glass-focus: rgba(220, 38, 38, 0.6);

  /* ── Text ── */
  --text-main: #f5f5f5;
  --text-muted: #888888;
  --text-dim: #555555;

  /* ── ONE accent: Crimson Red ── */
  --accent-red: #dc2626;
  --accent-glow: rgba(220, 38, 38, 0.35);
  --accent-gemini-purple: #ef4444;
  --accent-gemini-blue: #f87171;

  /* ── Gradients: Red only ── */
  --gradient-gemini:    linear-gradient(135deg, #dc2626 0%, #ff4444 100%);
  --gradient-btn:       linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
  --gradient-btn-hover: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(220,38,38,0.25), rgba(220,38,38,0.08));

  --font-kurdish: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
  --font-latin:   'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm:   0 4px 8px -1px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px -6px rgba(220, 38, 38, 0.3);
  --transition-fast:   0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-kurdish);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient dynamic background glow */
.app-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.45;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #dc2626 0%, rgba(220,38,38,0) 70%);
  top: -180px; right: -120px;
  opacity: 0.4;
}

.glow-2 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #7f1d1d 0%, rgba(127,29,29,0) 70%);
  bottom: -160px; left: -120px;
  animation-duration: 26s;
  animation-delay: -6s;
  opacity: 0.35;
}

.glow-3 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, #dc2626 0%, rgba(220,38,38,0) 70%);
  top: 40%; left: 38%;
  opacity: 0.07;
  animation-duration: 19s;
  animation-delay: -11s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-gemini {
  width: 94px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.18) 0%, rgba(12, 12, 12, 0.9) 75%);
  border: 1.5px solid rgba(220, 38, 38, 0.55);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(220, 38, 38, 0.35), 0 0 20px rgba(220, 38, 38, 0.2), inset 0 1px 0 rgba(255, 80, 80, 0.3);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  z-index: 5;
  padding: 6px 8px;
}

.logo-gemini:hover {
  transform: scale(1.06) translateY(-2px);
  border-color: #ef4444;
  box-shadow: 0 14px 44px rgba(220, 38, 38, 0.65), 0 0 35px rgba(220, 38, 38, 0.4);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(220, 38, 38, 0.9)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9));
  display: block;
}

.brand-text h1 {
  font-family: var(--font-latin);
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* "Lala" — red */
.brand-lala {
  color: #dc2626;
  filter: drop-shadow(0 0 14px rgba(220, 38, 38, 0.5));
}

/* "Translet" — clean solid red */
.brand-translet {
  color: #dc2626;
  filter: drop-shadow(0 0 14px rgba(220, 38, 38, 0.5));
}

.gemini-tag {
  font-family: var(--font-latin);
  font-size: 1rem;
  font-weight: 700;
  background: var(--gradient-gemini);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(220, 38, 38, 0.4);
  letter-spacing: 0.5px;
  box-shadow: 0 0 18px rgba(220, 38, 38, 0.2) inset;
}

.brand-text .tagline {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.pill-btn.primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 18px rgba(200, 40, 40, 0.4);
}

.pill-btn.primary:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(200, 40, 40, 0.6);
}

.pill-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
}

.pill-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Tone Selection Bar */
.tones-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  flex-wrap: wrap;
  backdrop-filter: blur(12px);
}

.tone-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ef4444;
}

.sparkle-icon {
  font-size: 1rem;
  color: #ef4444;
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

.tone-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tone-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.tone-chip:hover {
  color: #fff;
  border-color: rgba(220, 38, 38, 0.5);
  background: rgba(220, 38, 38, 0.12);
  transform: translateY(-1px);
}

.tone-chip.active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.4), rgba(185, 28, 28, 0.6));
  border-color: #ef4444;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: scale(1.03);
}

@keyframes tonePulseHighlight {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
  70% { box-shadow: 0 0 24px 6px rgba(220, 38, 38, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.textarea-container.tone-pulse {
  animation: tonePulseHighlight 0.8s ease-out;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px 0 rgba(0, 0, 0, 0.35);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* Main Translator Grid */
.translator-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .translator-grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 380px;
  padding: 18px 20px;
  position: relative;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 12px;
  gap: 12px;
}

.language-select-wrapper {
  position: relative;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  padding: 8px 36px 8px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  transition: all var(--transition-fast);
}

[dir="rtl"] .lang-select {
  padding: 8px 16px 8px 36px;
  background-position: left 12px center;
}

.lang-select:focus {
  outline: none;
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.lang-select option {
  background-color: #121827;
  color: #fff;
  padding: 8px;
}

/* Engine Badge */
.engine-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--accent-gemini-blue);
  background: rgba(56, 189, 248, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-family: var(--font-latin);
  font-weight: 600;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* Textareas */
.textarea-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 14px 0;
}

textarea {
  width: 100%;
  flex: 1;
  min-height: 220px;
  background: transparent;
  border: none;
  resize: vertical;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1.15rem;
  line-height: 1.8;
  outline: none;
}

textarea::placeholder {
  color: var(--text-dim);
  font-weight: 300;
}

#targetText {
  color: #f8fafc;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  z-index: 5;
  transition: opacity 0.2s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.gemini-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
}

.spark-circle {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ef4444;
  border-right-color: #f87171;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Panel Footer */
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-glass);
  padding-top: 12px;
  gap: 12px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateY(-1px);
}

.icon-btn.pill {
  width: auto;
  padding: 0 12px;
  font-size: 0.82rem;
  font-family: inherit;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
}

.icon-btn.pill:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.char-counter, .target-status {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Center Swap & Main Action */
.swap-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

@media (max-width: 900px) {
  .swap-divider {
    flex-direction: row;
    padding: 10px 0;
  }
}

.swap-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  backdrop-filter: blur(8px);
}

.swap-btn:hover {
  background: var(--gradient-gemini);
  color: #fff;
  border-color: transparent;
  transform: rotate(180deg) scale(1.1);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.translate-main-btn {
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: var(--gradient-btn);
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.translate-main-btn:hover {
  background: var(--gradient-btn-hover);
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(220, 38, 38, 0.6);
}

.translate-main-btn:active {
  transform: scale(0.98);
}

/* Explanation Card */
.explanation-card {
  padding: 18px 24px;
  border-left: 4px solid var(--accent-gemini-purple);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.exp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.exp-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-gemini-blue);
  font-weight: 700;
}

.exp-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.exp-item {
  margin-bottom: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.exp-item strong {
  color: #fff;
}

/* Word Insights & Multiple Meanings Section */
.word-insights-card {
  padding: 24px 26px;
  margin-top: 4px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 24px rgba(220, 38, 38, 0.06);
}

.insights-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 14px;
}

.insights-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.insights-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.insights-title-text h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.insights-title-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.insights-badge {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.insights-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  min-width: 260px;
  max-width: 440px;
  flex: 1;
  transition: all 0.2s;
  color: var(--text-muted);
  position: relative;
}

.insights-search-box:focus-within {
  border-color: #ef4444;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.35);
  color: #ef4444;
}

.insights-search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  width: 100%;
}

.insights-search-box input::placeholder {
  color: var(--text-muted);
}

.insight-search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 50%;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.insight-search-clear:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.3);
}

.insight-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(239, 68, 68, 0.2);
  border-top-color: #ef4444;
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
}

.insights-tags-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tags-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.insights-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.insight-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.insight-chip:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.insight-chip.active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.4), rgba(185, 28, 28, 0.6));
  border-color: #ef4444;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.4);
}

/* Word Insights Display Body */
.word-entry-card {
  background: rgba(14, 14, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 22px 24px;
  animation: slideDown 0.25s ease;
}

.word-header-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.main-word-title {
  font-size: 2rem;
  font-weight: 900;
  color: #ef4444;
  letter-spacing: -0.5px;
}

.word-phonetic {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: monospace;
}

.word-lang-pill {
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.word-overview {
  font-size: 0.94rem;
  color: #e2e8f0;
  line-height: 1.7;
  margin-bottom: 18px;
}

.meanings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.meaning-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 3px solid #ef4444;
  border-radius: 10px;
  padding: 14px 16px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.meaning-box:hover {
  border-color: rgba(220, 38, 38, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.meaning-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.meaning-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.pos-tag {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  padding: 2px 8px;
  border-radius: 4px;
}

.meaning-kurdish {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 8px 0 4px;
}

.meaning-english {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  direction: ltr;
  text-align: left;
}

.meaning-context {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 6px;
}

.example-quote {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.6;
  border-left: 2px solid rgba(220, 38, 38, 0.6);
}

.example-quote .en-quote {
  color: #cbd5e1;
  direction: ltr;
  text-align: left;
  display: block;
}

.example-quote .ku-quote {
  color: #fca5a5;
  margin-top: 4px;
  display: block;
}

/* History Section */
.history-section {
  padding: 20px 24px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 12px;
}

.history-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.history-title svg {
  color: var(--accent-gemini-purple);
}

.text-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.text-btn.danger:hover {
  color: #f87171;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-left: 6px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(-3px);
}

.history-texts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-source {
  font-size: 0.95rem;
  color: #fff;
}

.history-target {
  font-size: 0.85rem;
  color: var(--accent-gemini-blue);
}

.history-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty-history {
  text-align: center;
  padding: 24px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Footer */
.app-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  padding-top: 10px;
}

/* Modal Overlays & Backdrops */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  animation: fadeIn 0.2s ease;
  overflow-y: auto;
}

.modal-overlay.hidden,
.modal-backdrop.hidden {
  display: none !important;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 520px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 12px;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: #fff;
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.7;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input, .form-select {
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus, .form-select:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.helper-text {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.helper-text a {
  color: #ef4444;
  text-decoration: underline;
}

.api-test-box {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.api-test-box.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.api-test-box.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(18, 18, 22, 0.96);
  border: 1px solid rgba(220, 38, 38, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(220, 38, 38, 0.25);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1000;
  backdrop-filter: blur(12px);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Navigation Tabs (Translator <-> Global Chat)
   ========================================================================== */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.35), rgba(185, 28, 28, 0.55));
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.live-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseDot 1.5s infinite;
}

/* ==========================================================================
   Global Live Chat Styles
   ========================================================================== */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 600px;
  height: calc(80vh - 100px);
  max-height: 750px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: rgba(14, 14, 16, 0.9);
  border: 1px solid rgba(220, 38, 38, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 28px rgba(220, 38, 38, 0.08);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.18);
  background: rgba(14, 14, 18, 0.92);
  flex-wrap: wrap;
  gap: 12px;
}

.chat-room-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-room-icon {
  font-size: 1.8rem;
  animation: floatOrb 10s infinite alternate ease-in-out;
}

.chat-room-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.chat-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.connection-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.connection-badge.connecting {
  color: #fde047;
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.25);
}

/* Online countries strip */
.chat-online-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(10, 10, 12, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  white-space: nowrap;
}

.strip-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

.country-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.country-pill {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}

/* Chat Feed */
.chat-feed-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(10, 10, 12, 0.5);
}

.chat-welcome-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(185, 28, 28, 0.18));
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--text-muted);
  font-size: 0.86rem;
  text-align: center;
  margin-bottom: 8px;
}

.banner-sparkle {
  font-size: 1.1rem;
}

/* Message Bubble */
.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 80%;
  animation: messageIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-msg.my-msg {
  align-self: flex-start; /* in RTL, flex-start is right */
}

.chat-msg.other-msg {
  align-self: flex-end; /* in RTL, flex-end is left */
}

.msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.msg-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.msg-sender {
  font-weight: 700;
  color: #fca5a5;
}

.my-msg .msg-sender {
  color: #ef4444;
}

.msg-bubble {
  background: rgba(20, 20, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  border-radius: 16px;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
  word-break: break-word;
}

.my-msg .msg-bubble {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.4), rgba(153, 27, 27, 0.6));
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.25);
}

.other-msg .msg-bubble {
  background: rgba(18, 18, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
}

/* Actions inside bubble */
.msg-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.msg-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.msg-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.msg-action-btn.active {
  color: #ef4444;
}

/* Translated text card inside bubble */
.msg-translation-card {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(10, 10, 12, 0.75);
  border-right: 3px solid #ef4444;
  font-size: 0.88rem;
  color: #e2e8f0;
  animation: slideDown 0.2s ease;
}

.trans-tag {
  font-size: 0.7rem;
  color: #ef4444;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 14px 20px;
  border-top: 1px solid rgba(220, 38, 38, 0.18);
  background: rgba(14, 14, 18, 0.96);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#chatMessageInput {
  flex: 1;
  background: rgba(10, 10, 12, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

#chatMessageInput:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25), 0 0 16px rgba(220, 38, 38, 0.2);
}

.chat-send-btn {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border: none;
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.4);
  transition: all var(--transition-fast);
}

.chat-send-btn:hover {
  background: linear-gradient(135deg, #f87171, #dc2626);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(220, 38, 38, 0.6);
}

/* Quick Emoji Drawer */
.emoji-drawer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  overflow-x: auto;
  animation: slideDown 0.2s ease;
}

.emoji-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  font-size: 1.15rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.emoji-chip:hover {
  transform: scale(1.25);
  background: rgba(255, 255, 255, 0.12);
}

.mini-spin {
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.status-dot.connecting {
  background: #eab308;
  box-shadow: 0 0 6px #eab308;
}

.tone-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Kurdish Voice Studio & Audio Player Bar
   ========================================================================== */
.kurdish-voice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(14, 14, 18, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 18px rgba(220, 38, 38, 0.08);
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

.voice-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kurdish-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
  transition: all 0.18s ease;
}

.kurdish-play-btn:hover {
  background: linear-gradient(135deg, #f87171, #dc2626);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.55);
}

.kurdish-play-btn:active {
  transform: scale(0.97);
}

.kurdish-wave-container {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 4px;
}

.wave-bar {
  width: 3px;
  height: 6px;
  background: rgba(239, 68, 68, 0.4);
  border-radius: 3px;
  transition: height 0.15s ease, background-color 0.2s ease;
}

.kurdish-voice-bar.playing .wave-bar {
  background: #ef4444;
}

.kurdish-voice-bar.playing .wave-bar:nth-child(1) { animation: wavePulse 0.7s infinite alternate ease-in-out; }
.kurdish-voice-bar.playing .wave-bar:nth-child(2) { animation: wavePulse 0.9s infinite alternate ease-in-out 0.1s; }
.kurdish-voice-bar.playing .wave-bar:nth-child(3) { animation: wavePulse 1.2s infinite alternate ease-in-out 0.2s; }
.kurdish-voice-bar.playing .wave-bar:nth-child(4) { animation: wavePulse 0.8s infinite alternate ease-in-out 0.15s; }
.kurdish-voice-bar.playing .wave-bar:nth-child(5) { animation: wavePulse 1.0s infinite alternate ease-in-out 0.25s; }
.kurdish-voice-bar.playing .wave-bar:nth-child(6) { animation: wavePulse 0.75s infinite alternate ease-in-out 0.05s; }

@keyframes wavePulse {
  0% { height: 4px; }
  50% { height: 18px; }
  100% { height: 7px; }
}

.voice-dialect-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
}

.voice-dialect-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
}

.voice-dialect-btn:hover {
  color: #fff;
}

.voice-dialect-btn.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.voice-status-pill {
  font-size: 0.75rem;
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.voice-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.voice-speed-group {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--radius-pill);
  padding: 2px 4px;
  direction: ltr;
}

.speed-label {
  font-size: 0.73rem;
  color: var(--text-dim);
  padding: 0 4px;
  user-select: none;
}

.voice-speed-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
}

.voice-speed-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.voice-speed-btn.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.voice-mode-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
}

.voice-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
}

.voice-mode-btn:hover {
  color: #fff;
}

.voice-mode-btn.active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.45), rgba(239, 68, 68, 0.3));
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.35);
  transform: scale(1.02);
}

.phonetic-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  height: 28px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
}

.phonetic-toggle-btn:hover, .phonetic-toggle-btn.active {
  background: rgba(220, 38, 38, 0.18);
  border-color: #ef4444;
  color: #fff;
}

.kurdish-phonetic-card {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(14, 14, 18, 0.85);
  border: 1px dashed rgba(220, 38, 38, 0.3);
  border-radius: var(--radius-md);
  animation: slideDown 0.2s ease;
}

.phonetic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.phonetic-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fca5a5;
}

.copy-phonetic-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.74rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.copy-phonetic-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.phonetic-body {
  font-family: var(--font-latin), monospace;
  font-size: 0.95rem;
  color: #e2e8f0;
  direction: ltr;
  text-align: left;
  letter-spacing: 0.3px;
  line-height: 1.5;
}

/* ==========================================================================
   Kurdish Podcast & Audio Practice Card
   ========================================================================== */
.kurdish-podcast-card {
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(14, 14, 18, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(220, 38, 38, 0.08);
  animation: slideDown 0.22s ease;
}

.podcast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.podcast-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fca5a5;
}

.podcast-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.podcast-filter-bar::-webkit-scrollbar {
  height: 4px;
}

.podcast-filter-bar::-webkit-scrollbar-thumb {
  background: rgba(220, 38, 38, 0.4);
  border-radius: 4px;
}

.podcast-filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.podcast-filter-chip:hover {
  color: #fff;
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.12);
}

.podcast-filter-chip.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #ef4444;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.podcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.podcast-item {
  background: rgba(22, 22, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.podcast-item:hover {
  border-color: rgba(220, 38, 38, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.podcast-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.podcast-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
}

.podcast-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  font-weight: 600;
  white-space: nowrap;
}

.podcast-item-desc {
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.podcast-item-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

.podcast-action-btn {
  font-family: inherit;
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.podcast-action-btn.play {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #fca5a5;
}

.podcast-action-btn.play:hover {
  background: #dc2626;
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-1px);
}

.podcast-action-btn.load {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.podcast-action-btn.load:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.podcast-action-btn.youtube {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ff6b6b;
  text-decoration: none;
}

.podcast-action-btn.youtube:hover {
  background: #ff0000;
  border-color: #ff3333;
  color: #fff;
  transform: translateY(-1px);
}

.podcast-action-btn.real-audio {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.28), rgba(168, 85, 247, 0.28));
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fce7f3;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.podcast-action-btn.real-audio:hover {
  background: linear-gradient(135deg, #dc2626, #9333ea);
  border-color: #f43f5e;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}

.podcast-player-card {
  max-width: 620px;
  background: rgba(18, 14, 20, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(220, 38, 38, 0.15);
}

.podcast-video-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: #000;
  margin-bottom: 14px;
}

.podcast-video-wrapper iframe {
  display: block;
  border: none;
}

.podcast-real-quote {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border-right: 3px solid #ef4444;
  color: #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ==========================================================================
   Voice A/B Comparison Modal Styling
   ========================================================================== */
.compare-player-card {
  max-width: 660px;
  background: rgba(18, 16, 22, 0.98);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(239, 68, 68, 0.12);
}

.compare-test-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 440px;
  overflow-y: auto;
  padding-left: 4px;
}

.compare-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.compare-card-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(239, 68, 68, 0.3);
}

.compare-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.compare-badge {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
}

.compare-text {
  font-size: 0.88rem;
  color: #f1f5f9;
  font-weight: 600;
  line-height: 1.5;
}

.compare-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 600px) {
  .compare-actions {
    grid-template-columns: 1fr;
  }
}

.compare-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.compare-play-btn.sample-a {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

.compare-play-btn.sample-a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.compare-play-btn.sample-b {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(168, 85, 247, 0.22));
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecdd3;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.compare-play-btn.sample-b:hover {
  background: linear-gradient(135deg, #ef4444, #9333ea);
  border-color: #f43f5e;
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.compare-play-btn.playing {
  box-shadow: 0 0 12px #22c55e;
  border-color: #22c55e !important;
  color: #4ade80 !important;
}

/* ElevenLabs AI Hyper-Realistic Voice Styling */
.elevenlabs-toggle-btn {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.22), rgba(239, 68, 68, 0.22)) !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  color: #e9d5ff !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.15);
}

.elevenlabs-toggle-btn:hover {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(239, 68, 68, 0.4)) !important;
  border-color: #c084fc !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

.elevenlabs-toggle-btn.active {
  background: linear-gradient(135deg, #9333ea, #dc2626) !important;
  border-color: #f43f5e !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.6);
}

.elevenlabs-pill-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
  transition: all 0.2s ease;
}

.elevenlabs-toggle-btn.active .elevenlabs-pill-badge {
  background: #22c55e;
  color: #052e16;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.sparkle-icon {
  font-size: 0.85rem;
  animation: pulseSparkle 2.2s infinite ease-in-out;
}

@keyframes pulseSparkle {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.25); opacity: 1; filter: drop-shadow(0 0 4px #c084fc); }
}

.elevenlabs-card {
  background: linear-gradient(145deg, rgba(18, 14, 28, 0.96), rgba(28, 16, 22, 0.98)) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(147, 51, 234, 0.2) !important;
}

.ai-engine-toggle-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
}

.ai-engine-toggle-card.active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(239, 68, 68, 0.12));
  border-color: rgba(168, 85, 247, 0.4);
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toggle-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.toggle-desc {
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* Switch Toggle Component */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.25s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, #a855f7, #ef4444);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Voice Grid Options */
.eleven-voice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.16s ease;
}

.eleven-voice-option:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}

.eleven-voice-option.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(239, 68, 68, 0.15));
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.voice-avatar {
  font-size: 1.4rem;
}

.voice-meta {
  display: flex;
  flex-direction: column;
}

.voice-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

.voice-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
}





/* Google Gemini AI Hyper-Realistic Voice Studio Styling */
.gemini-voice-toggle-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.22), rgba(99, 102, 241, 0.22)) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #bae6fd !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.18);
  font-weight: 600;
  height: 28px !important;
  padding: 2px 10px !important;
  border-radius: var(--radius-pill) !important;
  font-size: 0.76rem !important;
  line-height: 1 !important;
}

.gemini-voice-toggle-btn:hover {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.35), rgba(99, 102, 241, 0.35)) !important;
  border-color: #38bdf8 !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(56, 189, 248, 0.3);
}

.gemini-voice-toggle-btn.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.32), rgba(99, 102, 241, 0.32)) !important;
  border-color: #38bdf8 !important;
  color: #fff !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4) !important;
}

.gemini-pill-badge {
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
  transition: all 0.2s ease;
  line-height: 1;
}

.gemini-pill-badge.active {
  background: #22c55e !important;
  color: #052e16 !important;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.elevenlabs-toggle-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  height: 28px !important;
  padding: 2px 10px !important;
  font-size: 0.76rem !important;
  border-radius: var(--radius-pill) !important;
  line-height: 1 !important;
}

.kurdish-voice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(14, 14, 18, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  margin-top: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(220, 38, 38, 0.06);
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

.voice-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.voice-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gemini-voice-card {
  background: linear-gradient(145deg, rgba(10, 20, 36, 0.98), rgba(15, 23, 42, 0.98)) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(2, 132, 199, 0.25) !important;
}

.gemini-voice-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.18s ease;
}

.gemini-voice-option:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.gemini-voice-option.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(99, 102, 241, 0.2));
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}


/* Native Kurdish Studio & Cloned Voice Modal */
.native-kurdish-btn {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(147, 51, 234, 0.2)) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
}

.native-kurdish-btn:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.4), rgba(147, 51, 234, 0.35)) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
}

.native-studio-card {
  background: linear-gradient(145deg, rgba(15, 15, 22, 0.98), rgba(24, 18, 28, 0.98)) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(220, 38, 38, 0.2) !important;
}

.narrator-card {
  transition: all 0.2s ease;
}

.narrator-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Voice vs Voice (VC) Real-Time Conversation Interface
   ========================================================================== */
.voice-vc-top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.14), rgba(37, 99, 235, 0.16));
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 0 20px rgba(220, 38, 38, 0.05);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}

.voice-vc-top-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.voice-vc-pulse-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.vc-ripple {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.6);
  animation: pulse-ripple 2s infinite ease-out;
}

@keyframes pulse-ripple {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.vc-tag-badge {
  font-size: 0.72rem;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.voice-vc-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vc-quick-mic-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.vc-quick-mic-btn.kurdish {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
}
.vc-quick-mic-btn.kurdish:hover,
.vc-quick-mic-btn.kurdish.recording {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
}

.vc-quick-mic-btn.english {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3b82f6;
  color: #93c5fd;
}
.vc-quick-mic-btn.english:hover,
.vc-quick-mic-btn.english.recording {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

/* Full VC View Container */
.vc-wrapper {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: linear-gradient(145deg, rgba(16, 17, 26, 0.96), rgba(24, 18, 32, 0.96));
  border: 1px solid rgba(220, 38, 38, 0.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.vc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 12px;
}

.vc-room-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vc-room-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(59, 130, 246, 0.3));
  border: 1px solid rgba(220, 38, 38, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f87171;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.vc-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.vc-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vc-auto-speak-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.vc-waveform-bar {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  transition: all 0.3s ease;
}

.vc-waveform-bar.listening {
  border-color: #ef4444;
  background: rgba(220, 38, 38, 0.12);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.25);
}

.vc-waveform-bar.speaking {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.vc-pulse-rings {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
}

.pulse-ring {
  width: 4px;
  height: 10px;
  border-radius: 2px;
  background: #94a3b8;
  transition: all 0.2s ease;
}

.vc-waveform-bar.listening .pulse-ring {
  background: #ef4444;
  animation: soundwave-anim 0.8s infinite ease-in-out alternate;
}
.vc-waveform-bar.listening .pulse-ring.r1 { animation-delay: 0.1s; }
.vc-waveform-bar.listening .pulse-ring.r2 { animation-delay: 0.3s; }
.vc-waveform-bar.listening .pulse-ring.r3 { animation-delay: 0.5s; }

@keyframes soundwave-anim {
  0% { height: 6px; }
  100% { height: 26px; }
}

.vc-status-text {
  font-size: 0.86rem;
  color: #cbd5e1;
  font-weight: 500;
}

/* VC Dynamic Language Toolbar */
.vc-lang-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.vc-lang-select-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.vc-lang-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
}

.vc-lang-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.vc-select-wrapper {
  position: relative;
  width: 100%;
}

.vc-select-input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 36px 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.25s ease;
}

[dir="rtl"] .vc-select-input {
  padding: 10px 14px 10px 36px;
}

.vc-select-input:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

.vc-select-input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.vc-select-input option {
  background-color: #0f172a;
  color: #fff;
  padding: 10px;
}

.vc-select-arrow {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.65rem;
  color: #94a3b8;
}

[dir="ltr"] .vc-select-arrow {
  left: auto;
  right: 12px;
}

.vc-swap-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  margin-top: 18px;
}

.vc-swap-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  transform: rotate(180deg) scale(1.08);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.35);
}

.vc-swap-btn:active {
  transform: rotate(180deg) scale(0.95);
}

@media (max-width: 640px) {
  .vc-lang-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }
  .vc-swap-btn {
    align-self: center;
    margin-top: 0;
    width: 36px;
    height: 36px;
  }
}

/* Dual Mics Layout */
.vc-mics-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

@media (max-width: 768px) {
  .vc-mics-container {
    grid-template-columns: 1fr;
  }
}

.vc-mic-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}

.vc-mic-card.kurdish-mic-card {
  border-color: rgba(239, 68, 68, 0.3);
}
.vc-mic-card.kurdish-mic-card:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: #ef4444;
}

.vc-mic-card.english-mic-card {
  border-color: rgba(59, 130, 246, 0.3);
}
.vc-mic-card.english-mic-card:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: #3b82f6;
}

.vc-card-badge {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  margin-bottom: 10px;
}
.kurdish-mic-card .vc-card-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.english-mic-card .vc-card-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.vc-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.vc-mic-hint {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-bottom: 16px;
}

.vc-giant-mic-btn {
  width: 100%;
  max-width: 240px;
  padding: 16px 20px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.vc-giant-mic-btn.kurdish {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}
.vc-giant-mic-btn.kurdish:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.5);
}
.vc-giant-mic-btn.kurdish.recording {
  animation: pulse-kurdish-mic 1s infinite alternate;
  background: #ef4444;
}

.vc-giant-mic-btn.english {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.vc-giant-mic-btn.english:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
}
.vc-giant-mic-btn.english.recording {
  animation: pulse-english-mic 1s infinite alternate;
  background: #3b82f6;
}

.vc-center-auto-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.auto-divider-icon {
  font-size: 1.4rem;
  color: var(--text-dim);
  font-weight: 700;
}

.vc-auto-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.vc-auto-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Conversation Feed */
.vc-history-section {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vc-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vc-conversation-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.vc-dialogue-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.vc-dialogue-item.kurdish-turn {
  border-right: 4px solid #ef4444;
}
.vc-dialogue-item.english-turn {
  border-left: 4px solid #3b82f6;
}

.vc-dialogue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.vc-turn-original {
  font-size: 0.95rem;
  color: #fff;
  line-height: 1.5;
  font-weight: 500;
}

.vc-turn-translated {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: 8px;
  gap: 10px;
}

.vc-translated-text {
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.5;
}
.kurdish-turn .vc-translated-text {
  color: #93c5fd;
}
.english-turn .vc-translated-text {
  color: #fca5a5;
}

.vc-play-turn-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.vc-play-turn-btn:hover, .vc-play-turn-btn:active {
  background: rgba(59, 130, 246, 0.4);
  border-color: #3b82f6;
  transform: scale(1.1);
}

.vc-empty-placeholder {
  text-align: center;
  padding: 40px 20px;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Layout Optimization
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    -webkit-text-size-adjust: 100%;
  }

  .app-container {
    padding: 12px 14px 40px;
    gap: 14px;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Header Optimization */
  .app-header {
    flex-direction: column;
    align-items: stretch;
    padding: 4px 0 6px;
    gap: 12px;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
  }

  .logo-gemini {
    width: 54px;
    height: 46px;
    padding: 4px 6px;
    border-radius: 12px;
    flex-shrink: 0;
  }

  .brand-text {
    flex: 1;
    min-width: 0;
  }

  .brand-text h1 {
    font-size: 1.85rem;
    line-height: 1.15;
    gap: 4px;
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-text .tagline {
    font-size: 0.78rem;
    line-height: 1.3;
    margin-top: 2px;
    color: var(--text-muted);
  }

  .header-actions {
    display: flex;
    width: 100%;
    gap: 8px;
    justify-content: space-between;
  }

  .header-actions .pill-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  /* Main Navigation Tabs: Sleek iOS Segmented Style */
  .app-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 700;
    min-height: 52px;
    border: 1px solid transparent;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
  }

  .nav-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .nav-sub-txt {
    display: none !important;
  }

  .nav-tab.active {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.35), rgba(185, 28, 28, 0.55));
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  }

  .nav-tab .live-pill {
    padding: 1px 4px;
    font-size: 0.65rem;
    gap: 3px;
  }

  .nav-tab .live-pill-txt {
    display: none !important;
  }

  /* Voice VC Top Banner Card */
  .voice-vc-top-banner {
    padding: 14px 14px 12px;
    border-radius: 18px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .voice-vc-top-left {
    min-width: 0;
    width: 100%;
    gap: 10px;
    align-items: flex-start;
  }

  .voice-vc-pulse-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .voice-vc-top-left div {
    flex: 1;
    min-width: 0;
  }

  .voice-vc-top-left div span[style*="font-weight: 700"] {
    font-size: 0.9rem !important;
  }

  .voice-vc-top-left p {
    font-size: 0.76rem !important;
    line-height: 1.35;
  }

  .vc-tag-badge {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  .voice-vc-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .vc-quick-mic-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 6px;
    font-size: 0.78rem;
    white-space: nowrap;
    border-radius: 12px;
  }

  .vc-open-full-btn,
  #openFullVcViewBtn {
    grid-column: 1 / -1;
    width: 100% !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    font-size: 0.84rem !important;
    border-radius: 12px !important;
  }

  /* Tone Selection Bar */
  .tones-bar {
    padding: 8px 12px;
    border-radius: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .tone-label {
    font-size: 0.8rem;
  }

  .tone-options {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .tone-options::-webkit-scrollbar {
    display: none;
  }

  .tone-chip {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 0.76rem;
    border-radius: 10px;
  }

  /* Main Translation Grid */
  .translator-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  .panel {
    min-height: 240px;
    padding: 14px;
    border-radius: 16px;
    box-sizing: border-box;
  }

  .panel-header {
    padding-bottom: 8px;
    gap: 8px;
  }

  .lang-select {
    font-size: 0.84rem;
    padding: 6px 12px 6px 28px;
  }

  [dir="rtl"] .lang-select {
    padding: 6px 28px 6px 12px;
  }

  .textarea-container textarea {
    font-size: 1rem;
    min-height: 120px;
  }

  .panel-footer {
    padding-top: 8px;
  }

  .swap-divider {
    padding: 4px 0;
    gap: 8px;
  }

  .swap-btn {
    width: 40px;
    height: 40px;
  }

  .translate-action-btn {
    padding: 10px 16px;
    font-size: 0.86rem;
  }

  /* Voice VC View Panel */
  .vc-wrapper {
    padding: 14px;
    border-radius: 18px;
    gap: 12px;
    box-sizing: border-box;
  }

  .vc-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .vc-room-info {
    gap: 10px;
    width: 100%;
  }

  .vc-room-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .vc-room-icon svg {
    width: 20px;
    height: 20px;
  }

  .vc-room-info h3 {
    font-size: 1.05rem !important;
  }

  .vc-subtitle {
    font-size: 0.74rem;
  }

  .vc-header-controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .vc-waveform-bar {
    padding: 12px 10px;
    border-radius: 14px;
    min-height: 54px;
  }

  .vc-status-text {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .vc-mics-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .vc-mic-card {
    padding: 14px 12px;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .vc-mic-hint {
    font-size: 0.72rem;
    margin-bottom: 8px;
  }

  .vc-giant-mic-btn {
    padding: 12px 16px;
    border-radius: 14px;
    gap: 10px;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .giant-mic-icon {
    width: 36px;
    height: 36px;
  }

  .giant-mic-icon svg {
    width: 20px;
    height: 20px;
  }

  .giant-btn-label {
    font-size: 0.92rem;
  }

  .vc-center-auto-card {
    padding: 2px 0;
    width: 100%;
  }

  .vc-auto-btn {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.78rem;
    border-radius: 12px;
  }

  .vc-history-section {
    padding: 12px;
    border-radius: 14px;
  }

  .vc-dialogue-item {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .vc-turn-original {
    font-size: 0.88rem;
  }

  .vc-turn-translated {
    padding: 8px 10px;
  }

  .vc-translated-text {
    font-size: 0.88rem;
  }

  /* Chat View */
  .chat-wrapper {
    height: calc(85vh - 60px);
    min-height: 460px;
    border-radius: 16px;
  }

  .chat-header {
    padding: 10px 14px;
  }

  .chat-messages {
    padding: 12px;
  }

  .chat-input-bar {
    padding: 10px 12px;
  }
}

@media (max-width: 390px) {
  .app-container {
    padding: 10px 10px 32px;
    gap: 12px;
  }
  .brand-text h1 {
    font-size: 1.65rem;
  }
  .brand-text .tagline {
    font-size: 0.72rem;
  }
  .header-actions .pill-btn {
    padding: 7px 8px;
    font-size: 0.74rem;
  }
  .nav-tab {
    font-size: 0.72rem;
    padding: 6px 2px;
  }
  .vc-quick-mic-btn {
    font-size: 0.72rem;
    padding: 8px 4px;
  }
}

/* ===== Phones: compact voice-conversation screen =====
   The two speak buttons must be visible without scrolling, side by side, on every phone size. */
@media (max-width: 600px) {
  #voiceVcView .vc-wrapper { padding: 12px; }
  #voiceVcView .vc-header { margin-bottom: 10px; gap: 8px; flex-wrap: wrap; }
  #voiceVcView .vc-subtitle { display: none; }
  #voiceVcView .vc-room-icon { display: none; }
  #voiceVcView .vc-room-info h3,
  #voiceVcView .vc-room-info h2 { font-size: 1rem !important; margin: 0; }
  #voiceVcView .vc-title-en { display: none; }
  #voiceVcView .vc-header-controls { gap: 6px; width: 100%; justify-content: space-between; }
  #voiceVcView .vc-auto-speak-toggle { padding: 6px 10px; font-size: 0.75rem; }
  #voiceVcView #clearVcHistoryBtn { padding: 6px 10px; font-size: 0.75rem; }

  /* the two language pickers side by side: [speaker 1] [swap] [speaker 2] */
  #voiceVcView .vc-lang-toolbar {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
    gap: 6px; padding: 8px; margin-bottom: 8px;
  }
  #voiceVcView .vc-lang-select-box { min-width: 0; }
  #voiceVcView .vc-lang-label { font-size: 0.68rem; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #voiceVcView .vc-select-input { height: 38px; min-height: 38px; font-size: 0.74rem; padding: 4px 4px 4px 18px; }
  #voiceVcView .vc-select-arrow { left: 6px; right: auto; }
  #voiceVcView .vc-swap-btn { width: 32px; height: 32px; margin-bottom: 3px; }

  #voiceVcView .vc-waveform-bar { padding: 8px 10px; min-height: 0; margin-bottom: 8px; }
  #voiceVcView .vc-status-text { font-size: 0.8rem; line-height: 1.5; }

  /* the two speak buttons next to each other, "auto" button underneath */
  #voiceVcView .vc-mics-container {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px;
  }
  #voiceVcView #vcSpeaker1Card { grid-column: 1; grid-row: 1; }
  #voiceVcView #vcSpeaker2Card { grid-column: 2; grid-row: 1; }
  #voiceVcView .vc-center-auto-card { grid-column: 1 / span 2; grid-row: 2; padding: 0; min-height: 0; flex-direction: row; justify-content: center; }
  #voiceVcView .vc-center-auto-card .auto-divider-icon { display: none; }
  #voiceVcView .vc-mic-card { padding: 10px 8px; gap: 6px; min-width: 0; min-height: 0; }
  #voiceVcView .vc-card-badge,
  #voiceVcView .vc-mic-hint { display: none; }
  #voiceVcView .vc-card-meta { font-size: 0.85rem; gap: 4px; }
  #voiceVcView .vc-card-meta .lang-title { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #voiceVcView .vc-card-meta .flag-icon { font-size: 0.9rem; }
  #voiceVcView .vc-giant-mic-btn { max-width: none; padding: 14px 6px; gap: 4px; font-size: 0.82rem; }
  #voiceVcView .giant-btn-label { font-size: 0.82rem; line-height: 1.3; }

  #voiceVcView .vc-empty-placeholder { padding: 16px 10px; min-height: 0; }
  #voiceVcView .vc-empty-placeholder p { font-size: 0.78rem; }
}
/* Phones: lighter graphics. Three huge blurred, always-moving background lights and frosted-glass
   blur behind every card made phones slow (heavy for the graphics chip and the battery).
   The soft red glow stays (the gradients are already soft), it just does not move or re-blur. */
@media (max-width: 900px), (pointer: coarse) {
  .ambient-glow { filter: none; animation: none; opacity: 0.3; }
  *, *::before, *::after {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* Hidden for now (user's request 2026-11-26): word-insights box, and the extra voice options next to the
   Kurdish play button (dialect, speaker name, speed, "main voice" label). The play button itself stays. */
#wordInsightsSection,
.tones-bar,
.voice-dialect-group,
#kurdishVoiceStatus,
.voice-speed-group,
.voice-main-indicator { display: none !important; }

/* Opened from the home screen (full screen): keep the top of the app below the phone's status bar / notch */
@media (display-mode: standalone), (display-mode: fullscreen) {
  .app-container { padding-top: calc(env(safe-area-inset-top, 0px) + 12px); }
}

/* very small / old phones: drop extras so the speak buttons still fit on the first screen */
@media (max-width: 380px) {
  .brand-text .tagline { display: none; }
  #voiceVcView .live-pill { display: none; }
  #voiceVcView .vc-status-text { font-size: 0.72rem; }
  #voiceVcView .vc-header { margin-bottom: 6px; }
}
