/* -----------------------------------
   0. Algemeen (reset/typografie)
   ----------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif; /* Let op: Poppins moet in index.html geladen zijn */
  background-color: #f5f5f5; /* fallback kleur */
  background-size: cover;
  background-position: center;
  transition: background 0.3s ease-in-out;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none !important;
}

/* Container: wit met enige transparantie, afgeronde hoeken en lichte schaduw */
#container {
  width: 100%;
  max-width: 600px;
  margin: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-top: 6px solid #2196F3; /* standaard accent: blauw */
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 30px 25px;
  transition: border-top-color 0.3s ease-in-out, background 0.3s ease-in-out;
}

h1 {
  font-size: 2rem;
  text-align: center;
  color: #333;
  margin-bottom: 25px;
  font-weight: 700;
}

/* -----------------------------------
   1. Intro-scherm
   ----------------------------------- */
#intro-text {
  font-size: 1.1rem;
  color: #555;
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.5;
}

#theme-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

#theme-buttons button {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
  color: white;
  border: none;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.25s ease-in-out, transform 0.15s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#theme-buttons button:hover {
  background: linear-gradient(135deg, #1e88e5, #1976d2);
  transform: translateY(-2px);
}

#theme-buttons button:focus {
  outline: 3px solid rgba(30, 136, 229, 0.5);
}

/* -----------------------------------
   2. Quiz-scherm
   ----------------------------------- */
#progress {
  font-size: 1rem;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}

#timer {
  font-size: 1rem;
  color: #666;
  margin-bottom: 18px;
  font-weight: 500;
}

#story {
  font-size: 1.2rem;
  margin-bottom: 22px;
  min-height: 70px;
  color: #444;
  line-height: 1.6;
}

#choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

#choices button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.15s ease-in-out;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#choices button:hover:not(:disabled) {
  background-color: #43a047;
  transform: translateY(-1px);
}

#choices button:disabled {
  cursor: default;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

/* Correct/fout Kleuren */
.correct {
  background-color: #4CAF50 !important;
}

.incorrect {
  background-color: #E53935 !important;
}

#feedback {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  min-height: 1.8em;
  margin-bottom: 20px;
  text-align: center;
}

#quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}

#quiz-nav button {
  flex: 1;
  background-color: #FF9800;
  color: white;
  border: none;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.15s ease-in-out;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#quiz-nav button:hover {
  background-color: #FB8C00;
  transform: translateY(-1px);
}

#quiz-nav button:focus {
  outline: 2px solid rgba(251, 140, 0, 0.5);
}

/* -----------------------------------
   3. Thema-specifieke achtergrond & accent
   ----------------------------------- */
/* Algemeen (blauw accent, achtergrond image: algemeen-bg.jpg) */
body.theme-algemeen {
  background-image: url("../images/algemeen-bg.jpg");
}
body.theme-algemeen #container {
  border-top-color: #2196F3;
}

/* Wetenschap (groen accent, achtergrond image: wetenschap-bg.jpg) */
body.theme-wetenschap {
  background-image: url("../images/wetenschap-bg.jpg");
}
body.theme-wetenschap #container {
  border-top-color: #4CAF50;
}

/* Geschiedenis (oranje accent, achtergrond image: geschiedenis-bg.jpg) */
body.theme-geschiedenis {
  background-image: url("../images/geschiedenis-bg.jpg");
}
body.theme-geschiedenis #container {
  border-top-color: #FF9800;
}

/* Entertainment (paars accent, achtergrond image: entertainment-bg.jpg) */
body.theme-entertainment {
  background-image: url("../images/entertainment-bg.jpg");
}
body.theme-entertainment #container {
  border-top-color: #9C27B0;
}

/* -----------------------------------
   3.5 Intro-achtergrond
   ----------------------------------- */
body.intro-background {
  background-image: url("../images/intro-bg.jpg");
  background-size: cover;
  background-position: center;
  /* Lichte overlay zodat tekst goed leesbaar blijft */
  background-color: rgba(255, 255, 255, 0.6);
  background-blend-mode: lighten;
}

/* -----------------------------------
   4. Responsive (kleine schermen)
   ----------------------------------- */
@media (max-width: 480px) {
  #container {
    padding: 20px 15px;
  }
  h1 {
    font-size: 1.6rem;
  }
  #intro-text {
    font-size: 1rem;
  }
  #theme-buttons button,
  #choices button,
  #quiz-nav button {
    font-size: 0.95rem;
    padding: 10px 0;
  }
  #story {
    font-size: 1.1rem;
  }
}
/* -----------------------------------
   Leaderboard Cards
   ----------------------------------- */
#leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

#leaderboard-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 6px;
  border-left: 6px solid #2196F3; /* default blauw, wordt overschreven per thema */
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#leaderboard-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Accent-kleur per thema */
body.theme-algemeen    #leaderboard-list li { border-color: #2196F3; }
body.theme-wetenschap  #leaderboard-list li { border-color: #4CAF50; }
body.theme-geschiedenis#leaderboard-list li { border-color: #FF9800; }
body.theme-entertainment #leaderboard-list li { border-color: #9C27B0; }

/* Tekst styling */
.leaderboard-name {
  font-weight: 600;
  color: #333;
}

.leaderboard-score {
  font-size: 1.1rem;
  font-weight: 500;
  color: #555;
}
