* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scene {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

#lily {
  position: absolute;
  left: 38%;
  top: 45%;
  height: 22%;
  width: auto;
  transform: translate(-50%, -50%);
  user-select: none;
  -webkit-user-drag: none;
  z-index: 2;
}

.egg {
  position: absolute;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.egg img {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.egg .egg-progress {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 6px;
  border-radius: 8px;
  white-space: nowrap;
}

#fried-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.4s ease;
}

#fried-flash.show {
  opacity: 1;
}

#fried-flash img {
  width: 100%;
  height: 100%;
}

#hud {
  position: absolute;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 5;
}

#inventory {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px;
  border-radius: 10px;
}

#inventory .slot {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px dashed rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

#inventory .slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#serve-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #2a9d3f;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: none;
}

#serve-btn.active {
  display: inline-block;
}

#topbar {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
  display: flex;
  gap: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#client-timer {
  color: #ffce3d;
}

#gameover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

#gameover.show {
  display: flex;
}

#gameover-box {
  background: #222;
  padding: 24px 32px;
  border-radius: 12px;
  text-align: center;
  color: #fff;
}

#gameover-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 8px;
}

#gameover-score {
  font-size: 15px;
  margin-bottom: 16px;
  opacity: 0.85;
}

#restart-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: #2a9d3f;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}
