:root{
  --bg0:#070A12;
  --bg1:#0B1024;
  --card:#0f1733cc;
  --card2:#0b1228cc;
  --stroke:#ffffff14;
  --text:#eaf0ff;
  --muted:#b7c3e8cc;
  --accent:#7c5cff;
  --accent2:#32d5ff;
  --good:#25d695;
  --bad:#ff4d6d;
  --warn:#ffcc66;
  --shadow: 0 24px 70px rgba(0,0,0,.55);
  --shadow2: 0 12px 40px rgba(0,0,0,.35);
  --r: 18px;
  --ease: cubic-bezier(.2,.9,.2,1);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(124,92,255,.22), transparent 55%),
              radial-gradient(900px 500px at 85% 20%, rgba(50,213,255,.18), transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--text);
  overflow-x:hidden;
}

.bg{
  position:fixed; inset:0;
  background:
    radial-gradient(900px 450px at 20% 70%, rgba(37,214,149,.10), transparent 60%),
    radial-gradient(900px 450px at 80% 80%, rgba(255,77,109,.08), transparent 60%);
  filter: blur(0px);
  pointer-events:none;
  z-index:-1;
}

.topbar{
  position:sticky; top:0;
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px clamp(16px, 3vw, 28px);
  background: linear-gradient(180deg, rgba(7,10,18,.85), rgba(7,10,18,.35));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
}

.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:42px; height:42px;
  display:grid; place-items:center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(50,213,255,.8));
  box-shadow: 0 12px 30px rgba(124,92,255,.22);
  font-weight:800;
  letter-spacing:.6px;
}
.title .kicker{font-size:12px; color: var(--muted)}
.title .name{font-size:14px; font-weight:700}

.shell{
  width:min(1100px, calc(100% - 32px));
  margin: 22px auto 60px;
  display:grid;
  gap: 18px;
}

.panel{
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: var(--shadow2);
  overflow:hidden;
  animation: popIn .6s var(--ease) both;
}
.panel.hidden{display:none}
.panel-head{
  padding: 18px 18px 10px;
}
.panel-head.row{
  display:flex; align-items:flex-start; justify-content:space-between; gap: 14px;
}
.panel-head h2{margin:0 0 6px; font-size:18px}
.muted{color: var(--muted); font-size:13px; line-height:1.5}

.test-grid{
  padding: 8px 18px 18px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.test-tile{
  cursor:pointer;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, rgba(124,92,255,.16), rgba(50,213,255,.08));
  padding: 14px 14px 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  position:relative;
  overflow:hidden;
}
.test-tile::after{
  content:"";
  position:absolute; inset:-60px;
  background: radial-gradient(300px 140px at 20% 20%, rgba(255,255,255,.12), transparent 60%),
              radial-gradient(260px 160px at 80% 60%, rgba(255,255,255,.10), transparent 65%);
  transform: rotate(10deg);
  pointer-events:none;
}
.test-tile:hover{
  transform: translateY(-3px);
  border-color:#ffffff26;
  box-shadow: 0 26px 60px rgba(0,0,0,.35);
}
.test-tile .t-title{font-weight:800; letter-spacing:.2px}
.test-tile .t-sub{margin-top:6px}
.test-tile .t-meta{margin-top:10px; display:flex; gap:8px; flex-wrap:wrap}

.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.16);
  font-size:12px;
  color: var(--muted);
}

.btn{
  cursor:pointer;
  border: 1px solid #ffffff18;
  color: var(--text);
  font-weight:700;
  border-radius: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(50,213,255,.75));
  box-shadow: 0 14px 35px rgba(124,92,255,.20);
  transition: transform .18s var(--ease), filter .18s var(--ease);
}
.btn:hover{transform: translateY(-1px); filter: brightness(1.04)}
.btn:active{transform: translateY(0px) scale(.99)}
.btn.ghost{
  background: rgba(255,255,255,.04);
  box-shadow:none;
}

.meta{display:flex; flex-wrap:wrap; gap:8px}

.progress{
  height: 10px;
  background: rgba(255,255,255,.05);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}
