#mini-game {
  overflow: hidden;
}
.game-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
  background: linear-gradient(
    145deg,
    rgba(20, 31, 55, 0.96),
    rgba(8, 14, 28, 0.97)
  );
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 26px;
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.3);
}
.game-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 10px;
}
.game-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffb84d;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.game-info h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.045em;
}
.game-info p {
  color: #9eacc0;
  line-height: 1.65;
}
.game-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.game-stat {
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  text-align: center;
}
.game-stat strong {
  display: block;
  color: #fff;
  font-size: 1.35rem;
}
.game-stat span {
  display: block;
  margin-top: 2px;
  color: #7f8da2;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.game-start {
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #ffb84d, #ff7a55);
  color: #111722;
  font:
    900 0.8rem Manrope,
    sans-serif;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(255, 159, 67, 0.2);
  transition: 0.25s;
}
.game-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 17px 36px rgba(255, 159, 67, 0.3);
}
.game-start:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.game-arena {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(91, 124, 255, 0.2);
  border-radius: 20px;
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(91, 124, 255, 0.15),
      transparent 48%
    ),
    linear-gradient(rgba(255, 255, 255, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.027) 1px, transparent 1px),
    #080e1d;
  background-size:
    auto,
    32px 32px,
    32px 32px;
  isolation: isolate;
}
.game-arena::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    transparent 48%,
    rgba(34, 211, 238, 0.04) 50%,
    transparent 52%
  );
  background-size: 100% 9px;
  animation: gameScan 7s linear infinite;
  pointer-events: none;
}
.game-arena::after {
  content: "SYSTEM READY";
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: rgba(34, 211, 238, 0.25);
  font: 800 0.62rem monospace;
  letter-spacing: 0.15em;
  pointer-events: none;
}
.game-ready {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  color: #94a4bb;
  font-weight: 700;
  transition: 0.25s;
}
.game-ready i {
  display: block;
  margin-bottom: 12px;
  color: #5b7cff;
  font-size: 2.3rem;
  animation: gamePulse 2s ease-in-out infinite;
}
.game-ready.hidden {
  opacity: 0;
  visibility: hidden;
}
.game-bug {
  position: absolute;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(66, 232, 164, 0.38);
  border-radius: 18px;
  background: rgba(66, 232, 164, 0.11);
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  cursor: crosshair;
  user-select: none;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.26),
    0 0 22px rgba(66, 232, 164, 0.08);
  animation:
    bugEnter 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    bugWiggle 0.85s 0.25s ease-in-out infinite alternate;
  transition: filter 0.15s;
}
.game-bug:hover {
  filter: brightness(1.35);
}
.game-bug.squashed {
  pointer-events: none;
  animation: bugPop 0.25s ease forwards;
}
.game-spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffb84d;
  pointer-events: none;
  animation: sparkOut 0.48s ease-out forwards;
}
.game-result {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 18, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}
.game-result.show {
  opacity: 1;
  visibility: visible;
}
.game-result-card {
  text-align: center;
  padding: 26px;
}
.game-result-card i {
  color: #ffb84d;
  font-size: 2.7rem;
}
.game-result-card h4 {
  margin: 12px 0 5px;
  color: #fff;
  font-size: 1.6rem;
}
.game-result-card p {
  color: #9eacc0;
}
@keyframes gameScan {
  to {
    background-position: 0 90px;
  }
}
@keyframes gamePulse {
  50% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 12px #5b7cff);
  }
}
@keyframes bugEnter {
  from {
    opacity: 0;
    transform: scale(0.2) rotate(-20deg);
  }
}
@keyframes bugWiggle {
  to {
    transform: translateY(-4px) rotate(5deg);
  }
}
@keyframes bugPop {
  to {
    opacity: 0;
    transform: scale(1.7) rotate(25deg);
  }
}
@keyframes sparkOut {
  to {
    opacity: 0;
    transform: translate(var(--sx), var(--sy)) scale(0.2);
  }
}
@media (max-width: 820px) {
  .game-shell {
    grid-template-columns: 1fr;
  }
  .game-info {
    padding: 4px;
  }
  .game-stats {
    max-width: 420px;
  }
  .game-arena {
    min-height: 360px;
  }
}
@media (max-width: 560px) {
  .game-shell {
    padding: 12px;
    border-radius: 20px;
  }
  .game-arena {
    min-height: 330px;
  }
  .game-bug {
    width: 49px;
    height: 49px;
    border-radius: 15px;
  }
  .game-stat strong {
    font-size: 1.15rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .game-arena::before,
  .game-ready i,
  .game-bug {
    animation: none;
  }
}
