:root{
  --tm-primary:#3b82f6;
  --tm-secondary:#8b5cf6;
  --tm-gray-50:#f9fafb;
  --tm-gray-100:#f3f4f6;
  --tm-gray-200:#e5e7eb;
  --tm-gray-300:#d1d5db;
  --tm-gray-600:#4b5563;
  --tm-gray-700:#374151;
  --tm-gray-900:#111827;
  --tm-green-500:#22c55e;
  --tm-yellow-500:#eab308;
  --tm-red-500:#ef4444;
  --tm-indigo-600:#4f46e5;
  --tm-orange-600:#ea580c;
  --tm-teal-600:#0d9488;
  --tm-purple-600:#9333ea;
  --tm-border-radius:8px;
  --tm-card-radius:16px;
  --tm-shadow:0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}

/* Navbar */
.app-bottom-nav {
  padding-bottom: max(env(safe-area-inset-bottom), 0.25rem);
}

.app-bottom-nav-spacer {
  height: calc(56px + max(env(safe-area-inset-bottom), 0px));
}

@media (min-width: 768px) {
  .app-bottom-nav-spacer {
    height: calc(64px + max(env(safe-area-inset-bottom), 0px));
  }
}

.text-active, .text-active:hover {
  color: #49b5e7!important;
}

@media (min-width: 576px) {
  .app-bottom-nav {
    max-width: 500px;
    margin: auto;
    bottom: 20px!important;
    border-radius: 10px;
    padding: 0;
  }
}

@media (max-width: 500px) {
  .app-bottom-nav ul li button span {
    display: none;
  }
}

@media (min-width: 500px) {
  .app-bottom-nav ul li button {
    min-width: 110px;
  }
}

/* Hero */

.hero-bg {
  position: relative;
  padding-bottom: 40px;
}

.hero-bg p {
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  margin: 5px 0 10px 0;
  font-size: 20px;
  font-weight: 400;
}

.hero-bg .cta-buttons .btn, #generate-quiz-btn {
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
}

.hero-bg .cta-buttons .btn-primary, #generate-quiz-btn {
  background-color: #49b5e7;
  color: #fff;
  box-shadow: 0 4px 15px rgba(73, 181, 231, 0.3);
}

.hero-bg .cta-buttons .btn-primary:hover, #generate-quiz-btn:hover {
    background-color: #0f394c;
    transform: translateY(-2px);
}

.hero-bg .cta-buttons .btn-secondary:hover {
    background-color: #49b5e7;
    color: #fff;
    transform: translateY(-2px);
}

@media (min-width: 768px) {
  .hero-bg .cta-buttons button {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .hero-bg .cta-buttons .btn {
      width: 100%;
      max-width: 300px;
      justify-content: center;
      align-self: center !important;
  }
}

@media (max-width: 992px) {
  .hero-bg .col-lg-6 {
    text-align: center;
  }

  .hero-bg h1 {
    margin-top: 20px;
  }
}


/* Quiz Builder */

.color-dark {
  color: #0f394c;
}

.btn-hover:hover, .btn-hover:active {
  color: #0f394c!important;
  background-color: #f5fbff!important;
  cursor: pointer;
}

.border-color {
  border: 1px dashed rgba(73, 181, 231, 0.4)!important;
  background: #f5fbff;
}

#question-amount::-webkit-slider-thumb {
  appearance: none;
  height: 20px;
  width: 20px;
  background: #49b5e7;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  margin-top: -7px;
}

#question-amount::-moz-range-thumb {
  height: 20px;
  width: 20px;
  background: #49b5e7;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

#question-amount::-webkit-slider-runnable-track {
  height: 6px;
  background: #ddd;
  border-radius: 3px;
}

#question-amount::-moz-range-track {
  height: 6px;
  background: #ddd;
  border-radius: 3px;
}

