@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Fredoka+One&family=Nunito:wght@400;700;900&display=swap');

.efp-game-root {
  --efp-amarillo: #FFD700;
  --efp-rojo:     #FF3B3B;
  --efp-azul:     #1A73E8;
  --efp-verde:    #00C851;
  --efp-naranja:  #FF6B00;
  --efp-morado:   #8B2FC9;
  --efp-rosa:     #FF69B4;
  --efp-fondo:    #0A0A1A;
  --efp-panel:    #12122A;

  background: var(--efp-fondo);
  font-family: 'Nunito', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 16px;
  overflow: hidden;
  padding-bottom: 16px;
  position: relative;
}

/* Stars bg */
.efp-game-root::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1px 1px at 10% 20%, rgba(255,215,0,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 70%, rgba(255,105,180,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 40%, rgba(26,115,232,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 80%, rgba(0,200,81,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 50% 10%, rgba(255,215,0,0.2) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Header */
.efp-header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 18px 20px 8px;
  width: 100%;
}

.efp-logo {
  font-family: 'Bangers', cursive;
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 4px;
  color: var(--efp-amarillo);
  text-shadow:
    3px 3px 0 var(--efp-naranja),
    6px 6px 0 rgba(255,107,0,0.3),
    0 0 30px rgba(255,215,0,0.5);
  line-height: 1;
}
.efp-logo span { color: var(--efp-rojo); }

.efp-tagline {
  font-family: 'Fredoka One', cursive;
  color: #fff;
  font-size: clamp(0.65rem, 2vw, 0.9rem);
  opacity: 0.8;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* HUD */
.efp-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(560px, 96%);
  padding: 8px 16px;
  background: var(--efp-panel);
  border-radius: 12px;
  border: 2px solid rgba(255,215,0,0.3);
  margin: 8px auto;
  position: relative;
  z-index: 10;
}
.efp-hud-item { text-align: center; }
.efp-hud-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
}
.efp-hud-value {
  font-family: 'Bangers', cursive;
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: var(--efp-amarillo);
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
  line-height: 1.1;
}
.efp-lives-display {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 2px;
}
.efp-life-dot {
  width: 14px;
  height: 14px;
  background: var(--efp-amarillo);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255,215,0,0.6);
  clip-path: polygon(15% 0%, 100% 50%, 15% 100%, 0% 75%, 35% 50%, 0% 25%);
}

/* Canvas wrapper */
.efp-game-wrapper {
  position: relative;
  z-index: 10;
}
.efp-game-wrapper canvas {
  display: block;
  border: 3px solid rgba(255,215,0,0.4);
  border-radius: 12px;
  box-shadow:
    0 0 40px rgba(255,215,0,0.15),
    0 0 80px rgba(26,115,232,0.1),
    inset 0 0 30px rgba(0,0,0,0.5);
  image-rendering: pixelated;
}

/* Overlays */
.efp-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,26,0.92);
  border-radius: 10px;
  z-index: 20;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.efp-hidden { display: none !important; }

.efp-overlay h2 {
  font-family: 'Bangers', cursive;
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  letter-spacing: 4px;
  color: var(--efp-amarillo);
  text-shadow: 3px 3px 0 var(--efp-naranja), 0 0 20px rgba(255,215,0,0.5);
  margin-bottom: 10px;
}
.efp-overlay p {
  color: rgba(255,255,255,0.75);
  font-size: clamp(0.72rem, 2.3vw, 0.92rem);
  line-height: 1.6;
  max-width: 300px;
  margin-bottom: 12px;
}
.efp-activity-unlocked {
  background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,107,0,0.1));
  border: 2px solid rgba(255,215,0,0.4);
  border-radius: 10px;
  padding: 10px 16px;
  margin: 6px 0;
  font-family: 'Fredoka One', cursive;
  font-size: clamp(0.82rem, 2.3vw, 0.97rem);
  color: var(--efp-amarillo);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Button */
.efp-btn {
  font-family: 'Bangers', cursive;
  font-size: 1.35rem;
  letter-spacing: 3px;
  padding: 11px 34px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--efp-amarillo), var(--efp-naranja));
  color: #0A0A1A;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(255,215,0,0.4), 0 4px 0 rgba(0,0,0,0.3);
  transition: all 0.15s ease;
  margin-top: 10px;
}
.efp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255,215,0,0.5), 0 6px 0 rgba(0,0,0,0.3);
}
.efp-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 15px rgba(255,215,0,0.3), 0 2px 0 rgba(0,0,0,0.3);
}

/* Controls hint */
.efp-controls-hint {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 7px auto;
  width: min(560px, 96%);
}
.efp-ctrl {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.63rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* D-Pad */
.efp-dpad {
  display: none;
  position: relative;
  z-index: 10;
  margin: 10px auto;
}
.efp-dpad-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.efp-dpad-btn {
  width: 50px;
  height: 50px;
  background: rgba(255,215,0,0.12);
  border: 2px solid rgba(255,215,0,0.3);
  border-radius: 8px;
  font-size: 1.3rem;
  color: var(--efp-amarillo);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s;
}
.efp-dpad-btn:active { background: rgba(255,215,0,0.3); }
.efp-dpad-spacer { width: 50px; height: 50px; }

@media (pointer: coarse) {
  .efp-dpad { display: block; }
  .efp-controls-hint { display: none; }
}

/* Legend */
.efp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 8px 10px;
  max-width: min(560px, 96%);
  position: relative;
  z-index: 10;
}
.efp-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.63rem;
  color: rgba(255,255,255,0.5);
}
.efp-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Score popups */
.efp-score-popup {
  position: fixed;
  font-family: 'Bangers', cursive;
  font-size: 1rem;
  letter-spacing: 2px;
  pointer-events: none;
  animation: efpFloatUp 0.8s ease forwards;
  z-index: 99999;
}
@keyframes efpFloatUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-40px) scale(1.2); }
}
