/* ================================================
   EL ARCADE — mini-juego "Derriba el deadline"
   (usa los tokens globales de styles.css)
   ================================================ */

body.game-page {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.game-arena {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--dark);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7rem 1.5rem 2rem;
}

/* Mismo lenguaje que .proy-hero-orb / .contact-orb: degradado rojo que se
   funde a transparente, no un círculo sólido — para que todas las secciones
   tipo "hero" con orbes decorativos se vean parte del mismo sistema. */
.game-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.game-orb--1 {
  width: 420px;
  height: 420px;
  top: -160px;
  left: -140px;
  background: radial-gradient(circle at 45% 45%, rgba(228, 28, 55, 0.8) 0%, rgba(180, 10, 40, 0.4) 40%, transparent 70%);
  filter: blur(55px);
}

.game-orb--2 {
  width: 380px;
  height: 380px;
  bottom: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(210, 20, 50, 0.6) 0%, rgba(140, 5, 30, 0.3) 45%, transparent 70%);
  filter: blur(75px);
}

.game-eyebrow {
  position: relative;
  z-index: 2;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.game-title {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  color: var(--white);
  letter-spacing: -0.04em;
  text-align: center;
  margin-bottom: 0.6rem;
}

.game-sub {
  position: relative;
  z-index: 2;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  max-width: 42ch;
  margin: 0 auto 1.75rem;
  line-height: 1.5;
}

.game-hud {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.5rem 1.1rem;
  border-radius: 2rem;
  margin-bottom: 2.5rem;
}

.game-hud-sep {
  opacity: 0.4;
}

.game-target-row {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(10px, 3.2vw, 30px);
  margin-bottom: auto;
}

.game-letter {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 6.5vw, 4.2rem);
  color: var(--white);
  line-height: 1;
  user-select: none;
  will-change: transform, opacity;
}

.game-letter.is-hit {
  color: var(--red);
}

.game-launcher {
  position: relative;
  z-index: 3;
  margin-top: 2rem;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.game-hint {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  transition: opacity 0.4s ease;
}

.game-hint.is-hidden {
  opacity: 0;
}

.game-ball {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--red);
  box-shadow:
    0 14px 30px rgba(228, 28, 55, 0.4),
    inset -6px -6px 14px rgba(0, 0, 0, 0.25),
    inset 6px 6px 14px rgba(255, 255, 255, 0.25);
  cursor: grab;
  touch-action: none;
  will-change: transform, opacity;
}

.game-ball:active {
  cursor: grabbing;
}

/* ── Overlay de victoria ─────────────────────────────────────────────────── */
.game-win {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 0, 8, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

.game-win.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.game-win-inner {
  text-align: center;
  padding: 2.5rem;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.5s var(--ease-out);
}

.game-win.is-visible .game-win-inner {
  transform: translateY(0) scale(1);
}

.game-win-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--white);
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.game-win-sub {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 40ch;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.game-win-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.game-btn {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.8rem;
  border-radius: 2rem;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), background 0.3s ease, border-color 0.3s ease;
}

.game-btn--primary {
  background: var(--red);
  color: var(--white);
}

.game-btn--primary:hover {
  transform: translateY(-2px);
  background: var(--red-dark);
}

.game-btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
}

.game-btn--ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 640px) {
  .game-arena {
    padding: 6rem 1.25rem 1.5rem;
  }

  .game-sub {
    font-size: 0.82rem;
  }

  .game-hud {
    margin-bottom: 1.5rem;
  }

  .game-letter {
    font-size: clamp(1.7rem, 6.5vw, 2.6rem);
  }

  .game-target-row {
    gap: 7px;
  }

  .game-ball {
    width: 52px;
    height: 52px;
  }

  .game-win-inner {
    padding: 1.5rem;
  }
}
