/* ztest — заставка в духе современных ИИ-лендингов: ночь, тёплое свечение, плавность */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0b0d14;
  --card: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f2f0ea;
  --dim: #9aa0b4;
  --amber: #f5b85c;
  --amber2: #e78a3e;
  --ok: #6fd88f;
  --bad: #f07178;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- фон: свечения и звёзды ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }

.orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb-a { width: 46vw; height: 46vw; left: -10vw; top: -12vw; background: radial-gradient(circle, #f5b85c, transparent 65%); }
.orb-b { width: 40vw; height: 40vw; right: -8vw; bottom: -10vw; background: radial-gradient(circle, #5c7cf5, transparent 65%); animation-delay: -9s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(4vw, 6vh) scale(1.15); }
}

.stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: .7; animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .8; } }

/* ---------- экраны ---------- */
main { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }

.screen { display: none; width: min(720px, 100%); animation: rise .5s ease; }
.screen.show { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- заставка ---------- */
.landing { text-align: center; }

.logo {
  font-size: 30px; font-weight: 800; letter-spacing: .5px; margin-bottom: 28px;
  color: var(--amber);
}
.logo span { color: var(--text); font-weight: 300; }

h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.12; font-weight: 700; letter-spacing: -.5px; }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--amber), var(--amber2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.tagline { color: var(--dim); margin: 20px auto 32px; max-width: 480px; line-height: 1.55; font-size: 17px; }

.btn-big {
  font-size: 19px; padding: 17px 42px; border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(90deg, var(--amber), var(--amber2)); color: #221603;
  font-weight: 700; transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 8px 40px rgba(245, 184, 92, .35);
}
.btn-big:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 50px rgba(245, 184, 92, .5); }

.features { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 54px; }
.feature {
  display: flex; gap: 10px; align-items: center; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px;
  backdrop-filter: blur(10px); font-size: 14px;
}
.feature div { display: flex; flex-direction: column; gap: 2px; }
.feature b { font-size: 14px; }
.feature span { color: var(--dim); font-size: 12.5px; }

/* ---------- карточки-экраны ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 30px; backdrop-filter: blur(14px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}
.card.center { text-align: center; }

h2 { font-size: 24px; margin-bottom: 8px; }
h3 { font-size: 20px; line-height: 1.45; margin: 18px 0 6px; }
.hint { color: var(--dim); font-size: 14.5px; line-height: 1.5; margin-bottom: 18px; }

input[type="text"], textarea, select {
  width: 100%; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); padding: 14px 16px; font-size: 15px; font-family: inherit; outline: none;
  transition: border-color .2s;
  margin-bottom: 14px; resize: vertical;
}
input[type="text"]:focus, textarea:focus, select:focus { border-color: var(--amber); }
select option { color: #222; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row.center { justify-content: center; }

.btn {
  padding: 13px 22px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer;
  background: rgba(255, 255, 255, .07); color: var(--text); font-size: 15px; font-family: inherit;
  transition: transform .15s ease, background .15s;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .12); }
.btn.primary { background: linear-gradient(90deg, var(--amber), var(--amber2)); color: #221603; font-weight: 700; border: none; }
.btn.ghost { background: transparent; }

/* ---------- загрузка ---------- */
.spinner {
  width: 46px; height: 46px; margin: 6px auto 18px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--amber); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: 10px 0 18px; }
.progress i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--amber), var(--amber2)); transition: width .3s ease; }
.progress.thin { height: 5px; margin: 10px 0 4px; }

/* ---------- тест ---------- */
.quiz-top { display: flex; justify-content: space-between; color: var(--dim); font-size: 14px; }

#quiz-options { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
#quiz-options button {
  text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05); color: var(--text); font-size: 15.5px; font-family: inherit;
  cursor: pointer; transition: all .15s;
}
#quiz-options button:hover { border-color: var(--amber); transform: translateX(4px); }
#quiz-options button.picked { border-color: var(--amber); background: rgba(245, 184, 92, .13); }

#quiz-answer { display: none; }

#quiz-verdict { min-height: 30px; margin-top: 10px; font-size: 15px; }
#quiz-verdict .ok { color: var(--ok); font-weight: 600; }
#quiz-verdict .bad { color: var(--bad); font-weight: 600; }

/* ---------- результат ---------- */
.mark {
  width: 108px; height: 108px; margin: 8px auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--amber2)); color: #221603;
  box-shadow: 0 10px 44px rgba(245, 184, 92, .4);
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

@media (max-width: 560px) {
  .card { padding: 22px; }
  .features { flex-direction: column; align-items: stretch; }
}
