:root {
  --bg: #0b0f14;
  --fg: #f2f5f7;
  --muted: #8b98a5;
  --accent: #3ea6ff;
  --danger: #ff5a5f;
  --pane-bg: #131a22;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.app-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1rem;
}

.status {
  font-size: 0.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #1c2733;
  color: var(--muted);
}

.status-listening {
  background: #123a24;
  color: #4ade80;
}

.status-connecting {
  background: #3a3312;
  color: #facc15;
}

.status-error {
  background: #3a1414;
  color: var(--danger);
}

.settings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  padding: 0 1rem 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.settings label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.settings select {
  background: var(--pane-bg);
  color: var(--fg);
  border: none;
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 1rem;
  overflow: hidden;
}

.pane {
  background: var(--pane-bg);
  border-radius: 12px;
  padding: 1rem;
  overflow-y: auto;
}

.pane-arabic {
  flex: 2;
}

.pane-turkish {
  flex: 1;
  opacity: 0.75;
}

.pane-label {
  margin: 0 0 0.5rem 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.pane-arabic .pane-text {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  line-height: 1.5;
}

.pane-turkish .pane-text {
  font-size: clamp(1rem, 3vw, 1.4rem);
  line-height: 1.4;
}

.pane-text {
  margin: 0;
  white-space: pre-wrap;
}

.controls {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
}

button {
  flex: 1;
  padding: 0.9rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #04101c;
  font-weight: 600;
}

button:disabled {
  background: #263340;
  color: var(--muted);
}

#stopBtn {
  background: var(--danger);
  color: #200404;
}

#stopBtn:disabled {
  background: #263340;
  color: var(--muted);
}
