
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

.app {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

.app-header {
  text-align: center;
  margin-bottom: 16px;
}

.app-header h1 {
  margin: 0 0 4px;
  font-size: 1.8rem;
}

.subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

.subject-selector {
  background: #111827;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.subject-selector label {
  font-weight: 500;
}

.subject-selector select {
  flex: 1;
  min-width: 200px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #020617;
  color: #e5e7eb;
}

.subject-info {
  font-size: 0.8rem;
  color: #9ca3af;
  width: 100%;
}

.quiz.hidden {
  display: none;
}

.quiz {
  background: #020617;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.question-counter {
  font-weight: 600;
  color: #93c5fd;
}

.subject-name {
  font-size: 0.85rem;
  color: #9ca3af;
}

.question-text {
  font-size: 1rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #020617;
  border: 1px solid #1f2937;
  cursor: pointer;
}

.answer-option input {
  margin-top: 2px;
}

.answer-option.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

.answer-option.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.feedback {
  min-height: 22px;
  font-size: 0.9rem;
}

.feedback.ok {
  color: #22c55e;
}

.feedback.err {
  color: #f97316;
}

.controls {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.controls button {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: none;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  background: #1d4ed8;
  color: white;
}

.controls button:hover {
  background: #2563eb;
}

.controls button:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 600px) {
  .app {
    padding: 12px;
  }

  .controls {
    flex-direction: column;
  }
}
