/* -------------------------------------------------------
   ROOT + GLOBAL
------------------------------------------------------- */
:root {
  --bg: #020617;
  --panel: #071427;
  --accent: #06b6d4;
  --accent2: #7c3aed;
  --muted: #9fb0c4;
  --hud-bg: rgba(0,0,0,0.28);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;

  /* Prevent zoom / pinch-zoom on mobile */
  touch-action: none;
}

/* -------------------------------------------------------
   BACKGROUND VIDEO
------------------------------------------------------- */
.bg-video {
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(180deg, #001722, #00101a);
}

.bg-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.52) saturate(1.05);
}

/* -------------------------------------------------------
   GAME ROOT / CANVAS
------------------------------------------------------- */
#game-root {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  background: transparent;
}

/* -------------------------------------------------------
   HUD (score, combo, level, SP)
------------------------------------------------------- */
.hud {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
  z-index: 40;
}

.pill {
  background: var(--hud-bg);
  backdrop-filter: blur(6px);
  padding: 8px 14px;
  border-radius: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.icon-emoji {
  font-size: 18px;
}

/* -------------------------------------------------------
   WALLET HUD STATUS
   #hudWalletState {
  position:absolute;
  right:12px;
  top:12px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(0,0,0,0.4);
  color:#e6f3fb;
  font-weight:700;
  z-index:55;
}

.dot-red { width:10px; height:10px; border-radius:50%; background:#ff4444; }
.dot-green { width:10px; height:10px; border-radius:50%; background:#44ff66; }

------------------------------------------------------- */


/* -------------------------------------------------------
   BOOST BUTTONS
------------------------------------------------------- */
.boosts {
  position: absolute;
  right: 12px;
  bottom: 110px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 40;
}

.boost-btn {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  border: 0;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  touch-action: manipulation;
}

/* -------------------------------------------------------
   PAUSE BUTTON
------------------------------------------------------- */
.controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 40;
}

.control-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #021;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

/* -------------------------------------------------------
   MOBILE MENU (Telegram style)
------------------------------------------------------- */
#mobileMenu {
  position: fixed;
  bottom: env(safe-area-inset-bottom, 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  display: flex;
  padding: 10px 6px 14px;
  justify-content: space-around;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  border-radius: 20px 20px 0 0;
  z-index: 200;
}

.menu-btn {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  touch-action: manipulation;
}

.m-icon {
  font-size: 26px;
}

.m-label {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 3px;
  font-weight: 600;
}

/* -------------------------------------------------------
   PANELS (Store, Tasks, Profile, Pause, Achievements)
------------------------------------------------------- */
.panel {
  position: absolute;
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 480px;
  background: rgba(6,10,15,0.72);
  padding: 16px;
  border-radius: 14px;
  z-index: 300;
  color: #fff;
  backdrop-filter: blur(10px);
  display: none;
  max-height: 75vh;
  overflow-y: auto;
}

.panel.visible {
  display: block;
}

.panel h2 {
  margin: 0 0 12px 0;
  font-size: 22px;
  text-align: center;
}

.panel button.btn {
  margin-top: 12px;
  width: 100%;
}

/* -------------------------------------------------------
   STORE ITEMS
------------------------------------------------------- */
.store-item {
  background: rgba(255,255,255,0.06);
  padding: 10px;
  margin: 8px 0;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.store-item button {
  padding: 4px 10px;
}

/* -------------------------------------------------------
   ACHIEVEMENTS
------------------------------------------------------- */
.achRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 18px;
}

.achIcon { font-size: 24px; }
.achName { font-weight: 700; }

.achDesc {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 32px;
  margin-top: 2px;
}

/* -------------------------------------------------------
   BUTTONS
------------------------------------------------------- */
.btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  background: var(--accent);
  color: #021;
  touch-action: manipulation;
}

/* -------------------------------------------------------
   MEDIA QUERIES
------------------------------------------------------- */
@media (max-width: 480px) {
  .pill { padding: 6px 10px; font-size: 14px; }
  .boost-btn { width: 48px; height: 48px; font-size: 22px; }
  .m-icon { font-size: 24px; }
}
