:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --border: #e5e7eb;
  --success: #10b981;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.hidden {
  display: none;
}

.paper-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.paper-item:last-child {
  margin-bottom: 0;
}

.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  background: #e5e7eb;
  color: var(--text);
}

.btn.secondary:hover {
  background: #d1d5db;
}

.question {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.question.completed {
  background: rgba(16, 185, 129, 0.05);
  border-left: 4px solid var(--success);
}

.question.completed::before {
  content: "✓";
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--success);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.question h3 {
  margin-top: 0;
  padding-right: 35px;
}

.options {
  display: grid;
  gap: 0.5rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
}

.option.correct {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.option.incorrect {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.explanation {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  white-space: pre-line;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.quiz-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

#score {
  font-weight: 700;
}
