* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.quiz-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  max-width: 640px;
  width: 100%;
  padding: 36px 40px;
}

.quiz-header {
  margin-bottom: 28px;
}

.quiz-header h1 {
  font-size: 1.2rem;
  color: #555;
  font-weight: 500;
  margin-bottom: 6px;
}

.quiz-header h2 {
  font-size: 1rem;
  color: #888;
  font-weight: 400;
}

.progress-bar-track {
  background: #e9ecef;
  border-radius: 999px;
  height: 6px;
  margin-bottom: 8px;
}

.progress-bar-fill {
  background: #4f6ef7;
  height: 6px;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 0.8rem;
  color: #999;
  text-align: right;
  margin-bottom: 28px;
}

.question-block {
  margin-bottom: 28px;
}

.question-type-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #eef0ff;
  color: #4f6ef7;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.question-text {
  font-size: 1.05rem;
  color: #222;
  line-height: 1.6;
  margin-bottom: 20px;
}

.options-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.options-list li label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #333;
  transition: border-color 0.2s, background 0.2s;
}

.options-list li label:hover {
  border-color: #4f6ef7;
  background: #f5f7ff;
}

.options-list li input[type="radio"],
.options-list li input[type="checkbox"] {
  accent-color: #4f6ef7;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.fill-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
}

.fill-input:focus {
  border-color: #4f6ef7;
}

/* Feedback states */
.option-correct label {
  border-color: #22c55e !important;
  background: #f0fdf4 !important;
  color: #166534;
}

.option-wrong label {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  color: #991b1b;
}

.feedback-box {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.feedback-box.correct {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.feedback-box.wrong {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  padding: 11px 28px;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-primary {
  background: #4f6ef7;
  color: #fff;
}

.btn-primary:hover {
  background: #3b58e0;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-secondary {
  background: #f0f2f5;
  color: #555;
}

.btn-secondary:hover {
  background: #e2e5ec;
}

/* Score screen */
.score-screen {
  text-align: center;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #eef0ff;
  border: 4px solid #4f6ef7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.score-circle .score-num {
  font-size: 2rem;
  font-weight: 700;
  color: #4f6ef7;
  line-height: 1;
}

.score-circle .score-denom {
  font-size: 0.85rem;
  color: #888;
}

.score-screen h2 {
  font-size: 1.4rem;
  color: #222;
  margin-bottom: 8px;
}

.score-screen p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 28px;
}
