body {
  font-family: Arial, sans-serif;
  background: #f0f8ff;
  text-align: center;
  padding: 20px;
  margin: 0;
}
#quiz-box, #mode-selection {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: inline-block;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  box-sizing: border-box;
}
#question {
  font-size: 1.8em;
  margin-bottom: 20px;
  word-wrap: break-word;
}
#answer {
  font-size: 1.2em;
  padding: 10px;
  width: 80px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 5px;
}
#submit {
  font-size: 1.2em;
  padding: 10px 16px;
  margin: 10px 0 10px 10px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
#feedback {
  margin-top: 20px;
  font-size: 1.5em;
  height: 2em;
  transition: color 0.3s;
}
.correct {
  color: #fff;
  background: #4caf50;
  border-radius: 8px;
  padding: 10px;
  display: inline-block;
  animation: splash 0.5s;
}
.incorrect {
  color: #fff;
  background: #e53935;
  border-radius: 8px;
  padding: 10px;
  display: inline-block;
  animation: splash 0.5s;
}
@keyframes splash {
  0% { transform: scale(1.2);}
  100% { transform: scale(1);}
}
#score {
  margin-top: 20px;
  font-size: 1.3em;
  line-height: 1.6;
}
#smiley {
  font-size: 3em;
  margin-top: 15px;
  height: 1.2em;
}
.mode-btn {
  font-size: 1.3em;
  padding: 15px;
  margin: 10px;
  width: 80%;
  max-width: 300px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.mode-btn:hover {
  transform: scale(1.05);
  background: #3a80d2;
}
.mode-description {
  margin: 15px 0;
  font-size: 1.1em;
  color: #555;
}
#choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  margin-right: 10px;
  width: 100%;
}
.choice-btn {
  font-size: 2em;
  padding: 10px;
  margin: 10px;
  width: 100px;
  background: #f5f5f5;
  border: 2px solid #ff9800;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
/*.choice-btn:hover {*/
/*  background: darkseagreen;*/
/*}*/
.choice-correct {
  background: #4caf50 !important;
  color: #fff !important;
  border-color: #388e3c !important;
}
.choice-wrong {
  background: #e53935 !important;
  color: #fff !important;
  border-color: #b71c1c !important;
}
.config-section {
  margin: 15px 0;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  text-align: left;
}
.config-title {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 1.1em;
}
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 10px;
  background: #eee;
  border-radius: 5px;
  flex: 1 0 45%;
  min-width: 120px;
}
.checkbox-label:hover {
  background: #e0e0e0;
}
.range-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.range-inputs label {
  min-width: 100px;
  display: inline-block;
}
.range-inputs input {
  width: 60px;
  padding: 8px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.continue-btn {
  font-size: 1.3em;
  padding: 12px 20px;
  margin-top: 20px;
  width: 80%;
  max-width: 300px;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.continue-btn:hover {
  background: #43a047;
}
#question-count {
  padding: 8px;
  font-size: 1em;
  border-radius: 4px;
  border: 1px solid #ddd;
}

#timer-container {
  margin: 15px 0;
  width: 100%;
  height: 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

#timer-bar {
  height: 100%;
  width: 100%;
  background-color: #4caf50;
  transition: width 1s linear;
}

.timer-warning {
  background-color: #ff9800 !important;
}

.timer-danger {
  background-color: #f44336 !important;
}

#timer-text {
  font-size: 1em;
  margin-top: 5px;
  color: #555;
}

.score-display {
  font-size: 1.2em;
  margin: 10px 0;
  font-weight: bold;
}

.highlight-score {
  color: #4a90e2;
  font-size: 1.2em;
  animation: pulse 1.5s infinite;
}

.new-high-score {
  color: #f44336;
  font-weight: bold;
  position: relative;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  #quiz-box, #mode-selection {
    padding: 15px;
    width: 95%;
  }
  #question {
    font-size: 1.5em;
  }
  .mode-btn, .continue-btn {
    width: 90%;
    font-size: 1.2em;
    padding: 12px;
  }
  .choice-btn {
    padding: 15px 10px;
    font-size: 1.1em;
  }
  .checkbox-label {
    flex: 1 0 100%;
  }
  .range-inputs {
    flex-direction: column;
    align-items: flex-start;
  }
  .range-inputs input {
    width: 80px;
  }
}

@media (max-width: 480px) {
  #question {
    font-size: 1.3em;
  }
  .config-section {
    padding: 10px;
  }
  #answer {
    width: 70px;
  }
  .mode-btn, .continue-btn {
    padding: 10px;
  }
  #feedback {
    font-size: 1.3em;
  }
}
