/* Security Invaders styles. Reuses shared CSS vars + .pac-* classes. */

.si-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.si-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  flex-shrink: 0;
}

.si-quarter {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(79, 227, 255, 0.5);
  font-size: 0.95rem;
  margin-left: 0.5rem;
}

.si-score-wrap {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.si-main {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0 0.25rem 0.25rem;
  min-height: 0;
}

.si-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  border-radius: 14px;
  object-fit: contain;
  background: #050820;
}

/* On-screen controls shown on touch devices. */
.si-touch {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.6rem;
  pointer-events: none;
}

.si-pad {
  pointer-events: auto;
  border: none;
  border-radius: 14px;
  background: rgba(79, 227, 255, 0.18);
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
  min-width: 68px;
  min-height: 58px;
  padding: 0.5rem 0.9rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06) inset,
    0 4px 0 rgba(0, 0, 0, 0.25);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.si-pad:active {
  transform: translateY(2px);
  background: rgba(79, 227, 255, 0.32);
}

.si-pad--fire {
  background: rgba(255, 77, 77, 0.22);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.si-pad--fire:active {
  background: rgba(255, 77, 77, 0.45);
}

/* Hide touch controls on desktop-ish pointers. */
@media (hover: hover) and (pointer: fine) {
  .si-touch {
    display: none;
  }
}

.si-final {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  opacity: 0.85;
  max-width: 22rem;
  line-height: 1.45;
}
