* {
  box-sizing: border-box;
  font-family: "Comic Sans MS", "Poppins", sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(#87ceeb, #e0f7ff);
  overflow: hidden;
}

h1, .info, #modeLabel {
  text-align: center;
  margin: 4px 0;
}

h1 {
  font-size: 1.5rem;
}

.info {
  font-size: 0.9rem;
  color: #333;
}

#modeLabel {
  font-size: 0.9rem;
}

/* Game canvas */
#game-container canvas {
  border: 3px solid #333;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  background: linear-gradient(#87ceeb, #a0e9ff);
  display: block;
  margin: 0 auto;
}

/* Restart button */
#restartBtn {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffcc00;
  border: 3px solid #333;
  border-radius: 12px;
  font-size: 20px;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 999;
}

/* Math mode toggle */
.toggle-btn {
  display: inline-block;
  background: #fff;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.toggle-btn.on {
  background: #b2ff9e;
}



/* --- Touch / On-screen Controls --- */
.touch-controls {
  position: fixed;
  bottom: 4vh;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 5vw;
  pointer-events: none;
  z-index: 9999;
}

.touch-btn {
  width: 12vw;
  height: 12vw;
  max-width: 100px;
  max-height: 100px;
  min-width: 60px;
  min-height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6vw;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  user-select: none;
  transition: opacity 0.2s ease;
}
.touch-btn:active {
  opacity: 0.6;
}

@media (orientation: landscape) {
  .touch-controls {
    bottom: 3vh;
    padding: 0 10vw;
  }
  .touch-btn {
    width: 8vw;
    height: 8vw;
    font-size: 4vw;
  }
}










.touch-zone {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 60%;                /* left 60% of screen */
  height: 35%;               /* lower portion only */
  background: rgba(0,0,0,0); /* invisible touch zone */
  z-index: 10;
}

.jump-btn {
  position: fixed;
  bottom: 5%;
  right: 6%;
  width: 80px;
  height: 80px;
  font-size: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 3px solid rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  z-index: 11;
}
@media (max-width: 768px) {
  .jump-btn {
    width: 100px; height: 100px;
    font-size: 56px;
  }
}

