html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(180deg, #a8bfd6 0%, #d6e3ec 55%, #c0cfde 100%);
}

body {
  color: white;
}

#app,
#scene-root {
  width: 100%;
  height: 100%;
}

#scene-root canvas {
  display: block;
}

.hud {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 4;
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.energy-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.energy-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
  color: #c0ff8d;
  background: rgba(16, 38, 29, 0.78);
  border: 2px solid rgba(140, 255, 103, 0.55);
  box-shadow:
    0 0 20px rgba(117, 255, 96, 0.28),
    inset 0 0 16px rgba(117, 255, 96, 0.16);
}

.energy-track {
  width: 162px;
  height: 30px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(10, 28, 32, 0.72);
  border: 2px solid rgba(144, 255, 113, 0.38);
  box-shadow: 0 0 18px rgba(103, 255, 88, 0.22);
}

.energy-fill {
  width: 86%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #7cff56, #d8ff61);
  box-shadow: 0 0 16px rgba(163, 255, 84, 0.42);
}

.stat-stack {
  display: grid;
  gap: 6px;
  margin-left: 8px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}

.stat-line {
  font-weight: 900;
  font-size: 24px;
}

.stat-coins {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffdd58;
}

.coin-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  color: #6a4a00;
  background: radial-gradient(circle at 30% 30%, #fff8be, #ffbb1b);
  box-shadow: 0 6px 14px rgba(255, 184, 31, 0.36);
}

.bonus-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  color: white;
  background: linear-gradient(180deg, rgba(52, 60, 80, 0.84), rgba(20, 23, 34, 0.94));
  border: 2px solid rgba(255,255,255,0.24);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  gap: 2px;
}

.bonus-icon {
  font-size: 30px;
  line-height: 1;
}

.bonus-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hint-panel {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 4;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(13, 24, 43, 0.58);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
  color: #d7e9ff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  gap: 4px;
  backdrop-filter: blur(8px);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  background: rgba(7, 14, 23, 0.28);
  backdrop-filter: blur(8px);
}

.overlay.visible {
  display: block;
}

.overlay-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(86vw, 420px);
  padding: 26px 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.92), rgba(216, 231, 241, 0.9));
  box-shadow: 0 30px 60px rgba(10, 21, 34, 0.34);
  text-align: center;
  color: #20314d;
}

.overlay-card h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 900;
}

.overlay-card p {
  margin: 10px 0 0;
}

.overlay-button {
  margin-top: 20px;
  min-width: 200px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: linear-gradient(90deg, #54ebff, #8f7bff);
  color: #07233d;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(84, 235, 255, 0.24);
}

@media (max-width: 700px) {
  .hud {
    top: 12px;
    left: 12px;
  }

  .hint-panel {
    right: 12px;
    top: 12px;
  }

  .energy-icon {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .energy-track {
    width: 136px;
    height: 24px;
  }

  .stat-line {
    font-size: 20px;
  }

  .bonus-button {
    right: 12px;
    bottom: 12px;
    width: 84px;
    height: 84px;
  }
}
