.quiz-container {
  max-width: 600px;
  width: 100%;
}

.mode-selection {
  background: rgba(255, 255, 255, 0.9);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(138, 115, 84, 0.2);
}

.mode-selection h2 {
  color: #2e2a25;
  margin-bottom: 30px;
  font-size: 1.8rem;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.mode-option {
  margin-top: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.95rem;
  color: #2e2a25;
  cursor: pointer;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.mode-btn {
  padding: 30px 20px;
  background: rgba(138, 115, 84, 0.1);
  border: 2px solid rgba(138, 115, 84, 0.3);
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  color: #2e2a25;
  font-weight: 500;
}

.mode-btn:hover {
  background: rgba(138, 115, 84, 0.2);
  border-color: #8a7354;
  transform: translateY(-2px);
}

.mode-label {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.mode-desc {
  display: block;
  font-size: 0.9rem;
  color: #7b6f5e;
  font-weight: 300;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid rgba(138, 115, 84, 0.2);
}

.quiz-header a {
  font-size: 0.95rem;
  color: #8a7354;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.quiz-timer {
  font-size: 0.95rem;
  color: #8a7354;
  font-weight: 600;
}

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

.quiz-header a:hover {
  color: #6f5c44;
}

.quiz-progress {
  font-size: 0.95rem;
  color: #7b6f5e;
}

.question-box {
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid rgba(138, 115, 84, 0.2);
}

.question {
  font-size: 1.5rem;
  font-weight: 500;
  color: #2e2a25;
  margin-bottom: 25px;
  text-align: center;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.answer-btn {
  padding: 15px;
  background: rgba(138, 115, 84, 0.1);
  border: 2px solid rgba(138, 115, 84, 0.3);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  color: #2e2a25;
  font-weight: 500;
}

.answer-btn:hover {
  background: rgba(138, 115, 84, 0.2);
  border-color: #8a7354;
}

.answer-btn.correct {
  background: #4caf50;
  color: white;
  border-color: #45a049;
}

.answer-btn.incorrect {
  background: #f44336;
  color: white;
  border-color: #da190b;
}

.answer-btn:disabled {
  cursor: not-allowed;
}

.input-mode-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.input-display {
  font-size: 2.5rem;
  font-weight: 500;
  color: #8a7354;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(138, 115, 84, 0.1);
  border-radius: 8px;
  padding: 20px;
  border: 2px solid rgba(138, 115, 84, 0.3);
  min-width: 200px;
}

.number-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, auto) 20px auto;
  gap: 8px;
  max-width: 300px;
}

.num-btn {
  padding: 15px;
  background: rgba(138, 115, 84, 0.1);
  border: 2px solid rgba(138, 115, 84, 0.3);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  color: #2e2a25;
  font-weight: 500;
}

.num-btn:hover {
  background: rgba(138, 115, 84, 0.2);
  border-color: #8a7354;
}

.num-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.zero-btn {
  grid-column: 2 / 3;
  grid-row: 4;
  justify-self: center;
  max-width: 60px;
}

.clear-btn {
  grid-column: 1 / 2;
  grid-row: 6;
  background: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.3);
  color: #f44336;
}

.clear-btn:hover {
  background: rgba(244, 67, 54, 0.2);
  border-color: #f44336;
}

.validate-btn {
  grid-column: 2 / 4;
  grid-row: 6;
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
  color: #4caf50;
}

.validate-btn:hover {
  background: rgba(76, 175, 80, 0.2);
  border-color: #4caf50;
}

.feedback {
  text-align: center;
  font-size: 1.1rem;
  margin-top: 20px;
  min-height: 30px;
}

.feedback.correct {
  color: #4caf50;
  font-weight: 500;
}

.feedback.incorrect {
  color: #f44336;
  font-weight: 500;
}

.results {
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(138, 115, 84, 0.2);
}

.results h2 {
  color: #2e2a25;
  margin-bottom: 20px;
}

.score {
  font-size: 3rem;
  font-weight: 500;
  color: #8a7354;
  margin-bottom: 20px;
}

.score-text {
  font-size: 1.2rem;
  color: #7b6f5e;
  margin-bottom: 30px;
}

.total-time {
  font-size: 1rem;
  color: #7b6f5e;
  margin-bottom: 24px;
}

.restart-btn {
  padding: 14px 38px;
  background: #8a7354;
  color: white;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.restart-btn:hover {
  background: #6f5c44;
  transform: translateY(-2px);
}

.hidden {
  display: none !important;
}
