/* Global */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #ffddee, #ffe6f0);
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  padding: 16px; /* tạo khoảng cách ngang */
  box-sizing: border-box;
}

/* Màn hình bắt đầu */
.start-screen {
  width: 100%;
  max-width: 600px;
  background: linear-gradient(to right, #ffccd5, #ffe6f0);
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.start-screen button {
  padding: 16px 32px;
  font-size: 20px;
  background-color: #ff77aa;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: 0.3s;
}
.start-screen button:hover {
  background-color: #ff5e9c;
}

/* Câu hỏi và đáp án */
.quiz-container {
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  display: none;
}

/* Đáp án */
.options button {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 18px;
  border: none;
  border-radius: 10px;
  background-color: #ff99bb;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: 0.3s;
}
.options button:hover {
  background-color: #ff77aa;
}

/* Kết quả */
#result {
  font-size: 20px;
  color: #cc3366;
  margin-top: 32px;
}

/* Popup */
#popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 16px;
  box-sizing: border-box;
}
#popup > div {
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 90%;
  text-align: center;
}
#popup-img {
  width: 200px;
  max-width: 100%;
}
#popup-msg {
  margin-top: 16px;
  font-size: 20px;
  color: #cc3366;
}
#popup button {
  margin-top: 16px;
  padding: 10px 20px;
  background-color: #ff77aa;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
}

/* Popup animation */
@keyframes bounceIn {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  80% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
#popup.show {
  display: flex;
}
#popup.show > div {
  animation: bounceIn 0.6s ease;
}

/* Music button */
.music-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  background-color: #ff77aa;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 600px) {
  .quiz-container,
  .start-screen {
    padding: 20px;
  }

  .quiz-container h2,
  .start-screen h2,
  .start-screen h3 {
    font-size: 22px;
  }

  .options button {
    font-size: 18px;
    padding: 16px;
  }

  .start-screen button {
    font-size: 18px;
    padding: 14px 28px;
  }

  #result {
    font-size: 18px;
  }

  .music-btn {
    font-size: 12px;
    padding: 8px 12px;
  }
}
