body {
  margin: 0;
  background: #74b9ff;
  font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
  color: white;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
#gameContainer {
  max-width: 1200px;
  margin: 18px auto;
  position: relative;
  padding: 10px;
}

/* Canvas (we scale via CSS for responsiveness) */
canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  /* keeps 1200x400 proportion */
  border-radius: 10px;
  /* replaced repeating image with subtle vertical gradient */
  background: linear-gradient(180deg, #eaf6ff 0%, #bfe6ff 45%, #74b9ff 100%);
  display: block;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* HUD */
#hud {
  background: rgba(0, 0, 0, .6);
  padding: 10px 12px;
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 8;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
  transition: transform .18s ease, opacity .18s ease;
}

/* Panels & overlays */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 30, .9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10;
  padding: 16px;
}

.overlay.active {
  display: flex
}

.panel,
.card {
  background: rgba(255, 255, 255, .08);
  padding: 18px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
  color: #fff;
  width: min(560px, 92%);
}

/* Inputs + Buttons */
input {
  padding: 12px;
  border-radius: 10px;
  border: none;
  width: 80%;
  box-sizing: border-box;
  margin-top: 8px;
  outline: none;
}

button,
.btn {
  margin-top: 10px;
  background: linear-gradient(180deg, #00cec9, #00b7b0);
  color: #062b2a;
  font-weight: 600;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

/* Admin link */
.adminLink {
  display: inline-block;
  margin-top: 10px;
  color: #ffd2a8;
}

/* Leaderboard entries */
#leaderboard>div {
  margin: 6px 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

/* hover effect for leaderboard entries (only this was added) */
#leaderboard>div:hover {
  transform: translateX(8px);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

/* Touch control (single button) */
.touch-pad {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff7675, #d63031);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  z-index: 12;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  touch-action: none;
  user-select: none;
  transition: transform .06s ease, box-shadow .12s ease, opacity .12s ease;
}

.touch-pad:active,
.touch-pad.holding {
  transform: translateX(-50%) scale(0.98);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
  opacity: 0.98;
}

/* show smaller on large screens (we only show on small devices) */
@media (min-width: 800px) {
  .touch-pad {
    display: none;
  }
}

/* hide original controls area if present */
.controls {
  display: none !important;
}

/* responsive tweaks */
@media (max-width: 600px) {
  #hud {
    font-size: 0.9rem;
    gap: 8px;
    padding: 8px 10px;
    top: 8px;
    left: 8px;
  }

  .panel {
    padding: 14px;
    border-radius: 12px;
  }

  .touch-pad {
    width: 86px;
    height: 86px;
    bottom: 18px;
  }
}

/* admin page tweaks */
.admin .overlay {
  align-items: flex-start;
  padding-top: 30px;
}

/* Footer (minimal rule; optional: paste footer HTML into your pages) */
.site-footer {
  margin-top: 12px;
  padding: 8px 10px;
  text-align: center;
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}