* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f7fb;
  color: #1f2937;
}

/* =========================
   UPDATED NAVIGATION BAR
========================= */
.navbar {
  min-height: 90px;
  padding: 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;

  background:
    linear-gradient(
      90deg,
      rgba(8, 15, 32, 0.96),
      rgba(8, 24, 55, 0.78),
      rgba(8, 15, 32, 0.95)
    ),
    url("/images/red-seal-nav-bg.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  color: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.navbar .brand {
  font-size: 32px;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.navbar .nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.15);

  transition: all 0.25s ease;
}

.navbar a:hover {
  background: #2563eb;
  color: white;
  transform: translateY(-3px);
  box-shadow:
    0 0 12px rgba(37, 99, 235, 0.8),
    0 8px 20px rgba(0, 0, 0, 0.35);
}

.navbar a:active {
  transform: translateY(0);
}

/* =========================
   PAGE LAYOUT
========================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.hero-card {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: white;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 10px 24px rgba(15,23,42,0.16);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -70px;
  right: -70px;
}

.hero-card h1,
.hero-card p,
.hero-badges {
  position: relative;
  z-index: 1;
}

.hero-card h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.15;
}

.hero-card p {
  margin: 0;
  max-width: 760px;
  line-height: 1.8;
  color: rgba(255,255,255,0.92);
}

.hero-badges {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: bold;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
}

h1,
h2,
h3 {
  margin-top: 0;
}

.muted {
  color: #64748b;
}

.small {
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.menu-grid {
  display: grid;
  gap: 16px;
}

.space-between {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn,
.option-btn,
.nav-btn {
  cursor: pointer;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  transition: 0.2s ease;
  font-size: 15px;
  padding: 12px 16px;
  background: #fff;
  text-decoration: none;
}

.btn:hover,
.option-btn:hover,
.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.btn-primary {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

.btn-danger {
  background: #b91c1c;
  color: white;
  border-color: #b91c1c;
}

.pill {
  display: inline-block;
  padding: 8px 12px;
  background: #e2e8f0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: bold;
  margin-right: 8px;
  margin-bottom: 8px;
}

input,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  margin-top: 6px;
  background: white;
}

.question-list-item {
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fff;
}

.question-list-item strong {
  display: block;
  margin-bottom: 8px;
}

.option-btn {
  width: 100%;
  text-align: left;
  margin-bottom: 10px;
}

.option-btn.selected {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.option-review.correct {
  background: #dcfce7;
  border: 1px solid #22c55e;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.option-review.wrong {
  background: #fee2e2;
  border: 1px solid #ef4444;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.option-review.neutral {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.progress-wrap {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 18px;
}

.progress-bar {
  height: 100%;
  background: #0f172a;
  width: 0;
}

.timer-box {
  font-size: 20px;
  font-weight: bold;
  padding: 10px 14px;
  border-radius: 12px;
  display: inline-block;
  background: #e2e8f0;
}

.timer-warning {
  background: #fef3c7;
  color: #92400e;
}

.timer-danger {
  background: #fee2e2;
  color: #991b1b;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
}

.nav-btn {
  font-weight: bold;
}

.nav-btn.current {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.nav-btn.answered {
  background: #dbeafe;
  border-color: #93c5fd;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.stat-box {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
}

.hint-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.hint-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
  color: #1e3a8a;
}

.hidden {
  display: none !important;
}

.footer {
  background: #0f172a;
  color: white;
  margin-top: 60px;
  padding: 40px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.footer-text {
  font-size: 13px;
  color: #cbd5f5;
  line-height: 1.7;
}

/* =========================
   RESPONSIVE DESIGN
========================= */
@media (max-width: 900px) {
  .quiz-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .navbar {
    min-height: auto;
    padding: 20px;
    flex-direction: column;
    gap: 18px;
  }

  .navbar .brand {
    font-size: 26px;
    text-align: center;
  }

  .navbar .nav-links {
    justify-content: center;
  }

  .navbar a {
    font-size: 15px;
    padding: 10px 18px;
  }
}
/* footer email link fix */
.footer-email-link {
  color: white !important;
  font-weight: 700;
  text-decoration: none;
}

.footer-email-link:visited {
  color: white !important;
}

.footer-email-link:hover {
  color: #9fd3ff !important;
  text-decoration: underline;
}

.footer-links a:hover {
  color: #9fd3ff;
  text-decoration: underline;
}
#page-loader {
  position: fixed;
  inset: 0;
  background: #06111f;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-box {
  text-align: center;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

.loader-tool {
  font-size: 56px;
  animation: spinTool 1s linear infinite;
}

.loader-text {
  margin-top: 14px;
  color: #9fd3ff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.hide-loader {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

@keyframes spinTool {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}
/* =========================
   GLOBAL PAGE LOADER
========================= */
#page-loader {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: #06111f !important;
  z-index: 9999999 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  opacity: 1;
  visibility: visible;
}

#page-loader.hide-loader {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
}

#page-loader .loader-box {
  text-align: center;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

#page-loader .loader-tool {
  font-size: 64px;
  line-height: 1;
  animation: spinTool 1s linear infinite;
}

#page-loader .loader-text {
  margin-top: 16px;
  color: #9fd3ff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
}

@keyframes spinTool {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}