/* MAHEER — Desktop & Responsive Update */

:root{
  --blue:#356ae6;
  --blue-dark:#2857c7;
  --blue-soft:#eef4ff;
  --ink:#25324a;
  --muted:#697386;
  --line:#e5eaf3;
  --surface:#fff;
  --surface-soft:#f7f9fd;
  --shadow:0 18px 50px rgba(30,50,80,.10);
  --shadow-hover:0 20px 55px rgba(30,50,80,.16);
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  min-height:100vh;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 10% 0%,rgba(79,125,243,.10),transparent 30%),
    radial-gradient(circle at 90% 10%,rgba(255,196,120,.12),transparent 28%),
    linear-gradient(135deg,#f4f8ff 0%,#fffaf5 100%);
  -webkit-font-smoothing:antialiased;
}

button,a{font:inherit}

.container{
  width:min(1120px,100%);
  margin:0 auto;
  padding:34px 22px 64px;
}

.card{
  width:100%;
  background:var(--surface);
  border:1px solid rgba(229,234,243,.95);
  border-radius:28px;
  padding:30px;
  box-shadow:var(--shadow);
}

.card:not(.hero){
  max-width:920px;
  margin-left:auto;
  margin-right:auto;
}

/* HOME */
.hero{
  max-width:1120px;
  margin:0 auto;
  text-align:center;
  padding:42px 42px 34px;
}

.logo{
  display:inline-block;
  font-size:clamp(38px,5vw,54px);
  line-height:1;
  font-weight:950;
  letter-spacing:3px;
  color:var(--blue);
  text-shadow:0 5px 18px rgba(53,106,230,.16);
}

.hero h1{
  margin:16px auto 10px;
  max-width:760px;
  font-size:clamp(24px,3vw,34px);
  line-height:1.2;
  letter-spacing:-.5px;
}

.subtitle{
  max-width:760px;
  margin:0 auto;
  color:var(--muted);
  font-size:16px;
  line-height:1.7;
}

/* 5 kolom desktop */
.levels{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:16px;
  margin:30px auto 0;
  text-align:left;
}

.level-card{
  position:relative;
  min-height:126px;
  display:flex;
  flex-direction:column;
  padding:20px;
  border:2px solid var(--line);
  border-radius:20px;
  background:linear-gradient(180deg,#fff 0%,#f8faff 100%);
  text-decoration:none;
  color:var(--ink);
  box-shadow:0 8px 22px rgba(30,50,80,.055);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.level-card:not(.locked):hover{
  transform:translateY(-4px);
  border-color:#a9c0fb;
  box-shadow:var(--shadow-hover);
}

.level-card.locked{
  opacity:.62;
  cursor:not-allowed;
  background:#f5f7fa;
}

.level-card:focus-visible{
  outline:4px solid rgba(53,106,230,.22);
  outline-offset:3px;
}

.level-num{
  padding-right:30px;
  font-size:20px;
  font-weight:850;
  line-height:1.25;
}

.lock{
  position:absolute;
  top:17px;
  right:18px;
  font-size:22px;
}

.record{
  margin-top:auto;
  padding-top:14px;
  color:#657188;
  font-size:13px;
  line-height:1.45;
}

.tip{
  max-width:820px;
  margin:24px auto 0;
  padding:15px 18px;
  border:1px solid #f1dfaa;
  border-radius:16px;
  background:#fff8e7;
  color:#745b13;
  line-height:1.55;
  text-align:center;
}

.home-actions{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}

/* SOAL */
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:8px 13px;
  border:1px solid #dce7ff;
  border-radius:999px;
  background:var(--blue-soft);
  color:var(--blue);
  font-size:13px;
  font-weight:800;
}

.progress{
  width:100%;
  height:10px;
  margin:20px 0 28px;
  overflow:hidden;
  border-radius:999px;
  background:#edf0f5;
}

.progress span{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#4f7df3,#356ae6);
  transition:width .25s ease;
}

.question{
  max-width:800px;
  margin:0 auto 26px;
  font-size:clamp(23px,3vw,30px);
  font-weight:850;
  line-height:1.4;
  text-align:center;
}

.options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  max-width:900px;
  margin:0 auto;
}

