body {
  background: radial-gradient(#1a1a1a, #0d0d0d);
  color: #fdfdfd;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  margin: 0;
  padding: 2em;
  overflow: hidden;
}

h1 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
  color: #00ffff;
  text-shadow: 0 0 10px #00ffff66;
}

#menu {
  background-color: #222;
  padding: 2em;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 0 20px #00000088;
  margin-bottom: 2em;
  animation: fadeIn 1s ease-in;
}

#menu p {
  font-size: 1.2em;
  margin-bottom: 0.5em;
}

#songPicker {
  padding: 0.5em;
  font-size: 1em;
  border-radius: 6px;
  border: none;
  margin-bottom: 1em;
  background: #444;
  color: #fff;
}

button {
  padding: 0.75em 1.5em;
  font-size: 1em;
  border: none;
  border-radius: 8px;
  background-color: #00ffff;
  color: #111;
  cursor: pointer;
  box-shadow: 0 4px 10px #00ffff55;
  transition: transform 0.1s, background-color 0.3s;
}

.pressed {
  background-color: #00ccff !important;
  color: white;
  transform: scale(1.05);
  transition: none;
}

#gameUI {
  animation: fadeIn 0.5s ease-in;
}

#score {
  font-size: 1.5em;
  margin-bottom: 1em;
}

#game {
  display: flex;
  justify-content: center;
  margin-top: 1em;
  gap: 10px;
}

.lane {
  width: 100px;
  height: 400px;
  border: 2px solid white;
  position: relative;
  overflow: hidden;
  background: #222;
  z-index: 1;
}

.hitbox {
  position: absolute;
  bottom: 35px;
  left: 0;
  right: 0;
  height: 35px;
  background: rgba(255, 255, 255, 0.3);
  border-top: 1px solid cyan;
  border-bottom: 1px solid cyan;
  z-index: 1;
  color: cyan;
}

.note {
  width: 100%;
  height: 20px;
  background: cyan;
  box-shadow: 0 0 12px #0ff; /* Initial glow */
  transition: box-shadow 0.2s ease;
  position: absolute;
  bottom: 100%;
}

@keyframes drop {
  from { bottom: 100%; }
  to   { bottom: 0; }
}  

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#rockMeterContainer {
  position: absolute;
  right: 20px;
  top: 100px;
  width: 20px;
  height: 300px;
  border: 2px solid white;
  background: #222;
  border-radius: 10px;
  overflow: hidden;
}

#rockMeterBar {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, red, yellow, limegreen);
  transition: height 0.2s ease-in-out;
}

.judgment {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2em;
  color: white;
  opacity: 0.9;
  animation: fadePop 0.8s ease;
  pointer-events: none;
  z-index: 3;
}

@keyframes fadePop {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -80%) scale(1.2); opacity: 0; }
}

#winScreen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(to bottom, #00ffff, #0066ff);
  color: #111;
  padding: 2em;
  border-radius: 15px;
  box-shadow: 0 0 20px #00ffff88;
  text-align: center;
  animation: fadeIn 1s ease-in-out;
  z-index: 200;
}

#winScreen h2 {
  font-size: 2em;
  margin-bottom: 0.5em;
}

#winScreen button {
  margin-top: 1em;
  padding: 0.75em 1.5em;
  font-size: 1em;
  border: none;
  border-radius: 8px;
  background-color: #fff;
  color: #0066ff;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#winScreen button:hover {
  transform: scale(1.05);
}

#progressContainer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: #222;
}

#progressBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #f0c, #3ff);
  transition: width 0.1s linear;
}

#timeDisplay {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-family: monospace;
  font-size: 14px;
  color: #ccc;
  user-select: none;
  pointer-events: none;
}

#errorOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #c0392b;
  color: white;
  padding: 10px;
  font-family: monospace;
  font-size: 14px;
  z-index: 1000;
  text-align: center;
  display: none;
}

#nowPlayingContainer {
  position: absolute;
  bottom: 70px;
  left: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 40px 70px;
  border-radius: 8px;
  font-size: 2rem;
}

#albumArt {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

#mobileControls {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  text-align: center;
  gap: 30px;
  z-index: 100;
}

.laneButton {
  width: 90px;
  height: 90px;
  font-size: 30px;
  border-radius: 12px;
  background: #444;
  color: cyan;
  border: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);

  /* Text alignment fix */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: normal;
  padding: 0;
}

#backHomeBtn {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 999;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
}

#backHomeBtn:hover {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes shake {
  0% { transform: translate(0px, 0px); }
  25% { transform: translate(-4px, 2px); }
  50% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, 1px); }
  100% { transform: translate(0px, 0px); }
}

.shake {
  animation: shake 0.3s ease;
}

#energy-meter {
  height: 8px;
  background: linear-gradient(to right, crimson, orange, gold);
  transition: width 100ms ease-out;
  border-radius: 4px;
}

#debug-overlay {
  position: absolute;
  top: 50px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: lime;
  font-size: 12px;
  padding: 10px;
  width: 240px;
  border-radius: 6px;
  box-shadow: 0 0 10px lime;
}