/* CUATAS landing — mini game (Packet Catch) */
.cuatas-minigame {
  position: relative;
}

.cuatas-minigame .cuatas-game-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.5rem 1.35rem 1.65rem;
  border-radius: 1.25rem;
  background: linear-gradient(
    145deg,
    rgba(30, 31, 36, 0.95) 0%,
    rgba(20, 21, 26, 0.98) 100%
  );
  border: 1px solid rgba(242, 183, 5, 0.22);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cuatas-game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.cuatas-game-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.cuatas-game-stat span:first-child {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(217, 219, 223, 0.55);
}

.cuatas-game-stat strong {
  font-family: "Space Grotesk", "Poppins", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mist);
  line-height: 1.1;
}

.cuatas-game-stat strong.text-gold {
  color: var(--gold);
}

.cuatas-game-timer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(242, 183, 5, 0.1);
  border: 1px solid rgba(242, 183, 5, 0.28);
  font-family: "Space Grotesk", "Poppins", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--amber);
}

.cuatas-game-timer svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.cuatas-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.cuatas-game-cell {
  aspect-ratio: 1;
  border-radius: 0.85rem;
  border: 1px solid rgba(217, 219, 223, 0.12);
  background: rgba(15, 16, 20, 0.65);
  color: rgba(217, 219, 223, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.cuatas-game-cell:hover:not(:disabled) {
  border-color: rgba(242, 183, 5, 0.35);
  background: rgba(242, 183, 5, 0.06);
}

.cuatas-game-cell:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.cuatas-game-cell:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.cuatas-game-cell.is-hot {
  border-color: rgba(242, 183, 5, 0.85);
  background: radial-gradient(
    circle at 35% 30%,
    rgba(245, 208, 97, 0.35),
    rgba(242, 183, 5, 0.18) 45%,
    rgba(15, 16, 20, 0.4) 100%
  );
  color: var(--gold);
  box-shadow:
    0 0 0 1px rgba(242, 183, 5, 0.2),
    0 8px 28px rgba(242, 183, 5, 0.2);
  animation: cuatas-packet-pulse 0.85s ease-in-out infinite;
}

.cuatas-game-cell.is-hot svg {
  filter: drop-shadow(0 0 8px rgba(242, 183, 5, 0.55));
}

.cuatas-game-cell.is-miss {
  animation: cuatas-cell-shake 0.35s ease;
}

@keyframes cuatas-packet-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes cuatas-cell-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cuatas-game-cell.is-hot {
    animation: none;
  }

  .cuatas-game-cell.is-miss {
    animation: none;
  }
}

.cuatas-game-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
}

.cuatas-game-btn {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cuatas-game-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.cuatas-game-btn--primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #111827;
  box-shadow: 0 4px 16px rgba(242, 183, 5, 0.35);
}

.cuatas-game-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(242, 183, 5, 0.42);
}

.cuatas-game-btn--ghost {
  background: transparent;
  color: rgba(217, 219, 223, 0.75);
  border: 1px solid rgba(217, 219, 223, 0.2);
}

.cuatas-game-btn--ghost:hover:not(:disabled) {
  border-color: rgba(242, 183, 5, 0.4);
  color: var(--mist);
}

.cuatas-game-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.cuatas-game-hint {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(217, 219, 223, 0.45);
  margin: 0;
  line-height: 1.45;
}

.cuatas-game-overlay {
  display: none;
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  background: rgba(10, 11, 14, 0.88);
  backdrop-filter: blur(6px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  z-index: 2;
}

.cuatas-game-shell.is-ended .cuatas-game-overlay {
  display: flex;
}

.cuatas-game-overlay h3 {
  margin: 0;
  font-family: "Space Grotesk", "Poppins", sans-serif;
  font-size: 1.35rem;
  color: var(--mist);
}

.cuatas-game-overlay .cuatas-game-final-score {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  font-family: "Space Grotesk", sans-serif;
  margin: 0.25rem 0;
}

.cuatas-game-overlay p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(217, 219, 223, 0.65);
}

.cuatas-game-shell {
  position: relative;
}

.cuatas-game-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .cuatas-minigame .cuatas-game-shell {
    padding: 1.25rem 1rem 1.4rem;
  }

  .cuatas-game-grid {
    gap: 0.45rem;
  }
}
