/* ==========================================================================
   TypeApex Pro — Word Matrix / Laser Defense Arcade Stylesheet
   ========================================================================== */

.matrix-arcade-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  position: relative;
}

.arcade-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #020617;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
  font-family: var(--font-mono);
}

.arcade-hud-stat {
  display: flex;
  flex-direction: column;
}

.arcade-hud-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: #10b981;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.arcade-hud-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.arcade-shield-hearts {
  display: flex;
  gap: 0.35rem;
  font-size: 1.25rem;
}

.matrix-canvas-container {
  position: relative;
  width: 100%;
  height: 480px;
  background: #050b14;
  border: 2px solid rgba(16, 185, 129, 0.5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 50px rgba(16, 185, 129, 0.05);
}

#matrix-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.crt-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 10;
  opacity: 0.6;
}

.arcade-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.arcade-input-box {
  width: 100%;
  max-width: 500px;
  background: #020617;
  border: 2px solid rgba(16, 185, 129, 0.6);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: #10b981;
  text-align: center;
  outline: none;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
  letter-spacing: 0.05em;
}

.arcade-input-box:focus {
  border-color: #34d399;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.45);
}

@keyframes screenShake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake-active {
  animation: screenShake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.powerup-active-pill {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #f59e0b;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 12;
  animation: pulsePill 1s infinite alternate;
}

@keyframes pulsePill {
  from { transform: scale(0.96); opacity: 0.8; }
  to { transform: scale(1.04); opacity: 1; }
}
