/* UI Overlay Container */
#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

/* HUD Elements */
.hud-container {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

/* Wet Meter */
.wet-meter-container {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 200px;
}
.wet-meter-label {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.wet-meter-bar-container {
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.wet-meter-bar {
  height: 100%;
  width: 0%;
  background: #4ade80;
  border-radius: 4px;
  transition: width 0.1s linear, background-color 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.3);
}
.wet-meter-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Timer and Score Container */
.stats-container {
  display: flex;
  gap: 16px;
}
.stat-box {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 10px 16px;
  min-width: 100px;
}
.stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-value {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Menu Screens */
.menu-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: auto;
  transition: opacity 0.3s ease;
}
.menu-content {
  text-align: center;
  color: #fff;
}

/* Exit Portal Button */
.exit-portal-button {
  display: inline-block;
  margin: 20px 0;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  animation: portal-pulse 2s ease-in-out infinite;
}
.exit-portal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}
.exit-portal-button:active {
  transform: translateY(0);
}

@keyframes portal-pulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.7); }
}
.menu-title {
  font-size: 68px;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 3px 6px rgba(0,0,0,0.8);
  background: linear-gradient(135deg, #fff 0%, #b8b8b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.menu-subtitle {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}
.menu-tagline {
  font-size: 18px;
  color: #4ade80;
  font-weight: 600;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.menu-instructions {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin: 16px 0;
  line-height: 1.6;
}
.menu-instructions p {
  margin: 6px 0;
}
.menu-hint {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 24px;
  animation: pulse 2s ease-in-out infinite;
}
.game-over-score {
  font-size: 36px;
  font-weight: 700;
  color: #fbbf24;
  margin: 20px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hud-container {
    top: 10px;
    left: 10px;
    gap: 8px;
  }
  .wet-meter-container {
    min-width: 150px;
    padding: 8px 12px;
  }
  .wet-meter-label {
    font-size: 12px;
  }
  .wet-meter-bar-container {
    height: 16px;
  }
  .stat-box {
    min-width: 80px;
    padding: 8px 12px;
  }
  .stat-value {
    font-size: 20px;
  }
  .menu-title {
    font-size: 36px;
  }
  .menu-subtitle {
    font-size: 16px;
  }
}

/* Notification */
.notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 100;
  pointer-events: none;
}
.notification.show {
  opacity: 1;
}
.notification.shelter {
  background: rgba(34, 197, 94, 0.9);
}
.notification.hit {
  background: rgba(239, 68, 68, 0.9);
}

/* Mute Button */
.mute-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s;
  pointer-events: auto;
  z-index: 100;
}
.mute-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}
.mute-btn:active {
  transform: scale(0.95);
}

/* Menu Logo */
.menu-logo {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
}
.logo-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.logo-regolo-img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}