.progress-bar{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(124,92,255,.95), rgba(50,213,255,.85));
  transition: width .45s var(--ease);
  box-shadow: 0 0 30px rgba(50,213,255,.20);
}

.stage{padding: 16px 18px 20px}
.card{
  perspective: 1400px;
  border-radius: 22px;
  position:relative;
}
.card-face{
  position:relative;
  min-height: 320px;
  border-radius: 22px;
  padding: 18px 18px 16px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(15,23,51,.75), rgba(11,18,40,.55));
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card-face::before{
  content:"";
  position:absolute; inset:-1px;
  background:
    radial-gradient(520px 220px at 20% 0%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(520px 220px at 80% 30%, rgba(50,213,255,.14), transparent 60%);
  pointer-events:none;
}

.q-badge{
  width:40px; height:40px;
  display:grid; place-items:center;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.18);
  font-weight:800;
  position:relative;
}
.question{
  margin: 12px 0 14px;
  font-size: 18px;
  line-height: 1.35;
}

.answers{display:grid; gap:10px; margin-top: 6px}
.option{
  display:flex; align-items:flex-start; gap:10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  user-select:none;
  transition: transform .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.option:hover{transform: translateY(-1px); border-color:#ffffff22}
.option .dot{
  margin-top: 4px;
  width: 12px; height: 12px;
  border-radius: 999px;
  border: 2px solid #ffffff2a;
  background: rgba(0,0,0,.18);
  flex: 0 0 auto;
  transition: transform .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}
.option.multi .dot{
  border-radius: 4px;
}
.option.selected{
  border-color: rgba(124,92,255,.45);
  background: rgba(124,92,255,.10);
}
.option.selected .dot{
  border-color: rgba(124,92,255,.65);
  background: rgba(124,92,255,.35);
  transform: scale(1.05);
}

.option.correct{
  border-color: rgba(37,214,149,.55);
  background: rgba(37,214,149,.12);
}
.option.correct .dot{
  border-color: rgba(37,214,149,.8);
  background: rgba(37,214,149,.35);
}
.option.wrong{
  border-color: rgba(255,77,109,.55);
  background: rgba(255,77,109,.12);
}
.option.wrong .dot{
  border-color: rgba(255,77,109,.8);
  background: rgba(255,77,109,.35);
}
.option.dim{opacity:.55}
.option.correct:not(.dim){
  animation: pulseGood .45s var(--ease) both;
}
.option.wrong{
  animation: pulseBad .45s var(--ease) both;
}

.result-head{margin-top: 10px}
.result-title{font-size:20px; font-weight:800}
.result-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top: 14px}

.feedback{
  margin-top: 14px;
  border-top: 1px solid var(--stroke);
  padding-top: 12px;
  animation: fadeUp .35s var(--ease) both;
}
.feedback.hidden{display:none}

.review-options{display:grid; gap:10px; margin-top: 10px}

.summary{
  padding: 12px 18px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  flex-wrap:wrap;
}
.score-big{
  font-size: 42px;
  font-weight: 900;
  letter-spacing: .5px;
  background: linear-gradient(90deg, rgba(124,92,255,1), rgba(50,213,255,1));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
}
.breakdown{padding: 0 18px 18px; display:grid; gap:10px}
.row-item{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  border-radius: 16px;
  padding: 12px 12px;
  display:flex; align-items:flex-start; justify-content:space-between; gap: 12px;
}
.row-item .ri-title{font-weight:700; line-height:1.25}
.row-item .ri-score{font-weight:800}

.footer{
  padding: 0 16px 22px;
  text-align:center;
}

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

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

@keyframes pulseGood{
  0%{transform: translateY(0)}
  45%{transform: translateY(-1px)}
  100%{transform: translateY(0)}
}
@keyframes pulseBad{
  0%{transform: translateY(0)}
  40%{transform: translateY(1px)}
  100%{transform: translateY(0)}
}

@media (max-width: 520px){
  .question{font-size:16px}
  .card-face{min-height: 360px}
}


