:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #171a21;
  --text: #f2f3f5;
  --muted: #8b93a1;
  --accent: #4da3ff;
  --ok: #35c46a;
  --off: #e0463f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #262b36;
}

header h1 {
  font-size: 1.25rem;
  margin: 0;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-offline {
  background: var(--off);
}

.dot-online {
  background: var(--ok);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.controls label {
  color: var(--muted);
  font-size: 0.9rem;
}

.controls select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid #2a2f3a;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
}

.subtitles {
  flex: 1;
  background: var(--panel);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  min-height: 320px;
}

.partial {
  min-height: 2.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.85;
}

.history {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.9rem;
  overflow-y: auto;
}

.entry {
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

.entry .translated {
  font-size: 1.15rem;
  font-weight: 600;
}

.entry .original {
  font-size: 0.85rem;
  color: var(--muted);
}
