:root {
  --bg-dark: #07010e;
  --bg-gradient: radial-gradient(circle at center, #1b072e 0%, #030007 100%);
  --neon-pink: #ff007f;
  --neon-cyan: #00f0ff;
  --neon-purple: #9d00ff;
  --text-primary: #ffffff;
  --text-secondary: #c2b5d4;
  --border-color: rgba(255, 255, 255, 0.08);
  --font-family: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-container {
  width: 100%;
  height: 100%;
  background: var(--bg-gradient);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.game-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
  display: flex;
  flex-direction: column;
}

.game-screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* 1. Main Menu Layout */
#screen-menu {
  justify-content: space-around;
  align-items: center;
  padding: 40px 20px;
}

.menu-hero {
  text-align: center;
}

.game-title {
  font-size: 48px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -2px;
  text-shadow: 0 0 10px rgba(255,0,127,0.6);
  color: #fff;
}

.highlight-neon {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0,240,255,0.6);
}

.menu-bottle-art {
  font-size: 80px;
  margin-top: 15px;
  filter: drop-shadow(0 0 15px var(--neon-purple));
  animation: float-bottle 3s infinite ease-in-out;
}

.menu-actions {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 280px;
  gap: 16px;
}

.menu-btn {
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 14px 20px;
  border-radius: 30px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  text-align: center;
}

.primary-neon-btn {
  background: none;
  border: 2px solid var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 10px var(--neon-pink);
}

.primary-neon-btn:active {
  transform: scale(0.96);
  background: var(--neon-pink);
  box-shadow: 0 0 20px var(--neon-pink);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.secondary-btn:active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.menu-stats {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}

.menu-stats strong {
  color: #fff;
}

/* 2. Play screen HUD */
.play-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  z-index: 10;
}

.hud-back-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hud-back-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

.hud-metrics {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  display: flex;
  gap: 16px;
}

.hud-metrics strong {
  color: var(--neon-cyan);
}

/* Physics Canvas container scale fit */
.canvas-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

#game-canvas {
  background: rgba(7, 1, 14, 0.5);
  border: 2px solid var(--neon-purple);
  border-radius: 20px;
  box-shadow: 0 0 15px rgba(157,0,255,0.25);
  max-width: 100%;
  aspect-ratio: 36 / 42;
}

/* Input Charger */
.charge-control-area {
  padding: 16px 24px 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.charge-instructions {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--neon-cyan);
  text-shadow: 0 0 5px var(--neon-cyan);
}

.charge-bar-container {
  width: 100%;
  max-width: 300px;
  height: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  border-radius: 7px;
  overflow: hidden;
}

.charge-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
  box-shadow: 0 0 8px var(--neon-pink);
  transition: width 0.05s linear;
}

/* 3. Shop list items */
.shop-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.shop-balance {
  font-size: 16px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.shop-grid {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.shop-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
}

.shop-card.equipped {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0,240,255,0.15);
}

.shop-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  background: var(--neon-cyan);
  color: #000;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 700;
}

.shop-card-emoji {
  font-size: 48px;
}

.shop-card-title {
  font-size: 13px;
  font-weight: 700;
}

.shop-card-cost {
  font-size: 11px;
  color: var(--neon-cyan);
  font-weight: 700;
}

/* Overlays */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7,1,14,0.85);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.gameover-card {
  width: 85%;
  max-width: 320px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 0 30px rgba(157,0,255,0.2);
}

.gameover-card h2 {
  font-size: 28px;
  color: var(--neon-pink);
  text-shadow: 0 0 8px var(--neon-pink);
  margin-bottom: 8px;
}

.gameover-card p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.go-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 24px;
}

.go-stat-item {
  display: flex;
  flex-direction: column;
}

.go-stat-item span {
  font-size: 11px;
  color: var(--text-secondary);
}

.go-stat-item strong {
  font-size: 20px;
  color: #fff;
}

.go-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Animations */
@keyframes float-bottle {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
