body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 4.5rem 1.5rem 1.5rem;
  background: #f5f5fa;
  color: #222;
  line-height: 1.6;
}

.navbar-brand {
  color: #8f3a12 !important;
}

.bg-geografia {
  background-color: #8f3a12 !important;
  color: #ffffff !important;
}

h1, h2, h3 {
  color: #1f2933;
}

.section {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #e5f0ff;
  color: #1d4ed8;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.resumo-list {
  padding-left: 1.2rem;
}

.resumo-list li {
  margin-bottom: 0.3rem;
}

.flashcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 0.75rem;
}

.card {
  position: relative;
  background: #e49e25;
  color: #f9fafb;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  min-height: 90px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 2px 5px rgba(59, 39, 0, 0.25);
  overflow: hidden;
}

.card a {
  color: black;
  text-decoration: none;
  cursor: pointer;
}
.card a:hover {
  text-decoration: underline;
}

.border-primary {
    --bs-border-opacity: 1;
    border-color: rgb(84 36 6) !important;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.card .back {
  display: none;
}

.card.flipped {
  background: #facc15;
  color: #111827;
}

.card.flipped .front {
  display: none;
}

.card.flipped .back {
  display: block;
}

.card-index {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-bottom: 0.25rem;
}

.card-tip {
  font-size: 0.7rem;
  opacity: 0.75;
  margin-top: 0.4rem;
  font-style: italic;
}

.question {
  margin-bottom: 1.1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.question-header {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.options {
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0 0.35rem 0;
}

.options li {
  margin: 0.1rem 0;
}

.options button {
  width: 100%;
  text-align: left;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  padding: 0.3rem 0.5rem;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.options button:hover:not(.answered) {
  background: #eff6ff;
  border-color: #93c5fd;
}

.options button.correct {
  background: #dcfce7;
  border-color: #16a34a;
  color: #14532d;
}

.options button.incorrect {
  background: #fee2e2;
  border-color: #dc2626;
  color: #7f1d1d;
}

.options button.answered {
  cursor: default;
}

.explanation {
  display: none;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.explanation.visible {
  display: block;
}

.explanation.correct {
  color: #166534;
}

.explanation.incorrect {
  color: #b91c1c;
}

.quiz-footer {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  color: #4b5563;
}

@media (max-width: 640px) {
  body {
    padding: 0.75rem;
  }
}
