*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:sans-serif;
  background:#f5f7fb;
  color:#333;
}

header{
  background:#1e3a8a;
  color:white;
  text-align:center;
  padding:24px 12px;
}

#pageTitle{
  font-size:32px;
  margin-bottom:8px;
}

#pageDesc{
  font-size:14px;
  opacity:.9;
}

#quizList{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  padding:16px;
  background:white;
  border-bottom:1px solid #ddd;
}

#quizList a{
  text-decoration:none;
  color:#333;
  padding:10px 16px;
  border-radius:8px;
  background:#eee;
  transition:.2s;
  font-weight:bold;
}

#quizList a:hover{
  background:#ddd;
}

#quizList a.active{
  background:#2563eb;
  color:white;
}

.layout{
  display:flex;
  justify-content:center;
  gap:20px;
  padding:20px;
}

.quiz-box{
  flex:1;
  max-width:900px;
  background:white;
  padding:25px;
  border-radius:12px;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
}

.status{
  display:flex;
  justify-content:space-between;
  margin-bottom:15px;
  font-weight:bold;
}

.progress{
  width:100%;
  height:10px;
  background:#ddd;
  border-radius:20px;
  overflow:hidden;
  margin-bottom:25px;
}

#progressBar{
  height:100%;
  width:0%;
  background:#2563eb;
  transition:.3s;
}

#question{
  font-size:24px;
  line-height:1.6;
  margin-bottom:25px;
}

#choices{
  display:flex;
  flex-direction:column;
  gap:12px;
}

#choices button{
  border:none;
  background:#f3f4f6;
  padding:15px;
  font-size:17px;
  border-radius:10px;
  cursor:pointer;
  transition:.2s;
}

#choices button:hover{
  background:#e5e7eb;
}

#choices button.correct{
  background:#22c55e;
  color:white;
}

#choices button.wrong{
  background:#ef4444;
  color:white;
}

#choices button:disabled{
  cursor:not-allowed;
}

#result{
  margin-top:20px;
  font-size:18px;
  line-height:1.7;
  font-weight:bold;
}

.finish{
  text-align:center;
}

.finish p{
  font-size:28px;
  margin-bottom:20px;
}

.finish button{
  border:none;
  background:#2563eb;
  color:white;
  padding:14px 30px;
  border-radius:10px;
  cursor:pointer;
  font-size:18px;
}

.finish button:hover{
  background:#1d4ed8;
}

.home-btn{
  display:block;
  margin-top:15px;
  text-decoration:none;
  background:#6b7280;
  color:white;
  padding:14px;
  border-radius:10px;
}

.home-btn:hover{
  background:#4b5563;
}

.ad-box{
  width:250px;
  min-height:600px;
  background:white;
  border-radius:12px;
  padding:15px;
  text-align:center;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
}

.ad-box p{
  margin-bottom:15px;
  font-weight:bold;
}

@media(max-width:1100px){

  .layout{
    flex-direction:column;
    align-items:center;
  }

  .ad-box{
    width:100%;
    min-height:auto;
  }
}

@media(max-width:768px){

  #pageTitle{
    font-size:24px;
  }

  #question{
    font-size:20px;
  }

  #choices button{
    font-size:16px;
    padding:14px;
  }

  .quiz-box{
    padding:18px;
  }
}