.option{
  width:100%;
  min-height:66px;
  display:flex;
  align-items:center;
  text-align:left;
  padding:16px 18px;
  border:2px solid var(--line);
  border-radius:16px;
  background:#fff;
  color:var(--ink);
  font-size:17px;
  line-height:1.4;
  cursor:pointer;
  transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease;
}

.option:hover{
  transform:translateY(-2px);
  border-color:#b8c9f4;
  background:#fbfdff;
  box-shadow:0 7px 18px rgba(30,50,80,.08);
}

.option.selected{
  border-color:var(--blue);
  background:var(--blue-soft);
  box-shadow:0 7px 18px rgba(53,106,230,.10);
}

.option:focus-visible,.primary:focus-visible,.btn:focus-visible{
  outline:4px solid rgba(53,106,230,.22);
  outline-offset:3px;
}

.primary,.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  border:0;
  border-radius:14px;
  padding:13px 19px;
  background:linear-gradient(135deg,#3d73eb,#356ae6);
  color:#fff;
  text-decoration:none;
  font-weight:850;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(53,106,230,.18);
  transition:transform .16s ease,box-shadow .16s ease,opacity .16s ease;
}

.primary:hover,.btn:hover{
  transform:translateY(-2px);
  box-shadow:0 11px 24px rgba(53,106,230,.24);
}

.primary:disabled{
  opacity:.42;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

.next{
  width:100%;
  max-width:900px;
  margin:20px auto 0;
}

.actions{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
}

.reset{
  background:#fff;
  border:2px solid #e05a5a;
  color:#c43e3e;
  box-shadow:none;
}

.reset:hover{
  background:#fff7f7;
  border-color:#cf4747;
  box-shadow:0 8px 18px rgba(224,90,90,.12);
}

/* HASIL */
.result{text-align:center}

.score{
  margin:12px 0 4px;
  font-size:clamp(54px,8vw,78px);
  line-height:1;
  font-weight:950;
  color:var(--blue);
}

.result-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  max-width:560px;
  margin:22px auto;
}

.result-box{
  padding:18px;
  border:1px solid #e9edf4;
  border-radius:18px;
  background:var(--surface-soft);
  color:var(--muted);
}

.result-box b{
  display:block;
  margin-bottom:4px;
  font-size:34px;
  line-height:1;
  color:var(--ink);
}

.review{
  max-width:800px;
  margin:28px auto 0;
  text-align:left;
}

.review-item{
  padding:14px 0;
  border-bottom:1px solid #edf0f5;
  line-height:1.6;
}

.small{
  color:var(--muted);
  font-size:14px;
}

/* TABLET */
@media (max-width:1099px){
  .levels{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media (max-width:899px){
  .container{padding:26px 18px 50px}
  .hero{padding:34px 26px 30px}
  .levels{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width:699px){
  .levels{grid-template-columns:repeat(2,minmax(0,1fr))}
  .options{grid-template-columns:1fr}
  .card{padding:22px;border-radius:22px}
  .hero{padding:30px 20px 26px}
  .question{font-size:22px}
}

@media (max-width:559px){
  .container{padding:16px 12px 38px}
  .hero{padding:26px 16px 22px}
  .levels{grid-template-columns:1fr;gap:12px}
  .level-card{min-height:108px}
  .card{padding:18px;border-radius:20px}
  .logo{font-size:40px}
  .hero h1{font-size:24px}
  .subtitle{font-size:14px}
  .question{font-size:21px;line-height:1.45}
  .option{min-height:60px;padding:14px 15px;font-size:16px}
}

/* Kurangi animasi jika perangkat meminta */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition:none!important}
}
