
* {
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background-image: url(../images/Gemini_Generated_Image_ddenxbddenxbdden.png);
  background-size: cover;
  background-position: center;

  display: flex;
  flex-direction: column;
  align-items: center;

  color: #111;
}

#testArea, #resultArea {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 16px;
  width: 90%;
  max-width: 700px;
  min-height: 400px;
  margin-bottom: 20px;
}

  .navbar {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  
  width: 700px;
  height: 60px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;

  padding: 0 40px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 14px;

  z-index: 9999;
}

.drop-btn {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #222;
  transition: 0.2s;
}

.drop-btn:hover {
  background: #f0f0f0;
}

.menu-item {
  position: relative;
  font-size: 30px;
  cursor: pointer;
}

.menu-item span {
  padding: 6px 10px;
}

.dropdown-box {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  min-width: 160px;
  flex-direction: column;
  gap: 8px;
}

.menu-item:hover .dropdown-box {
  display: flex;
}

.logo {
  position: absolute;
  left: 20px;         
  top: 50%;
  transform: translateY(-50%);
}

.logo img {
  height: 45px;      
  width: auto;        
  display: block;
}


#startBtn {
  background: #222;
  color: #fff;
  margin-top: 500px;
  border: none;
  padding: 14px 32px;
  font-size: 22px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 20px;
}
#nextBtn {
  display: block;
  background: #222;
  margin: 20px auto 0 auto;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
    color: #fff;

}
#restartBtn{
  display: block;
  background: #222;
  margin: 20px auto 0 auto;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
    color: #fff;

}

#h1Main{
  font-size: 25px;
}

/* Планшети */
@media (max-width: 1024px) {

  .navbar {
    width: 90%;
    gap: 20px;
    padding: 0 20px;
  }

  #testArea, #resultArea {
    max-width: 96%;
    height: auto;
    padding: 32px;
    font-size: 18px;
  }

  #question {
    font-size: 20px;
  }

  #answers {
    width: 85%;
    margin: 0 auto;
  }

  .answer-btn {
    width: 85%;
    font-size: 14px;
    padding: 10px;
  }
}

/* Телефони */
@media (max-width: 768px) {

  .navbar {
    width: 95%;
    height: 50px;
    gap: 10px;
  }

  .menu-item {
    font-size: 18px;
  }

  .logo img {
    height: 32px;
  }

  .wrapper {
    padding-top: 90px;
  }

  #testArea, #resultArea {
    width: 100%;
    padding: 24px;
    font-size: 17px;
    height: auto;
  }

  #question {
    font-size: 18px;
  }

  #answers {
    width: 85%;
    margin: 0 auto;
  }

  .answer-btn {
    width: 90%;
    font-size: 14px;
    padding: 9px;
  }

  #startBtn,
  #nextBtn,
  #restartBtn {
    font-size: 16px;
    padding: 10px 18px;
  }
}

/* дуже вузькі телефони */
@media (max-width: 480px) {

  .navbar {
    top: 15px;
    width: 95%;
    height: 45px;
    gap: 8px;
    padding: 0 8px;
  }

  .menu-item {
    font-size: 14px;
  }

  .logo img {
    height: 24px;
  }

  .wrapper {
    padding-top: 80px;
  }

  .test-box {
    width: 95%;
    padding: 16px;
  }

  #testArea, 
  #resultArea {
    width: 100%;
    padding: 18px;
    font-size: 15px;
  }

  #question {
    font-size: 15px;
  }

  /* контейнер відповідей */
  #answers {
    width: 100%;
    margin: 0 auto;
  }

  /* кнопки */
  .answer-btn {
    width: 100%;
    font-size: 13px;
    padding: 10px;
    box-sizing: border-box;
  }

  #startBtn,
  #nextBtn,
  #restartBtn {
    font-size: 13px;
    padding: 8px 10px;
    width: 100%;
  }

}

@media (max-width: 400px) {

  #answers {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #answers .answer-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 13px;
    padding: 9px;
    box-sizing: border-box;
  }

  #testArea,
  #resultArea {
    width: 100%;
    padding: 16px;
    font-size: 15px;
  }

  .test-box {
    width: 96%;
    padding: 14px;
  }

}


@media (max-width: 360px) {

  #answers {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #answers .answer-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 12px;
    padding: 8px;
    margin-bottom: 8px;
    box-sizing: border-box;
  }

  #testArea,
  #resultArea {
    width: 100%;
    padding: 14px;
    font-size: 14px;
  }

  .test-box {
    width: 96%;
    padding: 12px;
  }

}




#answers {
  display: flex;
  flex-direction: column; 
  align-items: center;    
  gap: 10px;              
  margin-top: 20px;
}

.answer-btn {
  width: 250px;          
  padding: 8px 10px;
  font-size: 16px;
  border: 2px solid #333;
  border-radius: 8px;
  background-color: white;
  cursor: pointer;
  text-align: center;     
  transition: all 0.3s ease;
}

.answer-btn.correct { 
  border-color: #1b5e20; 
  color: #1b5e20; 
  font-weight: 600; 
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(27, 94, 32, 0.5); 
}

.answer-btn.wrong { 
  border-color: #7f1d1d;
  color: #7f1d1d; 
  transform: scale(1.05); 
  box-shadow: 0 0 12px rgba(127, 29, 29, 0.5);
}

.answer-btn.disabled {
  pointer-events: none; 
  opacity: 0.85; 
}




.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
  min-height: 100vh;
  padding-top: 120px; 
  padding-bottom: 20px;
}

.test-box {
  border-radius: 16px;
  padding: 40px;
  width: 90%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  margin-top: 20px;
}

.my-footer {
  width: 100%;
  height: 100px;
  background: #393636;
  color: white;
  text-align: center;
  border-top: 3px solid #555;
  margin-top: auto; 
}

