* { box-sizing: border-box; }
body {
  font-family: system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  background: #f0f4f8;
  margin: 0; padding: 0;
  display: flex; justify-content: center; align-items: center;
  min-height: 100vh;
}
.container {
  width: 100%;
  max-width: 600px;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px -5px rgba(0,0,0,0.1);
}

h1 { text-align: center; margin-bottom: 1rem; }
#quiz-box { margin-top: 0; }
#question { font-size: 1.2rem; margin: 1rem 0; }

.option {
  transition: all 0.3s ease;
  background: #f7f9fc;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 8px 0;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
}
.option.correct { border-color: #2ecc71; background: #e8f9ef; }
.option.wrong { border-color: #e74c3c; background: #fdecec; }
.option.disabled { pointer-events: none; opacity: 0.7; }
.controls { margin-top: 16px; text-align: right; }
button {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
#next-btn { background: #007bff; color: white; }
#retry-btn { background: #28a745; color: white; }
#feedback {
  margin-top: 10px;
  font-weight: bold;
}
.hidden { display: none; }
#progress { font-size: 0.9rem; color: #555; }
@media (max-width: 600px) {
  .container { padding: 1rem; }
  #question { font-size: 1rem; }
}

:root {
  --bg: #f0f4f8;
  --text: #000;
  --card-bg: white;
  --option-bg: #f7f9fc;
  --option-correct-bg: #e8f9ef;
  --option-wrong-bg: #fdecec;
}

body {
  background: var(--bg);
  color: var(--text);
}

.container {
  background: var(--card-bg);
}

.option {
  background: var(--option-bg);
}

.option.correct {
  background: var(--option-correct-bg);
}

.option.wrong {
  background: var(--option-wrong-bg);
}

body.dark {
  --bg: #121212;
  --text: #f0f0f0;
  --card-bg: #1e1e1e;
  --option-bg: #2a2a2a;
  --option-correct-bg: #1e3d32;
  --option-wrong-bg: #4b1f1f;
}

.theme-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: 2px solid var(--text);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s ease;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background-color: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: #007bff;
  transition: width 0.4s ease;
}

#timer {
  font-size: 0.95rem;
  font-weight: bold;
  color: #d6336c;
  margin-top: 8px;
}

.option:hover {
  transform: scale(1.02);
  background-color: #e6f0fa;
}

.option.correct {
  border-color: #2ecc71;
  background: #e8f9ef;
  transform: scale(1.03);
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
}

.option.wrong {
  border-color: #e74c3c;
  background: #fdecec;
  transform: scale(1.03);
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.4);
}

#feedback {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#feedback:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}
