:root {
  --bg: #0a0908;
  --surface: #18140f;
  --surface-border: #2a2219;
  --text: #f3ede4;
  --text-muted: #948d80;

  --accent-core: #ffd28a;
  --accent-mid: #ff8a3d;
  --accent-outer: #ff5a1f;

  --font-brand: "Manrope", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

.screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ---------- Login ekrani ---------- */
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 28px;
  margin: 0;
  background: linear-gradient(135deg, var(--accent-core), var(--accent-outer));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  margin: -8px 0 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.field input {
  background: var(--bg);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.field input:focus-visible {
  outline: 2px solid var(--accent-mid);
  outline-offset: 1px;
}

.btn-primary {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--accent-mid), var(--accent-outer));
  color: #1a0e04;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-primary:focus-visible { outline: 2px solid var(--accent-core); outline-offset: 2px; }
.btn-primary:active { transform: translateY(1px); }

.error { color: #ff8080; font-size: 13px; margin: 0; }

/* ---------- Asosiy ekran ---------- */
#main-screen { position: relative; flex-direction: column; }

.icon-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 16px;
  cursor: pointer;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

/* Shar (orb) - "nafas oladigan" porlash effekti, Yandex Musika "Moya Volna"
   ekranidagi halqasimon nur uslubidan ilhomlangan (foydalanuvchi yuborgan rasm). */
.orb {
  position: relative;
  width: min(62vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.orb-ring,
.orb-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.orb-ring {
  background: radial-gradient(circle, transparent 54%, var(--accent-mid) 63%, transparent 74%);
  filter: blur(14px);
  animation: breathe 4.2s ease-in-out infinite;
}

.orb-ring--2 {
  inset: 8%;
  background: radial-gradient(circle, transparent 58%, var(--accent-core) 66%, transparent 76%);
  filter: blur(10px);
  animation: breathe 4.2s ease-in-out infinite reverse;
  opacity: .8;
}

.orb-core {
  inset: 34%;
  background: radial-gradient(circle, var(--accent-core), transparent 72%);
  filter: blur(16px);
  opacity: .45;
  animation: breathe 4.2s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.07); opacity: 1; }
}

/* Gaplashayotganda/eshitayotganda effekt tezlashadi - shu "ozgarish" talabini bildiradi */
.orb[data-state="listening"] .orb-ring,
.orb[data-state="listening"] .orb-ring--2,
.orb[data-state="listening"] .orb-core {
  animation-duration: 1.5s;
}

.orb[data-state="speaking"] .orb-ring,
.orb[data-state="speaking"] .orb-ring--2,
.orb[data-state="speaking"] .orb-core {
  animation-duration: .8s;
}

.status-text {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
  min-height: 1.2em;
}

.answer-text {
  max-width: 480px;
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  min-height: 1.5em;
}

@media (prefers-reduced-motion: reduce) {
  .orb-ring, .orb-ring--2, .orb-core { animation: none; }
}

/* Vaqtincha test rejimi - STT ulanguncha */
.test-form {
  display: flex;
  gap: 8px;
  width: min(90vw, 380px);
  margin-top: 8px;
}

.test-form input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.test-form input:focus-visible {
  outline: 2px solid var(--accent-mid);
  outline-offset: 1px;
}

.test-form button {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

/* Planshet / kompyuter uchun kengroq matn */
@media (min-width: 900px) {
  .answer-text { font-size: 20px; }
}
