/* General Body Styling */
body {
  background: #000000; /* Solid black background */
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-family: 'Montserrat', Arial, sans-serif; /* Updated to Montserrat */
  flex-direction: column;
}

/* Centering Start Page and Trivia Box */
#start-game-screen,
.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%; /* Ensures responsiveness */
  text-align: center;
}

/* Ensure no 'correct' or 'incorrect' styles bleed into the start screen */
#start-game-screen {
  background: none !important; /* Override any accidental styles */
  border: none !important;
  padding: 0;
  color: #ffffff; /* Change text color to white */
  transition: none; /* Disable transitions for this screen */
}

/* Remove box around the end-of-game screen */
#win-screen,
#tap-out-screen {
  background: none !important; /* No background */
  border: none !important; /* No border */
  color: #ffffff; /* Change text color to white */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%; /* Ensures responsiveness */
  text-align: center;
  transition: none; /* Disable transitions for this screen */
}

/* Trivia Box */
.trivia-box {
  position: relative;
  padding: 20px;
  background-color: #000000;
  width: 750px;
  max-width: 99%;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 15px; /* Changed to match the provided CSS */
  border: 1px solid #fff !important; /* Changed to single thin border */
  transition: opacity 0.6s ease-in-out, border-color 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

.trivia-box.correct {
  border-color: #00ff00 !important;
  background-color: #00ff00 !important;
  color: #000000;
}

.trivia-box.incorrect {
  border-color: #ff0000 !important;
  background-color: #ff0000 !important;
  color: #ffffff;
}

/* Hidden Elements */
.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

/* Start Game Button */
.start-game-button {
  font-size: 22px;
  background-color: #000000;
  color: #ffffff;
  font-family: 'Montserrat', Arial, sans-serif; /* Updated to Montserrat */
  font-weight: 700; /* Bold */
  border: 1px solid #ffffff;
  padding: 10px 14px;
  cursor: pointer;
  transition: color 0.3s, background-color 0.3s;
  border-radius: 10px;
  margin-top: 20px;
}

.start-game-button:hover {
  background-color: #ffffff;
  color: #000000;
}

/* Lives Container */
.lives-container {
  position: absolute;
  top: 40px;
  left: 40px;
  display: flex;
  gap: 5px;
  z-index: 10;
}

.life {
  width: 15px;
  height: 15px;
  background-color: white;
  border-radius: 50%;
  opacity: 0; /* Start invisible */
  transform: scale(0.9); /* Start slightly smaller */
  transition: opacity 0.5s ease, transform 0.5s ease; /* Smooth transition */
}

.life.visible {
  opacity: 1; /* Fully visible */
  transform: scale(1); /* Normal size */
}

.life.fade-out {
  opacity: 0; /* Become invisible */
  transition: opacity 0.5s ease; /* Smooth fade-out transition */
}

/* Header Container */
.header-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: -5px;
}

/* Ante Header */
.ante-header {
  margin-bottom: 5px;
}

.ante-header h1 {
  font-family: 'Montserrat', Arial, sans-serif; /* Updated to Montserrat */
  font-size: 35px;
  font-weight: 400; /* Unbolded */
  color: #ffffff;
  text-align: center;
  margin: 0;
}

/* Separation Line */
.separation-line {
  width: 90%;
  height: 2px; /* Adjustable height */
  background-color: #ffffff; /* White color */
  margin: 8px 0; /* Adjustable margin */
}

/* Question Header */
.question-header {
  font-family: 'League Spartan', Arial, sans-serif; /* Changed to League Spartan */
  font-size: 28px;
  font-weight: 400; /* Unbolded */
  color: #ffffff;
  text-align: center;
  position: relative;
  margin-top: 7px; /* Reduced for closer alignment to question */
}

/* Advance Arrow */
.next-arrow {
  font-size: 26px;
  color: #ffffff;
  background-color: transparent;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  right: -40px;
  top: 40%;
  transform: translateY(-50%);
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.next-arrow.visible {
  opacity: 1;
  visibility: visible;
}

.next-arrow:hover {
  color: #bbbbbb;
}

/* Question Text */
.question-container {
  margin: 10px 0 20px; /* Reduced top margin to match original spacing */
}

.question {
  font-size: 26px;
  color: #ffffff;
  font-family: 'Montserrat', Arial, sans-serif; /* Changed back to Montserrat */
}

/* Answer Buttons */
.answer-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 103%;
}

.trivia-answer {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  background-color: #000000;
  color: #ffffff;
  font-family: 'Montserrat', Arial, sans-serif; /* Use Montserrat */
  font-weight: 400; /* Regular weight */
  border: 1px solid #ffffff; /* Thinner border */
  padding: 10px;
  cursor: pointer;
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
  border-radius: 15px; /* More rounded corners */
  position: relative;
  text-align: center;
  min-height: 60px;
}

.answer-year {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  font-style: italic;
  transition: opacity 0.5s ease-in;
  white-space: nowrap;
  font-family: 'Montserrat', Arial, sans-serif; /* Use Montserrat */
  font-weight: 300; /* Light Italic */
}

.answer-year.visible {
  opacity: 1;
}

.trivia-answer .text {
  flex: 1;
  text-align: center;
  max-width: calc(100% - 50px); /* Ensures space for year on the right */
}

.trivia-answer:hover {
  background-color: #ffffff;
  color: #000000;
}

