@font-face {
  font-family: 'Comic Sans MS';
  src: url('../Comic-Sans-MS.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

body {
  font-family: 'Comic Sans MS', sans-serif, bold;
  font-weight: bold;
  text-align: center;
  background-color: #ffff00; /* Fallback color */
  margin: 0;
  overflow: hidden;
  font-size: 3.5rem;
  color: #00d0ff;
  text-shadow: 3px 3px 0px #000000;
  cursor: auto;
}

/* --- THE SPINNING SUNBURST (same as Whack A Meme) --- */
body::before {
  content: "";
  position: fixed;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background-image: repeating-conic-gradient(
    #ff00d4 0deg 15deg,
    #ff0040 15deg 30deg
  );
  z-index: -1;
  transform: scale(1.5);
  animation: sunburst-spin 30s linear infinite;
  transform-origin: center;
}

@keyframes sunburst-spin {
  from { transform: rotate(0deg) scale(1.5); }
  to { transform: rotate(360deg) scale(1.5); }
}

.hidden {
  display: none !important;
}

/* --- HUB BUTTON --- */
#hub-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 2000;
  font-family: 'Comic Sans MS', sans-serif, bold;
  background-color: #ff7b00;
  color: white;
  padding: 10px 20px;
  border: 4px solid #333;
  border-radius: 12px;
  text-decoration: none;
  text-shadow: 2px 2px 0px #000000;
  font-size: 1.2rem;
  font-weight: bold;
  transition: transform 0.1s;
}

#hub-btn:hover {
  transform: scale(1.1);
  background-color: #00ff00;
}

/* --- CREATOR LINK --- */
#creator-link {
  position: fixed;
  bottom: 10px;
  right: 10px;
  text-align: center;
  text-decoration: none;
  font-family: 'Comic Sans MS', sans-serif, bold;
  font-weight: bold;
  font-size: 2rem;
  color: #00d0ff;
  z-index: 1001;
  transition: transform 0.2s;
}

#creator-link:hover {
  transform: scale(1.1);
  color: #00ff88;
}

/* --- MAIN TITLE (only shows during active game) --- */
#main-title {
  display: none;
  font-size: 3rem;
  margin-top: 20px;
}

body.game-active #main-title {
  display: block;
}

/* --- START SCREEN --- */
#start-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 1000;
}

.menu-title {
  font-size: 4rem;
  margin: 0;
}

.menu-sub {
  font-size: 1.6rem;
  margin: 0;
}

/* --- GENERIC BUTTONS --- */
button {
  background-color: #0062ff;
  color: white;
  font-family: 'Comic Sans MS', sans-serif, bold;
  font-size: 24px;
  font-weight: bold;
  padding: 15px 30px;
  border: 4px solid #333;
  border-radius: 15px;
  cursor: pointer;
  transition: transform 0.1s;
}

button:hover {
  transform: scale(1.1);
}

/* --- GAME SCREEN / HUD --- */
#game-screen {
  padding-top: 20px;
}

#hud {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

#scoreboard,
#mistakes,
#time-left {
  background: white;
  padding: 10px 20px;
  border-radius: 50px;
  border: 4px solid #333;
}

#timer-bar-track {
  width: 300px;
  height: 20px;
  background: white;
  border: 4px solid #333;
  border-radius: 20px;
  overflow: hidden;
}

#timer-bar {
  height: 100%;
  width: 100%;
  background: #00ff00;
  transition: width 1s linear, background-color 0.3s ease;
}

#timer-bar.warning {
  background: #ff8c00;
}

#timer-bar.danger {
  background: #ff0000;
}

/* --- QUIZ CONTAINER / QUESTION CARD --- */
#quiz-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 20px;
}

.question {
  background: white;
  border: 6px solid #333;
  border-radius: 25px;
  padding: 30px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.35);
}

.question-image {
  max-width: 260px;
  max-height: 260px;
  object-fit: contain;
  border: 4px solid #333;
  border-radius: 15px;
  background: #f4f4f4;
  margin-bottom: 15px;
}

.question-prompt {
  font-size: 1.8rem;
  margin: 10px 0 25px;
}

/* --- MULTIPLE CHOICE --- */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.option {
  font-size: 1.2rem;
  padding: 18px 10px;
  background-color: #00bfff;
}

.option:hover {
  transform: scale(1.05);
}

.option.correct-flash {
  background-color: #00ff00 !important;
}

.option.wrong-flash {
  background-color: #ff0000 !important;
}

.option:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

/* --- TYPING --- */
.typing-input {
  font-family: 'Comic Sans MS', sans-serif, bold;
  font-size: 1.4rem;
  font-weight: bold;
  padding: 12px 18px;
  border: 4px solid #333;
  border-radius: 12px;
  width: 70%;
  max-width: 400px;
  text-align: center;
  display: block;
  margin: 0 auto 20px;
}

.typing-input.wrong-flash {
  background-color: #ffcccc;
}

.typing-input.correct-flash {
  background-color: #ccffcc;
}

/* --- DRAG & DROP --- */
.drag-area {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.drag-items,
.drop-zones {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.drag-item {
  width: 100px;
  height: 100px;
  object-fit: contain;
  background: #f4f4f4;
  border: 4px solid #333;
  border-radius: 15px;
  padding: 8px;
  cursor: grab;
  margin: 0 auto;
  transition: opacity 0.2s;
}

.drag-item.placed {
  opacity: 0.25;
  pointer-events: none;
}

.drag-item.dragging {
  opacity: 0.4;
}

.drop-zone {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: #f4f4f4;
  border: 4px dashed #333;
  border-radius: 15px;
  padding: 10px;
}

.drop-zone.drag-over {
  background: #fff3b0;
}

.drop-zone.correct-flash {
  background: #ccffcc;
  border-style: solid;
}

.drop-zone.wrong-flash {
  background: #ffcccc;
}

.drop-zone.filled img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* --- END SCREEN --- */
#end-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  z-index: 1000;
  font-size: 2.2rem;
}

#end-screen p {
  font-size: 1.6rem;
  margin: 0;
}