* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

html, body {
  overflow: hidden;
  background: #000;
  font-family: 'Courier New', monospace;
  width: 100%;
  height: 100%;
  position: fixed;
  touch-action: none;
}

canvas { display: block; }

/* ========== BLOCKER / MENÚ ========== */
#blocker {
  position: fixed;
  inset: 0;
  /* Fondo casi transparente para ver el 3D */
  background: radial-gradient(circle at center, rgba(10,15,10,0.4), rgba(5,5,8,0.8));
  backdrop-filter: blur(3px); /* Desenfoque elegante */
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  flex-direction: column;
  padding: 24px;
}

#blocker .logo {
  color: #bbb;
  font-size: clamp(2rem, 8vw, 3.2rem);
  letter-spacing: 0.25em;
  text-shadow: 0 0 30px #444, 0 0 60px #222;
  margin-bottom: 8px;
  animation: pulse 3s ease-in-out infinite;
}

#blocker .tagline {
  color: #555;
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 12px;
  text-align: center;
}

#blocker .mode-tag {
  color: #6a9;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  border: 1px solid #6a9;
  padding: 5px 14px;
  border-radius: 3px;
  margin-bottom: 36px;
}

#blocker .menu-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(280px, 80vw);
}

.ui-btn {
  padding: 16px 24px;
  background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
  border: 2px solid #555;
  color: #ccc;
  font-size: 1.1rem;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.2em;
  border-radius: 3px;
  transition: all 0.2s;
  text-align: center;
}

.ui-btn:hover, .ui-btn:active {
  border-color: #aaa;
  color: #fff;
  text-shadow: 0 0 10px #888;
  box-shadow: 0 0 20px rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.ui-btn.primary {
  border-color: #777;
  color: #eee;
}

.ui-btn.ghost {
  background: transparent;
  border-color: #333;
  color: #666;
  font-size: 0.95rem;
}

#blocker .footer {
  position: absolute;
  bottom: 20px;
  color: #333;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

@keyframes pulse {
  0%, 100% { text-shadow: 0 0 30px #444, 0 0 60px #222; }
  50% { text-shadow: 0 0 40px #666, 0 0 80px #333; }
}

/* ========== HUD ========== */
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

#crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.55);
  font-size: 22px;
  z-index: 51;
  text-shadow: 0 0 4px #000;
}

#stamina-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 5px;
  background: rgba(0,0,0,0.4);
  z-index: 51;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.12);
}

#stamina-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #777, #ccc);
  border-radius: 3px;
  transition: width 0.1s;
}

#warning {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 49;
  transition: all 0.3s;
}

#subtitle {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.95rem;
  z-index: 51;
  text-align: center;
  opacity: 0;
  transition: opacity 0.8s;
  text-shadow: 0 0 8px #000;
  font-style: italic;
  max-width: 80vw;
}

/* ========== GAME OVER ========== */
#gameover {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  flex-direction: column;
  gap: 12px;
}

#gameover .go-title {
  color: #777;
  font-size: clamp(2.5rem, 10vw, 4rem);
  letter-spacing: 0.3em;
  animation: flicker 0.12s infinite;
}

#gameover .go-sub {
  color: #444;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* ========== PAUSA ========== */
#pause-menu {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
  flex-direction: column;
  gap: 14px;
}

#pause-menu .pause-title {
  color: #888;
  font-size: 2rem;
  letter-spacing: 0.3em;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  #stamina-bar { bottom: 14px; width: 140px; }
  #blocker .footer { font-size: 0.65rem; }
}
