/* Quiz page layout */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: var(--container-bg);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
}

h1 { text-align: center; margin-bottom: 30px; font-size: 2em; }
.quiz-home-btn { border: none; background: var(--surface); color: var(--text); border-radius: 8px; padding: 10px 12px; cursor: pointer; font-size: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.12); transition: transform 0.2s ease, box-shadow 0.2s ease; position: absolute; top: 16px; left: 16px; }
.quiz-home-btn:hover, .quiz-home-btn:focus-visible { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.18); outline: none; }
.quiz-home-btn[hidden] { display: none; }

.quiz-content { display: none; }
.quiz-content.active { display: block; }

.question { font-size: 1.3em; margin-bottom: 25px; font-weight: bold; }
.answers { display: flex; flex-direction: column; gap: 15px; }
.answer-btn { background: var(--answer-bg); border: 3px solid transparent; padding: 15px 20px; border-radius: 10px; cursor: pointer; font-size: 1.1em; transition: all 0.3s; text-align: left; color: var(--text); }
.answer-btn:hover { background: var(--answer-hover); transform: translateX(10px); }
.answer-btn.selected { background: var(--answer-selected); color: #fff; border-color: var(--answer-selected); }

.navigation { display: flex; justify-content: space-between; margin-top: 30px; }
.score-display { text-align: center; margin-bottom: 20px; font-size: 1.1em; color: var(--muted); }

.result { text-align: center; }
.result h2 { margin-bottom: 20px; font-size: 2em; }
.result p { font-size: 1.3em; margin-bottom: 30px; }

#start-screen { text-align: center; }
#start-screen p { font-size: 1.2em; color: var(--muted); margin-bottom: 30px; }

#review-screen h2 { text-align: center; margin-bottom: 30px; }
.review-item { background: var(--review-bg); padding: 20px; border-radius: 10px; margin-bottom: 20px; border: 1px solid var(--review-border); }
.review-question { font-weight: bold; font-size: 1.2em; margin-bottom: 15px; }
.review-answer { padding: 10px; margin: 5px 0; border-radius: 5px; }
.review-answer.correct { background: #d4edda; color: #155724; border: 2px solid #28a745; }
.review-answer.wrong { background: #f8d7da; color: #721c24; border: 2px solid #dc3545; }
.review-answer.neutral { background: #e9ecef; color: #495057; }

.progress-bar { width: 100%; height: 10px; background: var(--progress-bg); border-radius: 10px; overflow: hidden; margin-bottom: 25px; }
.progress-fill { height: 100%; background: var(--progress-fill); width: 0%; transition: width 0.4s ease; border-radius: 10px; }

#result-image { max-width: 300px; width: 100%; height: auto; border-radius: 15px; margin-bottom: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

.categories { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.category-btn { background: var(--category-gradient); color: #fff; border: none; padding: 20px; border-radius: 15px; font-size: 1.2em; cursor: pointer; transition: all 0.3s; box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3); }
.category-btn:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(102,126,234,0.5); }

/* Timer */
.timer-container { display: flex; justify-content: center; margin-bottom: 20px; }
.timer { background: var(--timer-gradient); color: #fff; padding: 10px 25px; border-radius: 25px; font-size: 1.3em; font-weight: bold; box-shadow: 0 5px 15px rgba(102,126,234,0.3); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1);} 50% { transform: scale(1.03);} }

/* Difficulty toggle */
.difficulty-toggle { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 20px 0; padding: 15px; background: var(--surface); border-radius: 10px; }
.difficulty-label { font-size: 1.1em; font-weight: bold; }
.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: 0.4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: 0.4s; border-radius: 50%; }
input:checked + .slider { background: var(--toggle-on-gradient); }
input:checked + .slider:before { transform: translateX(26px); }

.hard-badge { background: var(--hard-badge-gradient); color: #fff; padding: 10px 20px; border-radius: 25px; font-weight: bold; font-size: 1em; margin-left: 15px; box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3); }

.reset-score-btn { background: var(--danger); color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 0.9em; margin-top: 10px; transition: all 0.3s; }
.reset-score-btn:hover { background: var(--danger-hover); transform: scale(1.05); }

/* Back button top-left (same look as theme-btn but on left) */
.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  right: auto;
  z-index: 1001;
}
