/* Quizzy Esvita — built on the Esvita doctors design tokens */
:root {
  --bg: #030a2c;
  --bg-2: #0a1546;
  --bg-3: #101a4a;
  --glow: #0a2adf;
  --line: rgba(140, 165, 255, 0.14);
  --line-2: rgba(140, 165, 255, 0.28);
  --text: #f5f6fb;
  --text-2: #aab2cc;
  --text-3: #6f7899;
  --blue: #385cad;
  --link: #7fa2ff;
  --green: #6cca98;
  --red: #ef6f7a;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  /* answer tiles */
  --a0: #e5566a; /* triangle */
  --a1: #3f6cf0; /* diamond */
  --a2: #e0a63a; /* circle */
  --a3: #2fa877; /* square */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(80% 55% at 50% 0%, rgba(10, 42, 223, 0.45) 0%, rgba(10, 42, 223, 0.12) 45%, rgba(3, 10, 44, 0) 75%), var(--bg);
  background-attachment: fixed;
  color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.5;
  letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 760px) { .wrap { padding: 0 16px; } }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; height: 56px; background: rgba(3, 10, 44, 0.8);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand img { height: 30px; width: auto; }
.brand .sep { width: 1px; height: 20px; background: var(--line-2); }
.brand b { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.brand b span { color: var(--link); }

/* type */
h1 { font-size: clamp(34px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 700; }
h2 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; }
.label { font-size: 13px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.muted { color: var(--text-2); }
.small { font-size: 14px; color: var(--text-3); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-size: 16px; font-weight: 600; background: var(--text); color: var(--bg); transition: transform .12s, background .12s, opacity .12s; white-space: nowrap; }
.btn:hover { background: #fff; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: rgba(140, 165, 255, 0.08); }
.btn.blue { background: var(--glow); color: #fff; }
.btn.blue:hover { background: #2443f0; }
.btn.danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1px rgba(239, 111, 122, .35); }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.btn.lg { padding: 16px 32px; font-size: 19px; }

/* forms */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--text-2); font-weight: 500; }
.input { width: 100%; background: rgba(3, 10, 44, 0.6); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .12s, box-shadow .12s; }
.input:focus { border-color: var(--link); box-shadow: 0 0 0 3px rgba(127, 162, 255, .18); }
textarea.input { resize: vertical; min-height: 64px; }

/* cards */
.card { background: rgba(10, 21, 70, 0.72); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.err { color: var(--red); font-size: 14px; min-height: 20px; }

/* center screen */
.center { min-height: calc(100vh - 56px); display: grid; place-items: center; padding: 32px 16px; }
.center.full { min-height: 100vh; }

/* shapes on answer tiles */
.shape { width: 28px; height: 28px; flex: none; background: #fff; }
.shape.s0 { clip-path: polygon(50% 6%, 96% 92%, 4% 92%); }
.shape.s1 { clip-path: polygon(50% 2%, 98% 50%, 50% 98%, 2% 50%); }
.shape.s2 { border-radius: 50%; }
.shape.s3 { border-radius: 3px; transform: scale(.86); }
.t0 { background: var(--a0); } .t1 { background: var(--a1); } .t2 { background: var(--a2); } .t3 { background: var(--a3); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.3); }

@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.pop { animation: pop .35s ease-out both; }
.rise { animation: rise .4s ease-out both; }
