html {
  font-size: 15px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  background: #f5f7fb;
  color: #1f2937;
}

.app-shell {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(10px);
}

.navbar-brand {
  letter-spacing: 0.02em;
}

.nav-link {
  color: #4b5563;
}

.nav-link:hover,
.nav-link:focus {
  color: #111827;
}

.hero-panel {
  padding: 2.5rem;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #eff5ff 100%);
  border: 1px solid #dbe6f5;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.eyebrow {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #e5eefc;
  color: #335c99;
  font-size: 0.85rem;
  font-weight: 600;
}

.info-card,
.feature-card,
.panel-card,
.admin-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.info-card,
.feature-card,
.panel-card,
.admin-card {
  padding: 1.5rem;
}

.feature-card {
  height: 100%;
}

.footer-simple {
  flex-shrink: 0;
  padding: 1.5rem 0 2rem;
  color: #6b7280;
}

.content-shell-front {
  padding-top: 2rem;
}

.content-shell-admin {
  padding-top: 1.5rem;
}

.btn-primary {
  background: #2563eb;
  border-color: #2563eb;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.form-control,
.form-select {
  border-color: #d1d5db;
  padding: 0.7rem 0.85rem;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn:active:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.12);
}

.table-card {
  overflow: hidden;
  border-radius: 20px;
}

.table-card .table {
  margin-bottom: 0;
}

.admin-pagination {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #e5e7eb;
  margin-top: 0.5rem;
  padding-top: 1rem;
}

.admin-pagination .pagination {
  flex-wrap: wrap;
  gap: 0.2rem;
}

.admin-pagination .page-link {
  border-radius: 10px;
  border-color: #dbe2ea;
  color: #334155;
}

.admin-pagination .page-item.active .page-link {
  background: #2563eb;
  border-color: #2563eb;
}

.admin-pagination .page-item.disabled .page-link {
  color: #94a3b8;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.muted-note {
  color: #6b7280;
  font-size: 0.95rem;
}

.text-preline {
  white-space: pre-line;
}

.option-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
  background: #f9fafb;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.option-card:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  transform: translateY(-1px);
}

.quiz-option:has(.quiz-option-input:checked) {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10);
}

.quiz-progress-meta {
  min-width: min(100%, 320px);
}

.quiz-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
  color: #475569;
  font-size: 0.95rem;
}

.quiz-progress-track {
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.quiz-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
  transition: width 0.3s ease;
}

.quiz-stage {
  position: relative;
  min-height: 24rem;
}

.quiz-question {
  display: none;
  opacity: 0;
  transform: translateX(24px) scale(0.985);
  transform-origin: center center;
}

.quiz-question.is-active {
  display: block;
  opacity: 1;
  animation: question-enter 0.56s ease forwards;
}

.quiz-question.is-active.slide-backward {
  animation-name: question-enter-backward;
}

.quiz-question-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 5.2rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #e0ecff;
  color: #1d4ed8;
  font-weight: 600;
}

.score-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  padding: 0.2rem 0.6rem;
  font-size: 0.85rem;
}

@keyframes question-enter {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes question-enter-backward {
  from {
    opacity: 0;
    transform: translateX(-24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 767.98px) {
  .hero-panel {
    padding: 1.5rem;
  }

  .content-shell-front {
    padding-top: 1.25rem;
  }

  .content-shell-admin {
    padding-top: 1rem;
  }

  .quiz-progress-label {
    flex-direction: column;
    gap: 0.35rem;
  }

  .quiz-stage {
    min-height: 28rem;
  }

  .admin-pagination {
    justify-content: center;
  }
}
