:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --muted2: rgba(255,255,255,.55);
  --brand: #4cc2ff;
  --good: #46d39a;
  --bad: #ff6b6b;
  --warn: #f6c177;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius: 16px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(76,194,255,.22), transparent 55%),
    radial-gradient(900px 500px at 85% 15%, rgba(70,211,154,.16), transparent 55%),
    radial-gradient(1000px 700px at 50% 95%, rgba(246,193,119,.14), transparent 60%),
    var(--bg);
}

.app{
  min-height: 100%;
  display:flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  max-width: 980px;
  margin: 0 auto;
}

.header{
  display:flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.05));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
}

.brand{
  display:flex;
  gap: 14px;
  align-items: center;
  flex: 1 1 320px;
  min-width: 0;
}

.logo{
  width: 48px;
  height: 48px;
  display:grid;
  place-items:center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(76,194,255,.95), rgba(70,211,154,.85));
  color: rgba(8,12,20,.95);
  font-weight: 900;
  letter-spacing: .5px;
}

.title{
  margin: 0;
  font-size: clamp(18px, 1.2vw + 14px, 22px);
  line-height: 1.2;
}
.subtitle{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.meta{
  flex: 1 1 260px;
  min-width: 0;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.metaRow{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.metaValue{ color: var(--text); font-weight: 700; }
.progressBar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
}
.progressFill{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(76,194,255,.95), rgba(70,211,154,.90));
  border-radius: 999px;
  transition: width .25s ease;
}

.main{
  flex: 1;
  display:grid;
  align-content:start;
  gap: 18px;
}

.card{
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.05));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
}
.hidden{ display:none; }

.cardTitle{
  margin: 0 0 10px;
  font-size: 18px;
}
.cardText{
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.qTop{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
}

.question{
  margin: 0 0 8px;
  font-size: clamp(16px, 1.1vw + 13px, 20px);
  line-height: 1.35;
}
.hint{
  margin: 0 0 14px;
  color: var(--muted2);
  font-size: 13px;
}

.answers{
  display:grid;
  gap: 10px;
  margin: 0;
}

.answer{
  display:flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  cursor:pointer;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.answer:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.18);
}
.answer:active{ transform: translateY(1px); }
.answer input{
  margin-top: 3px;
  accent-color: var(--brand);
}
.answerText{
  display:flex;
  flex-direction: column;
  gap: 4px;
}
.answerTitle{
  font-weight: 700;
  line-height: 1.25;
}
.answerSub{
  color: var(--muted2);
  font-size: 12px;
  line-height: 1.35;
}

.answer.correct{
  border-color: rgba(70,211,154,.65);
  background: rgba(70,211,154,.12);
}
.answer.wrong{
  border-color: rgba(255,107,107,.65);
  background: rgba(255,107,107,.10);
}

.feedback{
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  min-height: 48px;
  line-height: 1.5;
}
.feedback.good{
  border-color: rgba(70,211,154,.45);
  color: rgba(220,255,242,.92);
  background: rgba(70,211,154,.10);
}
.feedback.bad{
  border-color: rgba(255,107,107,.45);
  color: rgba(255,235,235,.92);
  background: rgba(255,107,107,.08);
}
.feedback.warn{
  border-color: rgba(246,193,119,.45);
  color: rgba(255,245,232,.92);
  background: rgba(246,193,119,.08);
}

.actions{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-top: 14px;
  flex-wrap: wrap;
}
.spacer{ flex:1; }

.btn{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 750;
  cursor:pointer;
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  transition: background .15s ease, border-color .15s ease, transform .06s ease, opacity .15s ease;
}
.btn:hover{
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.22);
}
.btn:active{ transform: translateY(1px); }
.btn.primary{
  background: linear-gradient(135deg, rgba(76,194,255,.95), rgba(70,211,154,.85));
  border-color: rgba(255,255,255,.12);
  color: rgba(8,12,20,.95);
}
.btn.primary:hover{
  filter: brightness(1.03);
}
.btn:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.resultScore{
  font-size: 34px;
  margin: 8px 0 8px;
  font-weight: 900;
  letter-spacing: .3px;
}

.details{
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding: 10px 12px;
}
.details summary{
  cursor:pointer;
  color: var(--text);
  font-weight: 800;
}
.review{
  margin-top: 10px;
  display:grid;
  gap: 10px;
}
.reviewItem{
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  padding: 10px;
}
.reviewQ{
  font-weight: 850;
  margin: 0 0 6px;
  line-height: 1.35;
}
.reviewA{
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.tag{
  display:inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 12px;
  margin-right: 8px;
}
.tag.good{ border-color: rgba(70,211,154,.45); background: rgba(70,211,154,.10); }
.tag.bad{ border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.08); }
.tag.warn{ border-color: rgba(246,193,119,.45); background: rgba(246,193,119,.08); }

.footer{
  color: var(--muted2);
  font-size: 12px;
  text-align: center;
  padding-bottom: 10px;
}
.footer code{
  color: rgba(255,255,255,.85);
}

@media (max-width: 520px){
  .app{ padding: 14px; }
  .resultScore{ font-size: 30px; }
  .header{ padding: 14px; }
  .card{ padding: 14px; }
  .answer{ padding: 12px 10px; }
  .btn{ width: 100%; }
  .spacer{ display:none; }
  .subtitle{ font-size: 12px; }
}

@media (max-width: 380px){
  .logo{ width: 44px; height: 44px; border-radius: 13px; }
  .resultScore{ font-size: 28px; }
}
