/* === Layout === */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #f7f8fc;
  color: #333;
  padding-bottom: 100px; /* for sticky footer */
}

header {
  background: #c62828;
  text-align: center;
  padding: 0.8rem 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Logo image link */
.logo-link {
  display: inline-block;
  text-decoration: none;
}

.site-logo {
  height: 60px;           /* Adjust size for perfect fit */
  width: auto;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.site-logo:hover {
  transform: scale(1.05); /* subtle hover effect */
}
/* === Ads === */
.top-ad, .footer-ad {
  text-align: center;
  background: #fff;
  padding: 0.5rem;
  margin: 0.5rem auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border-radius: 8px;
  max-width: 1000px;
}

/* === Main Quiz === */
main.quiz-single {
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.quiz-content {
  max-width: 700px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* === Titles === */
.quiz-title {
  color: #c62828;
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.quiz-subtitle {
  text-align: center;
  color: #555;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* === Progress === */
.progress-info {
  text-align: center;
  margin-bottom: 1rem;
}

#questionCounter {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.progress-container {
  width: 100%;
  height: 10px;
  background: #eee;
  border-radius: 6px;
  overflow: hidden;
}

#progressBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c62828, #ff6f61);
  transition: width 0.4s ease;
  border-radius: 6px;
}

/* === Questions === */
#quiz button {
  display: block;
  width: 100%;
  font-size: 1.2rem;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 1rem;
  margin: 0.75rem 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

#quiz button:hover {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
  transform: scale(1.02);
}

/* === Related Quizzes === */
.related-quizzes {
  margin-top: 2rem;
}

.related-quizzes h3 {
  color: #c62828;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.related-grid {
  display: grid;
  gap: 0.8rem;
}

.related-card {
  background: #fff8f8;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  border: 1px solid #eee;
  transition: all 0.2s ease;
}

.related-card:hover {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
}

/* === Footer === */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #c62828;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  z-index: 10;
  border-top: 1px solid rgba(255,255,255,0.2);
}

/* === Spinner === */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #d8143c;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.9s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === Responsive === */
@media (max-width: 768px) {
  .quiz-content {
    padding: 1.2rem;
  }
  .quiz-title {
    font-size: 1.5rem;
  }
  footer {
    font-size: 0.8rem;
  }
}