.trivia-answer.selected {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.trivia-answer.correct {
  border: 1px solid #00ff00; /* Thinner border */
  background-color: #000000;
  color: #ffffff;
}

.trivia-answer.incorrect {
  border: 1px solid #ff0000; /* Thinner border */
  background-color: #000000;
  color: #ffffff;
}

.trivia-answer.selected.correct {
  background-color: #00ff00;
  border: 1px solid #00ff00; /* Thinner border */
  color: #000000;
}

.trivia-answer.selected.incorrect {
  background-color: #ff0000;
  border: 1px solid #ff0000; /* Thinner border */
  color: #000000;
}

/* Tap Out Button */
.tap-out-button {
  font-size: 22px;
  background-color: #000000;
  color: #ffffff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700; /* Bold */
  border: none; /* Remove border */
  padding: 10px;
  cursor: pointer;
  transition: color 0.3s, background-color 0.3s, opacity 0.6s, visibility 0.6s;
  border-radius: 15px;
  margin-top: 30px; /* Increased margin to space out more from the bottom choice */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 60px;
  opacity: 0;
  visibility: hidden;
}

.tap-out-button.visible {
  opacity: 1;
  visibility: visible;
}

.tap-out-button:hover {
  background-color: #ffffff;
  color: #000000;
}

/* Desktop-specific Tap Out Button Adjustment */
@media (min-width: 768px) {
  .tap-out-button {
    position: absolute;
    top: calc(100% + 20px); /* 20px below the bottom edge of the trivia box */
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0; /* Remove existing margin */
  }
}

/* Added Start Page Enhancements */
.game-description {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #ffffff; /* Ensure rules text is white */
  font-family: 'Montserrat', Arial, sans-serif; /* Use Montserrat */
}

.game-instructions {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #ffffff; /* Ensure instructions text is white */
  font-family: 'Montserrat', Arial, sans-serif; /* Use Montserrat */
}

/* Stats Styling */
.stats {
  font-size: 22px; /* Slightly smaller font size */
  font-family: 'Montserrat', Arial, sans-serif; /* Use Montserrat */
  font-weight: 400; /* Regular weight */
  color: #ffffff; /* Same shade of white */
  margin: 20px 0; /* Add margin to ensure equidistant spacing */
  text-align: center;
}

.stats p {
  margin: 5px 0; /* Space between stats lines */
}

.percentage-circle {
  display: inline-block;
  width: 100px; /* Perfect circle size */
  height: 100px; /* Perfect circle size */
  line-height: 100px; /* Center text vertically */
  border: 3px solid #ffffff; /* White border with bold thickness */
  border-radius: 50%; /* Make it a perfect circle */
  margin-top: 20px; /* Space above the percentage circle */
  font-size: 24px; /* Font size of the percentage */
  font-weight: 400; /* Match the font weight */
  color: #ffffff; /* White text for contrast */
  background: transparent; /* Ensure no background */
}

/* Media Query for Manual Adjustment on Mobile View */
@media (max-width: 600px) {
  #start-game-screen,
  #win-screen,
  #tap-out-screen,
  .container {
    top: 0; /* Align the container to the top of the page */
    transform: translate(-50%, 0); /* Adjust horizontal centering only */
    padding-top: 20px; /* Optional: Adds some space at the top for better appearance */
    height: auto; /* Ensures the box adapts dynamically */
  }

  .header-container {
    margin-top: 0; /* Removes any default margin that would push the header down */
  }

  .trivia-box {
    border-radius: 10px;
    border: 1px solid #fff; /* Match the desktop border styling */
  }

  .next-arrow {
    left: -5px; /* Adjust this value to move horizontally */
    top: 45%;
    transform: translateY(-50%);
    font-size: 25px; /* Adjust font size for mobile */
  }

  .trivia-answer .text {
    max-width: calc(100% - 60px); /* Adjust for narrower screens */
  }

  .answer-year {
    font-size: 14px; /* Adjust the font size specifically for mobile */
  }

  /* Ante Header */
  .ante-header {
    margin-bottom: 5px; /* Adjustable margin for mobile */
    top: 5px; /* Adjustable top for mobile */
  }

  .ante-header h1 {
    font-size: 40px; /* Adjust font size for mobile */
    line-height: 1.2; /* Adjustable height for mobile */
    font-weight: 400; /* Unbolded */
  }

  /* Separation Line */
  .separation-line {
    height: 1px; /* Adjustable height for mobile */
    width: 99%; /* Adjustable width for mobile */
    margin: 8px 0; /* Adjustable margin for mobile */
    background-color: #ccc; /* Adjustable color for mobile */
  }

  /* Lives Container */
  .lives-container {
    top: 33px; /* Adjustable top for mobile */
    left: 30px; /* Adjustable left for mobile */
    gap: 3px; /* Adjustable gap for mobile */
  }

  .life {
    width: 12.5px; /* Adjustable width for mobile */
    height: 12.5px; /* Adjustable height for mobile */
  }

  /* Question Header */
  .question-header {
    font-size: 30px; /* Adjust font size for mobile */
  }

  /* Question Text */
  .question {
    font-size: 25px; /* Adjust font size for mobile */
  }

  /* Answer Buttons */
  .trivia-answer {
    font-size: 21px; /* Adjust font size for mobile */
    padding: 6.5px; /* Adjust padding for mobile */
  }
}

/* Media query for mobile devices */
@media only screen and (max-width: 767px) {
  .trivia-box {
    border: none !important; /* Hide border for mobile devices */
  }
}

/* Adding rules-heading class to AnteS.css */
.rules-heading {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: normal;
  margin-bottom: 5px;
  font-size: 32px; /* Adjustable font size */
}
