/* Root variables for color palette */
:root {
  --main-bg-color: #0c134f80;
  /* Main background color */
  --sec-bg-color: #1d267d80;
  /* Secondary background color */
  --sec-text-color: #5c469c;
  /* Secondary text color */
  --main-text-color: #d4adfc;
  /* Main text color */
  --border-color: #99999c;
  /* Border color */
}

/* --------- Global style */
/* Styling for the body */
body {
  background-color: var(--main-bg-color);
  font-family: "Raleway", sans-serif;
  color: white;
  text-align: center;
  width: 100%;
  background-image: url("../images/universe.jpeg");
  background-size: cover;
}

/* Heading styles */
h2 {
  font-size: 1.5rem;
}

/* Control image size */
img {
  width: 100%;
  max-width: 400px;
  height: auto;
}

/* Heading and banner styles */
.heading {
  text-align: center;
  font-size: 2.5rem;
}

/* Game layout styles */
.game-area {
  margin-left: 125px;
  margin-right: 125px;
  border: 2px solid;
  border-radius: 25px;
  background-color: rgba(54, 7, 163, 0.438);
}

/* Styling for displaying correct answers */
#displayCorrectAnswer {
  font-size: 2rem;
}

/* Styling for the area containing controls */
.controls-area {
  margin-top: 15px;
  margin-bottom: 15px;
}

/* Styling for the area containing the question */
.question-area {
  width: 50%;
  font-size: 2rem;
  margin: auto;
  padding: 50px 0;
}

/* Styling for the area displaying the score */
.score-area {
  display: flex;
  flex-wrap: nowrap;
  padding: 10px;
  justify-content: space-around;
  align-items: center;
  margin: 5px auto 30px;
  width: 60%;
  font-size: 1.25rem;
  background-color: var(--main-bg-color);
  border-radius: 20px;
  border: 1.5px solid;
}

/* Styling for the container holding social elements */
.container-socials {
  padding: 20px;
  display: flex; /* Use flexbox */
  flex-direction: row; /* Arrange in a row */
  flex-wrap: wrap; /* Allow wrapping */
  height: 100px; /* Set height */
  align-items: center; /* Align items */
  justify-content: space-around; /* Spread items */
  font-size: 3rem;
}

/* Styling for correct answer */
#correct {
  color: green;
  font-weight: bold;
}

/* Styling for incorrect answer */
#incorrect {
  color: red;
  font-weight: bold;
}

/* Styling for incorrect unknown answer */
#unknown {
  color: lightgrey;
  font-weight: bold;
}

/* Styling for answer message */
.answer-message {
  display: none;
  font-size: 1rem;
}

/* Styling for answer box */
#answer-box {
  border: none;
  color: white;
  display: inline-block;
  height: 40px;
  width: 80px;
  font-size: 1.2rem;
}

/* General button styles */
button {
  margin: 10px;
}

/* Styling for generic button class */
.btn {
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
}

/* Focus style for buttons */
.btn:focus {
  outline: none;
}

/* Styling for large buttons */
.btn--big {
  padding: 5px;
  background-color: black;
  border: 5px solid;
  height: 75px;
  font-size: 1rem;
  transition: all 0.5s;
}

/* Content pseudo-element for big buttons */
.btn--big::after {
  content: attr(data-type);
  font-size: 0rem;
}

/* Specific styling for answer choice A */
.btn--A {
  border-color: magenta;
  color: violet;
}

/* Hover/active styling for answer choice A */
.btn--A:active,
.btn--A:hover {
  background-color: violet;
  color: white;
}

/* Specific styling for answer choice B */
.btn--B {
  border-color: orange;
  color: orange;
  padding: 10px;
}

/* Hover/active styling for answer choice B */
.btn--B:active,
.btn--B:hover {
  background-color: darkorange;
  color: white;
}

/* Specific styling for answer choice C */
.btn--C {
  border-color: red;
  color: red;
  padding: 10px;
}

/* Hover/active styling for answer choice C */
.btn--C:active,
.btn--C:hover {
  background-color: darkred;
  color: white;
}

/* Hover/active styling for answer choice D */
.btn--D {
  border-color: yellowgreen;
  color: yellowgreen;
  padding: 10px;
}

/* Hover/active styling for answer choice D */
.btn--D:active,
.btn--D:hover {
  background-color: darkgreen;
  color: white;
}

/* Styling for a gray button */
.btn--gray {
  padding-left: 10px;
  padding-right: 10px;
  background-color: rgb(87, 87, 87);
  border: 3px solid;
  font-size: 1.5rem;
  height: 7vh;
  border-radius: 20px;
  transition: all 0.5s;
  margin-bottom: 30px;
}

/* Hover/active styling for the gray button */
.btn--gray:active,
.btn--gray:hover {
  background-color: lightgray;
  color: black;
}

/* Styling for the message related to the question */
#messageQuestion {
  color: gold;
  font-size: 1.75rem;
  padding: 10px;
}

/* Padding for elements with ID 'correct', 'incorrect', 'unknown' */
#correct {
  padding-left: 8px;
  padding-right: 8px;
}
#incorrect {
  padding-left: 8px;
  padding-right: 8px;
}
#unknown {
  padding-left: 8px;
  padding-right: 8px;
}

/* Transition effect for the result element */
#result {
  transition: opacity 1s ease-in-out;
  font-size: 2.25rem;
}

/* Media queries for responsiveness */
/* Adjust styles for different screen sizes */
@media (max-width: 800px) {
  /* Styles for smaller screens */
  .score-area {
    font-size: 1rem;
    padding: 10px;
    border-radius: 10px;
    flex-wrap: nowrap;
  }
}

/* Media query for devices up to 720px */
@media (max-width: 720px) {
  /* Adjusting margin for the game area */
  .game-area {
    margin: 0px;
  }

  /* Adjusting margin for the controls area */
  .controls-area {
    margin: 0px;
  }
}

/* Media query for devices up to 414px */
@media (max-width: 414px) {
  /* Adjusting font sizes for heading elements */
  h2 {
    font-size: 1rem;
  }
  
  /* Making images responsive */
  img {
    width: 100%;
    height: 100%;
  }

  /* Adjusting styles for gray buttons */
  .btn--big {
    height: 50px;
    font-size: 0.85rem;
  }

  /* Adjusting styles for the score area */
  .btn--big::after {
    content: attr(data-type);
    font-size: 0rem;
  }

  /* Adjusting font size for headings */
  .btn--gray {
    align-items: center;
    width: 150px;
    height: 50px;
    font-size: 0.85rem;
  }

  /* Flexbox adjustments for social media container */
  .score-area {
    width: 75%;
    font-size: 0.95rem;
  }

  /* Adjusting font size for the end message */
  .heading {
    font-size: 2rem;
  }

  /* Flexbox adjustments for social media container */
  .container-socials {
    justify-content: space-evenly;
    font-size: 1.85rem;
  }

  /* Adjusting font size for end */
  #end {
    font-size: 0.85rem;
  }

  /* Adjusting font size for question messages */
  #messageQuestion {
    font-size: 1rem;
  }
}

/* Media query for devices up to 344px */
@media (max-width: 344px) {
  /* Adjusting styles for gray buttons */
  .btn--gray {
    font-size: 0.85rem;
    width: 125px;
    height: 75px;
  }

  /* Adjusting styles for the score area */
  .score-area {
    flex-direction: column;
    height: auto;
    width: 50%;
  }
}

/* Media query for devices up to 180px */
@media (max-width: 180px) {
  .btn--gray {
    /* Adjusting styles for gray buttons */
    width: 90px;
    height: 55px;
    font-size: 0.7rem;
  }
}
