/* Color Palette */
:root {
  /* Prefer a Comic Sans–style font that works on mobile, with sensible fallbacks */
  --font-family: 'Patrick Hand', 'Chalkboard SE', 'Marker Felt', cursive;

  /* Original Palette */
  --blue: #00A9E1;
  --yellow: #FBB03B;
  --purple: #D90082;
  --red: #EC1C24;
  --green: #A3D13B;
  --maroon: #a41b45;
  --orange: #F7931E;
  --dark-purple: #7B2C84;

  /* New Palette */
  --c1: #552579;
  --c2: #0070c0;
  --c3: #00b0f0;
  --c4: #66b032;
  --c5: #d0ea2b;
  --c6: #ffff00;
  --c7: #ffc000;
  --c8: #fd5308;
  --c9: #cb0003;
  --c10: #a41b45;

  /* General */
  --text-dark: #333;
  --text-light: #fff;
  --bg-light: #ffffff;
  --bg-grey: #f0f0f0;
}

/* Basic Styles */
body {
  font-family: var(--font-family);
  background-color: var(--bg-grey);
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  box-sizing: border-box;
}

#game-container {
  width: 100%;
  max-width: 400px;
  background-color: var(--bg-light);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

h2 {
    font-size: 1.8em;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.logo {
  max-width: 100%;
  margin-bottom: 0px;
  background-color: #000;
  border-radius:10px;
}

.tagline {
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 30px;
  font-size: 1.2em;
}

.power-text {
    margin-top: 40px;
    margin-bottom: 20px;
    font-style: italic;
    color: var(--text-dark);
    font-size: 1.2em;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 25px;
  color: var(--text-dark);
  font-size: 1.5em;
  font-family: var(--font-family);
  margin-bottom: 1rem;
  margin-right: 1rem;
  cursor: pointer;
}

.btn-blue { background-color: var(--blue); }
.btn-yellow { background-color: var(--yellow); }
.btn-purple { background-color: var(--purple); }
.btn-red { background-color: var(--red); }
.btn-green { background-color: var(--green); }
.btn-orange { background-color: var(--orange); }
.btn-dark-purple { background-color: var(--dark-purple); }

/* Forms */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 1.2em;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 10px;
  border-radius: 20px;
  font-size: 1.2em;
  font-family: var(--font-family);
  box-sizing: border-box;
}

#email.form-control { border: 2px solid var(--blue); }
#password.form-control { border: 2px solid var(--purple); }
#num-questions.form-control { border: 2px solid var(--blue); text-align: center; }

/* Summary Screen */
.summary-item { margin-bottom: 15px; }
.summary-item p { margin: 0; font-size: 1.4em; }
.summary-value { font-weight: bold; font-size: 1.6em !important; }

/* Game Play Screen */
.game-play-container .stop-game {
    display: block;
    text-align: right;
    color: var(--purple);
    text-decoration: none;
    margin-bottom: 10px;
}

.game-play-container .game-name { font-size: 1.5em; color: var(--text-dark); margin: 5px 0; }
.game-play-container .question-info { font-size: 1.3em; color: var(--text-dark); margin: 5px 0; }

#domino-display {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
}

#domino-display img { max-width: 80%; }
#answer-input { text-align: center; font-size: 1.5em; }

/* Game Over Screen */
.game-over-container p { font-size: 1.4em; color: var(--text-dark); }
.final-score-display { font-size: 2.5em !important; font-weight: bold; color: var(--blue) !important; margin: 20px 0; }
.goals-met-display { font-size: 1.2em !important; font-style: italic; color: var(--text-dark); }

.btn-prev { background-color: var(--dark-purple);
    margin: 40px 0px 5px 2px; 
    width: 20%; 
    font-size: 1.2em; 
    padding: 10px; 
    border-radius: 30spx;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  }
  
.game-options {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }
 
/*GPT code for game selection screen*/
  /* .screen-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
} */

/* .logo {
  width: 150px;
  margin-bottom: 20px;
} */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 20px;
  width: 90%;
  max-width: 600px;
  margin: 20px auto;
}

.game-btn {
  aspect-ratio: 1 / 1; /* 1x1 square */
  border: none;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: 2px solid black;
}

.game-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 20px var(--color);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .game-grid {
    gap: 12px;
  }
  .game-btn {
    border-radius: 10px;
    
  }
}

input {
  text-align: center;
}

.btn-random{
  animation: glow 2s ease-in-out infinite;
}

 @keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(61, 2, 65, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(61, 2, 65, 0.8);
    }
}

.more-time{
  visibility: hidden;
}

/* How To Play navigation layout */
.howto-nav {
  display: flex;
  gap: 10px;
  width: 100%;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x mandatory;
}

.howto-nav .btn {
  flex: 0 0 auto;
  min-width: 160px;
  font-size: 1.1em;
  padding: 10px 14px;
  border-radius: 999px; /* pill */
  scroll-snap-align: start;
}

@media (min-width: 520px) {
  .howto-nav {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: center;
  }
  .howto-nav .btn {
    min-width: 180px;
  }
}

/* Reusable How To Play section styles */
.howto-section {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  margin: 10px 0;
  overflow: hidden;
}
.howto-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 12px;
}
.howto-topbar .btn {
  width: auto;
  padding: 10px 16px;
  font-size: 1.1em;
  height: 100%;
}
.howto-topbar .btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--btn-back-size, clamp(40px, 12vw, 48px));
  height: var(--btn-back-size, clamp(40px, 12vw, 48px));
  min-width: 40px;
  border-radius: 999px; /* circle */
  background-color: #ffffff; /* keeps arrow (background-image) visible */
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background-size: 60% 60%; /* keep the back arrow image visible */
  background-repeat: no-repeat;
  background-position: center;
  object-fit: contain;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.howto-topbar .btn-back:hover {
  transform: scale(1.05);
  background-color: #fbf8fb; /* subtle purple tint on hover */
  /* border-color: #8f3a99; */
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.howto-topbar .btn-back:active {
  transform: scale(0.96);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}
.howto-topbar .btn-back:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(231, 229, 231, 0.35);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .howto-topbar .btn-back {
    transition: none;
  }
  .howto-topbar .btn-back:hover,
  .howto-topbar .btn-back:active {
    transform: none;
  }
}
/* .howto-topbar .btn-play { background-color: var(--green); color: var(--text-light); } */

.howto-section[open] {
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.howto-title {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 1.1em;
  color: var(--text-dark);
}

.howto-title::-webkit-details-marker { display: none; }

.howto-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fafafa;
}

.howto-body {
  padding: 8px 16px 16px;
  text-align: left;
}

.howto-body h4 { margin: 10px 0 6px; }
.howto-concept { font-weight: 600; }
.howto-description { margin: 6px 0 10px; }

.howto-example {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 8px;
}

.domino-img { height: 120px; }
.howto-answer { margin-top: 6px; font-weight: 600; }

input[type="range"] {
  margin-right: -2px; /* or -4px if the gap is bigger */
}