/* Resetting default margin and padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Global Styles */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background-color: #f7f7f7;
  color: #333;
}

/* Header Styles */
header {
   background-color: #4C2C92; 
  /* background-color: #00adef; */
  /* Dark Purple */
  color: white;
  padding: 15px;
  text-align: center;
}

header .logo img {
  width: 150px;
  /* Adjust based on your logo size */
  vertical-align: middle;
}

header h1 {
  display: inline-block;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-weight: 600;
  font-size: 2.5em;
  margin-left: 15px;
}

/* Main Content Styles */
main {
  padding: 1px 10%;
  text-align: center;
}

.intro h1 {
  
  margin-top: 20px;
  margin-bottom: 15px;
}
.intro h2 {
  font-size: 1.5em;
  margin-top: 15px;
  margin-bottom: 15px;
}

.intro p {
  font-size: 1em;  
  margin-bottom: 20px;
}

.start-btn {
  display: inline-block;
  text-decoration: none;
  /* Removes underline */
  background-color: #4C2C92;
  color: white;
  font-size: 1.2em;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 250px;
}

.start-btn:hover {
  background-color: #6a4b9e;
}

/* Features Section */
.features h2 {
  font-size: 1.8em;
  margin-bottom: 20px;
}

.features ul {
  list-style: none;
}

.features li {
  font-size: 1.1em;
  margin-bottom: 10px;
}

/* Footer Styles */
footer {
   background-color: #4C2C92; 
  /* background-color: #00adef; */
  /* Dark Purple */
  color: white;
  padding: 10px;
  text-align: center;
  margin-top: 40px;
  
}

footer a{
  color: white;
}
.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;        /* small spacing */
  flex-wrap: wrap; /* keeps it pretty on small screens */
}

.footer-content p {
  margin: 0;       /* important: remove paragraph margin */
}
/* Question and Answer Styles */
.question-container {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 600px;
  margin: 20px auto;
}

.question h2 {
  font-size: 1em;
  margin-bottom: 20px;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-weight: 600;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.answer-btn {
  background-color: #4C2C92;
  color: white;
  font-size: 1em;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.answer-btn:hover {
  background-color: #6a4b9e;
}

.navigation {
  display: flex;
  justify-content: center;
}

.next-btn {
  background-color: #28a745;
  color: white;
  font-size: 1.1em;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.next-btn:hover {
  background-color: #218838;
}

/* Ad Placeholder Styles */
.ad-placeholder,
.ad-placeholder-bottom {
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  padding: 10px;
  margin: 20px 0;
  text-align: center;
  font-size: 1.2em;
  color: #555;
  border-radius: 8px;
}

/* Ensure ads are not too intrusive */
.ad-placeholder p,
.ad-placeholder-bottom p {
  margin: 0;
  color: #777;
}

.ad-placeholder {
  margin-bottom: 40px;
  /* Spacing between question section and ad */
}

.ad-placeholder-bottom {
  margin-top: 40px;
  /* Spacing between last section and ad */
}

#pLoading {
  font-style: italic;
  color: gray;
}

.dashboard {
  /* background-color: #f0f0f0; */
  border: 1px solid #4C2C92;
  border-radius: 12px;
  padding: 1px 10px;
  /* width: 100%; */
  max-width: fit-content;
  font-family: sans-serif;
  font-size: 0.9em;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  line-height: 1.6;
  margin-bottom: 18px;
  margin-left: auto;
}

.game-over {
  background-color: #fdfdfd;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 24px;
  margin-top: 30px;
  /* max-width: 400px; */
  width: 100%;
  font-family: sans-serif;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.game-over h2 {
  margin-bottom: 16px;
  color: #333;
}

.game-over .correct {
  color: green;
  font-weight: bold;
}

.game-over .wrong {
  color: red;
  font-weight: bold;
}

.game-over button {
  margin-top: 20px;
  padding: 10px 20px;
  border: none;
  background-color: #4caf50;
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.game-over button:hover {
  background-color: #45a045;
}


.boxb {
  max-width: 600px;
  margin: 16px auto;
  padding: 16px 16px;
  border: 1px solid #ccc;
  border-radius: 10px;
}

.box {
  max-width: 650px;
  /* slightly wider = better reading */
  margin: 24px auto;
  /* more breathing room */
  padding: 20px 24px;
  /* more comfortable spacing */
  background: #ffffff;
  /* makes it feel intentional */
  border: 1px solid #e2e2e2;
  /* softer border */
  border-radius: 12px;
  /* slightly smoother */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  /* soft shadow */
}


.home-buttons {
  display: flex;
  flex-direction: row;
  /* side-by-side */
  justify-content: center;
  /* centers them horizontally */
  align-items: center;
  /* optional, keeps vertical alignment clean */
  gap: 12px;
  /* space between the buttons */
  margin-top: 20px;
  /* optional, adds space from content above */
}

@media (max-width: 600px) {
  .home-buttons {
    flex-direction: column;
    /* stacked vertically */
  }
}

.policy {
  text-align: left;
}

.policy h1{
  margin-top: 20px;
}
.policy h2{
  margin-top: 15px;
}
.policy h3{
  margin-top: 10px;
}
.policy ul {
  padding-left: 20px;   /* adjust until it looks perfect */
}
.game-settings {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
}

.setting-group {
  margin-bottom: 1.5rem;
}

.setting-help {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.difficulty-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-option {
  flex: 1 1 30%;
  text-align: center;
  cursor: pointer;
}

.pill-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-option span {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}

.pill-option input:checked + span {
  border-color: #333;
  font-weight: 600;
}

.range-value {
  font-size: 0.95rem;
}

.primary-button {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

.actions {
  margin-top: 1.5rem;
}

/* Accessibility helper for hidden label */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#category {
  appearance: none;                  /* Remove default browser arrow */
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 0.9rem 1rem;              /* Increased height */
  font-size: 1rem;
  border-radius: 12px;               /* More rounded corners */
  border: 1px solid #ccc;
  background-color: #fff;
  width: 100%;
  cursor: pointer;

  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='14' height='10' viewBox='0 0 14 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23666' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;  /* Position the arrow */
  background-size: 14px;
}

#category:focus {
  border-color: #333;
  outline: none;
}