/* Base styles */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overscroll-behavior: none;
  font-family: sans-serif;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Mobile controls container */
#mobile-controls {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 10px 20px;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 10;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  width: 90%;
  max-width: 320px;
}

@media (min-width: 768px) {
  #mobile-controls {
    display: none;
  }
}

@media (max-width: 767px) {
  #mobile-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

/* Mobile input field */
#mobile-player-name {
  font-size: 18px;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #000;
}

/* Mobile start button */
#mobile-start-btn {
  font-size: 20px;
  padding: 12px 20px;
  cursor: pointer;
  width: 100%;
  border-radius: 6px;
  background-color: #1c63ff;
  color: white;
  border: none;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: background-color 0.2s ease;
}

#mobile-start-btn:hover {
  background-color: #1551cc;
}

.hidden {
  display: none !important;
}

.dark-overlay {
  background-color: rgba(0, 0, 0, 0.3);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

/* Leaderboard box common */
.leaderboard-box {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.7);
  color: white;
  font-family: Arial, sans-serif;
  pointer-events: none;
  user-select: none;
  z-index: 9;
  display: none;
}

/* Desktop leaderboard box */
@media (min-width: 768px) {
  .leaderboard-box.desktop {
    top: 280px;
    width: 260px;
    height: 260px;
    padding: 12px 16px;
  }
}

/* Mobile leaderboard box */
@media (max-width: 767px) {
  .leaderboard-box.mobile {
    bottom: 280px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 240px;
    padding: 12px 16px;
  }
}
