:root{
  --bg:#07111d;
  --bg-soft:#0b1726;
  --card:#0f1b2d;
  --card-2:#122136;
  --line:rgba(255,255,255,.08);
  --line-strong:rgba(255,255,255,.14);
  --text:#eef4fb;
  --muted:#9fb0c7;
  --accent:#4cc9ff;
  --accent-2:#7ce8ff;
  --accent-3:#6f8cff;
  --success:#63e6be;
  --danger:#ff8ea1;
  --shadow:0 20px 60px rgba(0,0,0,.35);
  --radius:20px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{scroll-behavior:smooth}

body{
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(76,201,255,.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(111,140,255,.16), transparent 50%),
    linear-gradient(180deg, #07111d 0%, #091321 100%);
  min-height:100vh;
}

.wrap{
  max-width:980px;
  margin:34px auto;
  padding:0 16px 48px;
}

.top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:18px;
}

.top h1{
  margin:0 0 8px 0;
  font-size:32px;
  line-height:1.05;
  letter-spacing:-0.03em;
}

.muted{
  color:var(--muted);
  line-height:1.5;
}

.lang-box{
  min-width:190px;
  max-width:220px;
}

.lang-box select{
  width:100%;
}

.lang-box label{
  display:block;
  margin-bottom:7px;
  font-size:13px;
  color:var(--muted);
}

.card{
  position:relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius:28px;
  padding:22px;
  box-shadow:var(--shadow);
  backdrop-filter: blur(10px);
}

.card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:28px;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.05), transparent 28%);
}

.progress-bar{
  position:relative;
  height:10px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
  border-radius:999px;
  overflow:hidden;
  margin-bottom:20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.progress{
  height:100%;
  width:0%;
  background:
    linear-gradient(90deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  box-shadow:0 0 20px rgba(76,201,255,.4);
  transition:width .35s ease;
}

.step-meta{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:18px;
}

.step-badge{
  display:inline-flex;
  align-self:flex-start;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
  background:rgba(255,255,255,.03);
}

.step-title{
  font-size:24px;
  line-height:1.15;
  font-weight:800;
  letter-spacing:-0.02em;
}

.field{
  margin:20px 0;
  animation: fadeUp .28s ease;
}

.field > label{
  display:block;
  margin-bottom:10px;
  font-size:15px;
  color:#c6d6ef;
  font-weight:600;
  line-height:1.5;
  letter-spacing:0.01em;
}

input, textarea{
  width:100%;
  padding:15px 16px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(8,16,28,.82);
  color:var(--text);
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
  font-size:14px;
}

select{
  width:100%;
  padding:15px 44px 15px 16px;
  border-radius:16px;
  border:1px solid var(--line);
  background-color:rgba(8,16,28,.82);
  color:var(--text);
  outline:none;
  font-size:14px;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, #9fb0c7 50%),
    linear-gradient(135deg, #9fb0c7 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
}

input::placeholder,
textarea::placeholder{
  color:#8094af;
}

input:focus, select:focus, textarea:focus{
  border-color:rgba(76,201,255,.5);
  box-shadow:0 0 0 4px rgba(76,201,255,.12);
  background:rgba(10,19,33,.96);
}

textarea{
  min-height:120px;
  resize:vertical;
}

.choice-group{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
}

.choice{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.02));
  cursor:pointer;
  min-height:60px;
  transition:border-color .15s ease, background .15s ease;
  line-height:normal;
}

.choice input{
  width:18px;
  height:18px;
  margin:0;
  accent-color:var(--accent);
  flex-shrink:0;
}

.choice span{
  display:block;
  font-size:15px;
  line-height:1.55;
  font-weight:500;
  letter-spacing:0.01em;
  color:#e8f1ff;
}

.choice input:focus{
  outline:none;
  box-shadow:none;
}

.choice:has(input:checked){
  border-color:rgba(76,201,255,.35);
  background:rgba(76,201,255,.06);
}

.choice:has(input:checked) span{
  color:#ffffff;
  font-weight:600;
}

.choice:hover{
  border-color:rgba(76,201,255,.22);
  background:linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  box-shadow:0 8px 24px rgba(0,0,0,.18);
}
.choice:hover span{
  color:#ffffff;
}

.other-wrap{
  margin-top:10px;
  padding:12px;
  border:1px dashed rgba(76,201,255,.25);
  border-radius:16px;
  background:rgba(76,201,255,.04);
  animation: fadeUp .2s ease;
}

.nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:26px;
}

.nav-right{
  display:flex;
  gap:10px;
}

.btn{
  appearance:none;
  border:none;
  border-radius:16px;
  padding:13px 18px;
  font-weight:800;
  font-size:14px;
  letter-spacing:.01em;
  cursor:pointer;
  background:linear-gradient(90deg, var(--accent), var(--accent-2));
  color:#03111a;
  transition:transform .16s ease, box-shadow .16s ease, opacity .16s ease;
  box-shadow:0 10px 24px rgba(76,201,255,.22);
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(76,201,255,.28);
}

.btn:disabled{
  opacity:.6;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

.btn.ghost{
  background:rgba(255,255,255,.03);
  color:var(--text);
  border:1px solid var(--line);
  box-shadow:none;
}

.btn.ghost:hover{
  background:rgba(255,255,255,.05);
}

.status{
  margin-top:14px;
  min-height:20px;
  font-size:14px;
}

.foot{
  margin-top:16px;
  font-size:14px;
}

.fade-in{
  animation: fadeUp .24s ease;
}

@keyframes fadeUp{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

.admin-card{
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
  margin:18px 0;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  box-shadow:0 10px 26px rgba(0,0,0,.14);
}

.admin-card-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.admin-meta{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  margin-top:12px;
  color:var(--muted);
  font-size:14px;
}

.answers-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:12px;
  margin-top:16px;
}

.answer-item{
  background:#0a1320;
  border:1px solid var(--line);
  border-radius:16px;
  padding:13px;
}

.answer-key{
  color:var(--muted);
  font-size:13px;
  margin-bottom:7px;
  font-weight:600;
}

.answer-value{
  color:var(--text);
  line-height:1.45;
  word-break:break-word;
}

.raw-json{
  white-space:pre-wrap;
  word-break:break-word;
  background:#09111b;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--line);
  margin-top:8px;
}

.score-pill{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  font-weight:800;
  font-size:13px;
}

.tier-A{
  background:rgba(76,201,255,.12);
  color:#8be8ff;
  border:1px solid rgba(76,201,255,.28);
}

.tier-B{
  background:rgba(255,213,79,.10);
  color:#ffe38a;
  border:1px solid rgba(255,213,79,.22);
}

.tier-C{
  background:rgba(255,151,166,.10);
  color:#ffb4be;
  border:1px solid rgba(255,151,166,.22);
}


@media (max-width: 760px){
  .top{
    flex-direction:column;
  }
  .lang-box{
    width:100%;
    max-width:none;
  }
  .choice-group{
    grid-template-columns:1fr;
  }
}

@media (max-width: 560px){
  .wrap{
    margin:20px auto;
  }
  .card{
    padding:16px;
    border-radius:22px;
  }
  .top h1{
    font-size:26px;
  }
  .step-title{
    font-size:21px;
  }
  .nav{
    flex-direction:column;
    align-items:stretch;
  }
  .nav-right{
    width:100%;
  }
  .nav-right .btn,
  .btn.ghost{
    flex:1;
  }
}