* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Copperplate', 'Arial Black', sans-serif;
  background-color: #000000;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  position: relative;
}

.hidden {
  display: none !important;
}

.title-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #2033d8 0%, #0a0f4c 50%, #000000 100%);
  z-index: 10;
}

.title-screen-content {
  text-align: center;
  padding: 2.5rem 2rem;
  border: 4px solid #ffcc00;
  background: #0a0f4c;
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(255, 204, 0, 0.332);
}

.title-kicker {
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-size: 1.0rem;
  margin-bottom: 0.75rem;
}

.title-screen h1 {
  color: #ffcc00;
  font-size: clamp(2.5rem, 5vw, 5rem);
  text-shadow: 4px 4px #000;
  margin-bottom: 1.5rem;
}

.difficulty-select {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.difficulty-select select {
  padding: 0.5rem 0.8rem;
  border: 1px solid #3b82f6;
  border-radius: 6px;
  background: #1e3a8a;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

.background-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  cursor: pointer;
}

.background-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: #ffcc00;
  cursor: pointer;
}

.start-btn {
  font-size: 1.5rem;
  font-weight: 700;
  padding: 1.0rem 2.0rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.scoreboard {
  text-align: center;
  margin-bottom: 1.5rem;
}

.scoreboard h1 {
  color: #ffcc00;
  font-size: 3rem;
  letter-spacing: 2px;
  text-shadow: 3px 3px #000;
}

.score-display {
  font-size: 1.8rem;
  color: #22c55e;
  font-family: system-ui, sans-serif;
  font-weight: bold;
}

/* Board Layout */
.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* first number is amt of columns */
  gap: 10px;
  width: 100%;
  max-width: 900px;
}

.category-title {
  background-color: #7175e3;
  color: #ffffff;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem 0.5rem;
  font-size: 1.2rem;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 2px 2px #000;
}

.tile {
  background-color: #2c2e6c;
  color: #ffcc00;
  font-size: 2rem;
  text-align: center;
  padding: 1.5rem 0;
  border: 2px solid #000;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s;
  user-select: none;
}

.tile:hover:not(.disabled) {
  background-color: #1018fe;
  transform: scale(1.02);
}

.tile.disabled {
  background-color: #020556;
  color: transparent;
  cursor: default;
  border-color: #010328;
}

/* Modal Popup Overlay */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: #2c2e6c;
  border: 4px solid #7175e3;
  padding: 2rem;
  border-radius: 12px;
  width: 100%;
  max-width: 550px;
  text-align: center;
  font-family: system-ui, -apple-system, sans-serif;
}

.badge {
  color: #93c5fd;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
}

.badge-value {
  color: #ffcc00;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

#modal-question {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

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

.btn {
  padding: 0.8rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #3b82f6;
  background: #1e3a8a;
  color: white;
  cursor: pointer;
  text-align: left;
}

.btn:hover:not(:disabled) {
  background: #2563eb;
}

.btn.correct { background: #15803d !important; border-color: #22c55e; }
.btn.incorrect { background: #b91c1c !important; border-color: #ef4444; }

.feedback {
  margin-top: 1rem;
  font-size: 1.2rem;
  font-weight: bold;
}

.action-btn {
  margin-top: 1.5rem;
  background: #ffcc00;
  color: #000;
  font-weight: bold;
  text-align: center;
  border: none;
}

.action-btn:hover {
  background: #e6b800;
}