/* === GLOBAL === */
body {
  background: url("https://upload.wikimedia.org/wikipedia/en/a/ae/Flag_of_the_United_Kingdom.svg")
    center/cover no-repeat;
  background-attachment: fixed;
  font-family: "Poppins", sans-serif;
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(11, 27, 84, 0.75);
  z-index: 0;
}

.page {
  display: none;
  z-index: 1;
  text-align: center;
}

.active {
  display: block;
}

.container {
  position: relative;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 700px;
  padding: 2rem 2.5rem;
  z-index: 1;
}

h1 {
  color: #001f5b;
  margin-top: 0;
}

h2 {
  color: #012169;
  margin-bottom: 10px;
}

/* === BUTTONS === */
button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

button:hover {
  opacity: 0.9;
}

.start-btn {
  background: #007bff;
  color: #fff;
  margin-top: 20px;
}

.topic-btn {
  display: block;
  width: 100%;
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
}

/* === TOPIC COLORS === */
#FamPersonaBtn {
  background: #2a6fdb;
}
#GovPoliticsBtn {
  background: #db2a56;
}
#geoBtn {
  background: #3b8c3b;
}
#culBtn {
  background: #8d1414;
}
#histBtn {
  background: #6f32a8;
}
#SocRightBtn {
  background: #38f000;
  color: #000;
}
#WarsConfBtnBtn {
  background: #f0b400;
  color: #000;
}

/* === EXIT BUTTON === */
.exit {
  background: #dc3545;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.exit:hover {
  background: #bb2d3b;
}

/* Responsividade — ajusta no celular */
@media (max-width: 768px) {
  .exit {
    position: static;
    display: block;
    margin: 0.8rem auto;
    width: 80%;
    text-align: center;
  }
}

/* === PROGRESS BAR === */
.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  color: #001f5b;
  font-weight: 600;
}

.progress-bar-container {
  width: 100%;
  background: #e6e6e6;
  border-radius: 10px;
  height: 12px;
  margin: 8px 0 15px 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #007bff, #0047ab);
  transition: width 0.4s ease;
  border-radius: 10px;
}

/* === QUIZ OPTIONS === */
.option {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 10px 0;
  text-align: left;
  cursor: pointer;
  transition: 0.3s;
}

.option:hover {
  background: #f1f1f1;
}

.correct {
  background: #28a745 !important;
  color: #fff;
}

.incorrect {
  background: #dc3545 !important;
  color: #fff;
}

/* === EXPLANATION === */
.explanation {
  background: #f9f9f9;
  border-left: 4px solid #001f5b;
  padding: 12px 15px;
  margin-top: 15px;
  border-radius: 6px;
  text-align: left;
  display: none;
  white-space: pre-line;
  line-height: 1.5;
}

/* === NAV BUTTONS === */
.buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

button.nav {
  background: #007bff;
  color: #fff;
}

/* === RESULTS === */
#results {
  display: none;
  text-align: center;
}

#results.active {
  display: block;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .container {
    padding: 1.5rem;
  }
  h1 {
    font-size: 1.5rem;
  }
  .topic-btn {
    font-size: 0.95rem;
    padding: 12px;
  }
}
/* === TOPIC SELECTION PAGE === */
.topic-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  margin: 0.6rem 0;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #fff;
}

/* Cores para cada botão */
#valuesBtn {
  background: #007bff;
}
#valuesBtn:hover {
  background: #0056b3;
}

#geoBtn {
  background: #198754;
}
#geoBtn:hover {
  background: #146c43;
}

#histBtn {
  background: #6f42c1;
}
#histBtn:hover {
  background: #59359a;
}

/* 🏙️ A Modern, Thriving Society */
#modernBtn {
  background: #ff7b00;
}
#modernBtn:hover {
  background: #e56f00;
}

/* ⚖️ UK Government, Law & Your Role */
#lawBtn {
  background: #f7b500;
  color: #222;
}
#lawBtn:hover {
  background: #d99a00;
}

/* VOLTAR */
.start-btn {
  margin-top: 1.5rem;
  background: #007bff;
  color: #fff;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}
.start-btn:hover {
  background: #0056b3;
}
.correct-answer-box {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-weight: 600;
}
