/* LeadBox kalkulyator — mobile-first, dark. Brend: #0D1128, oq matn, yashil aksent. */
:root {
  --bg: #0D1128;
  --card: #161B36;
  --line: #262C4E;
  --text: #F5F7FF;
  --muted: #9AA3C7;
  --accent: #22C55E;
  --accent-dark: #04210F;
  --danger: #EF4444;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100dvh;
}
.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}

/* Topbar + progress */
.topbar { padding: 18px 0 10px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.brand span { color: var(--accent); }
.progress { margin-top: 12px; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .35s ease; }

/* Ekran */
.screen { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 0 24px; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.q-step { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.q-title { font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.q-sub { color: var(--muted); margin: 0 0 20px; font-size: 15px; }

/* Tanlov tugmalari */
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1.5px solid var(--line); color: var(--text);
  padding: 16px; border-radius: var(--radius); font-size: 16px; text-align: left;
  cursor: pointer; transition: border-color .15s, transform .05s;
}
.option:hover { border-color: #3A4270; }
.option:active { transform: scale(.99); }
.option.selected { border-color: var(--accent); background: rgba(34,197,94,.08); }
.option .chk { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.option.selected .chk { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }

/* Input */
.field { margin-top: 6px; }
.input {
  width: 100%; padding: 16px; font-size: 18px; border-radius: var(--radius);
  border: 1.5px solid var(--line); background: var(--card); color: var(--text);
}
.input:focus { outline: none; border-color: var(--accent); }
.input-hint { color: var(--muted); font-size: 13px; margin-top: 8px; }
.input-error { color: var(--danger); font-size: 14px; margin-top: 8px; min-height: 18px; }

/* Navigatsiya */
.nav { display: flex; gap: 10px; margin-top: 24px; }
.btn {
  flex: 1; padding: 15px; border-radius: var(--radius); font-size: 16px; font-weight: 700;
  border: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-dark); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { flex: 0 0 auto; background: transparent; color: var(--muted); border: 1.5px solid var(--line); }

/* Natija ekrani */
.result { text-align: center; }
.result h2 { font-size: 22px; margin: 0 0 20px; }
.cpl-row { display: flex; gap: 12px; margin-bottom: 22px; }
.cpl-box { flex: 1; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 12px; }
.cpl-box .label { color: var(--muted); font-size: 13px; }
.cpl-box .val { font-size: 30px; font-weight: 800; margin-top: 4px; }
.cpl-box.you { border-color: var(--danger); }
.cpl-box.bench { border-color: var(--accent); }
.cpl-box.you .val { color: #FCA5A5; }
.cpl-box.bench .val { color: var(--accent); }

.waste {
  background: linear-gradient(135deg, rgba(239,68,68,.14), rgba(239,68,68,.05));
  border: 1.5px solid var(--danger); border-radius: var(--radius); padding: 22px; margin-bottom: 22px;
}
.waste .cap { color: var(--muted); font-size: 14px; }
.waste .big { font-size: 40px; font-weight: 900; color: #FCA5A5; margin: 6px 0; line-height: 1.1; }
.waste .sub { color: var(--text); font-size: 15px; }

.cta-note { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.tg-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 17px; border-radius: var(--radius); background: var(--accent);
  color: var(--accent-dark); font-weight: 800; font-size: 17px; text-decoration: none;
}
.tg-btn:active { transform: scale(.99); }

.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.center { text-align: center; }
.muted { color: var(--muted); }