.progress-bar{ background: #49b5e7; }

.answer-option { 
  transition:.2s;
  padding: 8px 15px;
}

.answer-option.selected { 
  background: #f5fbff;
  border: 1px dashed rgba(73, 181, 231, 0.4)!important; 
}

.btn.border-0:hover {
  background: #49b5e7;
  color: white;
}

.dark-bg {
  background: var(--heading-color);
  color: white;
}

@media (max-width: 768px) {
  #quiz-builder-page, #high-scores-page {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}


/* Results */

.result-btn-container {
  flex-wrap: wrap;
}

.result-btn-container button {
  transition: all 0.3s ease;
}

.result-btn-container button#retry-quiz-btn {
  background-color: #49b5e7;
  color: #fff;
  box-shadow: 0 4px 15px rgba(73, 181, 231, 0.3);
  border: none;
}

.result-btn-container button#retry-quiz-btn:hover {
  background-color: #0f394c;
  transform: translateY(-2px);
}

.result-btn-container button#share-results-btn {
  background-color: #fff;
  color: #49b5e7;
  border: 1px solid #49b5e7 !important;
}

.result-btn-container button#share-results-btn:hover {
  background-color: #49b5e7;
  color: #fff;
  transform: translateY(-2px);
}

@media(max-width: 310px) {
  .result-btn-container button {
    width: 100%;
  }
}


/* High Score */

.high-sco-container button {
  border-color: rgb(209 213 219 / 1);
  padding: 8px 10px;
}

.high-sco-container button.active, .high-sco-container button:hover, .high-sco-container button:active {
  background-color: #49b5e7!important;
  color: white!important;
  border-color: #49b5e7!important;
}

#high-scores-container .border-soft i {
  font-size: 40px;
}


/* Error */

#error-modal .d-flex.btns button {
  flex: 1;
  padding: 8px 10px;
  border-color: rgb(209 213 219 / 1);
}

#error-modal .d-flex.btns button.btn-primary {
  background-color: #49b5e7;
  color: #fff;
  border: none;
}

#error-modal .d-flex.btns button.btn-primary:hover {
  background-color: #0f394c;
}

#error-modal .d-flex.btns button.btn-outline-secondary:hover {
  background-color: #49b5e7;
  color: #fff;
  border: none;
}






.font-pacifico{ font-family:'Pacifico', cursive; }
.btn-rounded{ border-radius: var(--tm-border-radius); }
.card-soft{
  border:1px solid var(--tm-gray-200);
  border-radius: var(--tm-card-radius);
  box-shadow: var(--tm-shadow);
}
.border-soft{ border:1px solid var(--tm-gray-200)!important; border-radius: var(--tm-card-radius); }
.text-muted-600{ color: var(--tm-gray-600)!important; }
.text-muted-700{ color: var(--tm-gray-700)!important; }
.hero-bg{
  position: relative;
}
.focus-ring:focus{ outline:2px solid var(--tm-primary); outline-offset:2px; }

.answer-option.correct{ background:#dcfce7; border-color:#16a34a!important; }
.answer-option.incorrect{ background:#fef2f2; border-color:#dc2626!important; }
.progress { height: .5rem; background: var(--tm-gray-200); }

.theme-dark{ background-color:#0f172a; color:#f1f5f9; }
.theme-dark .bg-white, .theme-dark .card { background-color:#1e293b!important; }
.theme-dark .text-dark, .theme-dark .text-body { color:#f1f5f9!important; }
.theme-dark .text-muted, .theme-dark .text-muted-600 { color:#94a3b8!important; }
.theme-dark .border-soft{ border-color:#334155!important; }
.badge-soft{ background: rgba(59,130,246,.1); color: var(--tm-primary); border-radius: 9999px; }
.timer.warning{ color:#dc2626; animation: pulse .5s infinite; }
.timer{ animation:pulse 1s infinite; }
@keyframes pulse{ 50%{ opacity:.6 } }

/* Utility that mirrors Tailwind’s m- / p- scale used in the design */
.py-12x{ padding-top:3rem!important; padding-bottom:3rem!important; }
.py-16x{ padding-top:4rem!important; padding-bottom:4rem!important; }
.mb-12x{ margin-bottom:3rem!important; }

/* Off-canvas mobile menu mimic */
@media (max-width: 767.98px){
  #mobile-menu .nav-link{ padding:.5rem 1rem; }
}

/* FAQ */
.faq-content{ max-height:0; overflow:hidden; transition:max-height .3s ease; }
.faq-content.active{ max-height: 200px; }