/* Import the custom font */
@font-face {
  font-family: "League Spartan";
  src: url("assets/fonts/LeagueSpartan-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 100%;
  font-style: normal;
  font-display: swap;
}
/* Reset & full-viewport sizing */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

html {
  font-size: 16px;
  font-size: calc(min(100vw / 80, 100vh / 50));
  overflow: hidden;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  font-family: "League Spartan", sans-serif;
  font-weight: 400;
  overflow: hidden;
}
.container {
  width: 80rem;
  height: 50rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  overflow: visible;
  background-color: #ffffff;
}
#check_button[disabled] {
  opacity: 0.4;
  filter: alpha(opacity=40); /* For IE8 and earlier */
  pointer-events: none;
}

/* Quiz Game Specific Styles */

/* Common styles for all screens */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.screen.active {
  display: flex;
  flex-direction: column;
  z-index: 5;
}

/* Intro Screen Styles */
#intro-screen {
  align-items: center;
  justify-content: center;
  background:
    url("assets/images/intro.jpg") center/cover no-repeat,
    linear-gradient(135deg, #248174 0%, #0c6aa0 100%);
}

.intro-content {
  position: absolute;
  left: 22rem;
  top: 11.2rem;
  width: 46rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #0c6aa0;
  padding: 0;
  background: transparent;
}

.intro-content h1 {
  font-size: 2.6rem;
  margin: 0 0 2.4rem;
  color: #ffffff;
  text-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.35);
}

.intro-content p {
  font-size: 2rem;
  margin: 0 0 2.6rem;
  max-width: 40rem;
  color: #0c6aa0;
}

.start-button {
  width: 14rem;
  height: 5.2rem;
  background-color: #0c6aa0;
  color: #ffffff;
  border: none;
  border-radius: 0.4rem;
  font-size: 2.6rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.start-button:hover {
  background-color: #0f79b8;
  transform: scale(1.05);
}

.start-button:active {
  transform: scale(0.98);
}

/* Game Screen Styles */
#game-screen {
  background:
    url("assets/images/game.jpg") center/cover no-repeat,
    linear-gradient(135deg, #248174 0%, #0c6aa0 100%);
}

#game-screen header {
  width: 100%;
  height: 0;
  padding: 0;
  background: transparent;
  color: #ffffff;
  box-sizing: border-box;
}

.game-title h1 {
  display: none;
}

.score-display {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: 22rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #ffffff;
}

.score-label {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
}

#score {
  font-size: 2.6rem;
  font-weight: 700;
  color: #ffffff;
}

#game-screen main {
  width: 100%;
  height: 40rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem 0 0;
  box-sizing: border-box;
}

.categories-container {
  display: flex;
  justify-content: space-between;
  width: 71rem;
  height: 31.5rem;
  margin-top: 4rem;
}

.category {
  display: flex;
  flex-direction: column;
  width: 10.7rem;
  padding-top: 0.4rem;
  box-sizing: border-box;
  border-radius: 1rem;
  overflow: hidden;
}

.category h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a5c54;
  margin: 0 0 0.3rem;
  padding: 0.3rem 0.8rem;
  flex-shrink: 0;
}

.questions {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: transparent;
}

.question-button {
  flex: 1;
  min-height: 0;
  background-color: transparent;
  border: none;
  border-top: 0.3rem solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform 0.2s ease;
  overflow: hidden;
}

.question-button[data-points="500"] {
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.question-button:hover {
  transform: scale(0.98);
}

.question-button .points-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.question-button.answered {
  pointer-events: none;
  position: relative;
}

.question-button.correct::after {
  content: "";
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  background: url('correct.svg') no-repeat center/contain;
}

.question-button.incorrect::after {
  content: "";
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  background: url('wrong.svg') no-repeat center/contain;
}

/* Question Screen Styles */
#question-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 10;
  display: none;
  justify-content: center;
  align-items: center;
}

#question-screen.active {
  display: flex;
}

.question-container {
  position: relative;
  width: 60rem;
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem 2rem 0rem 2rem;
  color: #333;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-3rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid #248174;
  padding-bottom: 1rem;
}

.question-header h2 {
  font-size: 2rem;
  margin: 0;
  color: #0c6aa0;
}

.question-points {
  font-size: 3rem;
  font-weight: bold;
  color: #f9b000;
}

.question-content {
  margin-bottom: 2rem;
}

#question-text {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.question-image-container {
  text-align: center;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.question-image-container img {
  max-width: 100%;
  max-height: 8rem;
  border-radius: 0.5rem;
  display: block;
  margin: 0 auto;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  background-color: #ffffff;
}

.option {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option:hover {
  background-color: #e0e0e0;
}

.option.selected {
  background-color: rgba(249, 176, 0, 0.3);
  border-color: #f9b000;
}

.option-text {
  font-size: 1.3rem;
  color: #333;
}

.question-footer {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  background-color: #ffffff;
}

.check-button {
  background: url('assets/images/checkBtn.svg') center/contain no-repeat;
  width: 12rem;
  height: 4rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0c6aa0;
  background-color: #ffffff;
  border-radius: 0.5rem;
  transition: transform 0.2s ease;
}

.check-button:hover {
  background-image: url('assets/images/checkBtnHover.svg');
  transform: scale(1.05);
}

.check-button:disabled,
.check-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* FEEDBACK OVERLAY */
.feedback {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  display: none;
  background: transparent;
  z-index: 15;
  pointer-events: none;
}

.feedback img {
  max-width: 14rem;
  max-height: 14rem;
  object-fit: contain;
}
/* Game End Overlay Styles */
.game-end-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 30;
  background: transparent;
}

.game-end-content {
  width: 70rem;
  height: 38rem;
  background: url("outro.png") center/contain no-repeat;
  border-radius: 0;
  padding: 0;
  text-align: left;
  color: #1a1a1a;
  box-shadow: none;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

@keyframes popIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.game-end-text {
  position: absolute;
  top: 8rem;
  left: 10.5rem;
  width: 48rem;
  padding-right: 13rem;
  box-sizing: border-box;
  text-align: center;
}

.game-end-title {
  font-size: 2.8rem;
  margin: 0 0 0.6rem;
  color: #0c6aa0;
  font-weight: 800;
}

.game-end-subtitle {
  font-size: 2.2rem;
  margin: 0 0 2.2rem;
  color: #0c6aa0;
  font-weight: 800;
}

.game-end-score-label {
  font-size: 1.6rem;
  margin: 0 0 0.8rem;
  color: #1a1a1a;
  font-weight: 700;
}

.game-end-score {
  font-size: 3.4rem;
  margin: 0 0 0.2rem;
  color: #1a1a1a;
  font-weight: 900;
}

#final-score {
  font: inherit;
}

.game-end-message {
  font-size: 1.5rem;
  margin: 0.4rem auto 0;
  max-width: 30rem;
  color: #1a1a1a;
  font-weight: 700;
  white-space: pre-line;
  line-height: 1.35;
}

.game-end-buttons {
  display: flex;
  justify-content: center;
  margin-top: 1.2rem;
}

.game-end-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #0c6aa0;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  padding: 1rem 1.6rem;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-end-buttons button:hover {
  background-color: #0f79b8;
  transform: scale(1.05);
}

.game-end-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.disabled, .disabled>*{
  pointer-events: none;
  cursor: not-allowed;
}