:root {
  --bg: #060608;
  --accent: #e5b103;
  --accent2: #ffd700;
  --gold: #e5b103;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: var(--bg);
}

#overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(54, 249, 246, 0.12), transparent 60%),
    rgba(5, 6, 10, 0.92);
  z-index: 10;
  transition: opacity 0.35s ease;
}

#overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.card {
  text-align: center;
  padding: 2.5rem 2rem;
  max-width: 540px;
}

h1 {
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: clamp(3rem, 9vw, 5.2rem);
  margin: 0 0 0.4rem;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  margin: 0 0 1.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
}

.games {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}

.game-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
}
.game-chip .emoji { font-size: 1.1em; }
.game-chip.active {
  background: rgba(54, 249, 246, 0.14);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

button {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s;
}
button:disabled { opacity: 0.5; cursor: wait; }
button:not(:disabled):hover { transform: translateY(-2px); }

.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #060608;
  box-shadow: 0 8px 30px rgba(229, 177, 3, 0.35);
}

.ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.status {
  margin: 1.2rem 0 0;
  min-height: 1.2em;
  color: var(--accent);
  font-size: 0.95rem;
}

.hint {
  margin-top: 1.6rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  line-height: 1.7;
}

kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 0.1em 0.5em;
  font-family: ui-monospace, monospace;
  font-size: 0.8em;
}

/* ===== HUD del juego 3D (overlay sobre el canvas WebGL) ===== */
.hud3d {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  font-family: "Barlow Condensed", system-ui, sans-serif;
}
.hud3d-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}
.hud3d-stat { text-align: center; }
.hud3d-stat b {
  display: block;
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: 2.6rem;
  line-height: 1;
  color: #8aff80;
}
.hud3d-stat span { font-size: 0.8rem; letter-spacing: 0.1em; color: rgba(255,255,255,0.6); }
.hud3d-title {
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  color: #e5b103;
}
.hud3d-banner {
  position: absolute;
  top: 20%; left: 0; right: 0;
  transform: translateY(-50%);
  text-align: center;
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: clamp(2.5rem, 8vw, 6rem);
  letter-spacing: 0.02em;
  text-shadow: 0 4px 24px rgba(0,0,0,0.7);
  transition: opacity 0.2s;
}
.hud3d-hint {
  position: absolute;
  bottom: 1.2rem; left: 0; right: 0;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
}
.hud3d-hint kbd {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 5px;
  padding: 0.05em 0.4em;
}
.hud3d-flash {
  position: absolute;
  inset: 0;
  background: #e5b103;
  opacity: 0;
  pointer-events: none;
}

/* contador de tanda (5 penales) */
.hud3d-round { position: absolute; top: 4.6rem; left: 0; right: 0; text-align: center; }
.hud3d-round > span {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.7); font-size: 1rem;
}
.hud3d-dots { display: flex; gap: 0.55rem; justify-content: center; margin-top: 0.4rem; }
.hud3d-dots .dot {
  width: 15px; height: 15px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: 1.5px solid rgba(255,255,255,0.28);
}
.hud3d-dots .dot.goal { background: #8aff80; border-color: #8aff80; box-shadow: 0 0 8px rgba(138,255,128,0.6); }
.hud3d-dots .dot.save { background: #36f9f6; border-color: #36f9f6; box-shadow: 0 0 8px rgba(54,249,246,0.6); }
