/* Pong Protocol Scoped Styles */
#citadel-arcade {
  margin: 80px auto;
  max-width: 1100px;
  width: 95%; /* Ensures it doesn't touch screen edges on mobile */
  padding: 0;
  display: block; /* Break out of any parent flexbox/grid */
}

#game-container {
  width: 100%;
  height: 60vh; /* Scalable height based on screen size */
  max-height: 600px;
  min-height: 400px;
  border: 1px solid rgba(0, 243, 255, 0.3);
  background: #020408;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Ensure the button is clickable and styled correctly */
.btn-arcade-init {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 15px 40px;
  font-family: var(--font-header);
  font-size: 0.9rem;
  letter-spacing: 4px;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 30px;
  z-index: 100; /* Ensure it sits above all FX layers */
}

.btn-arcade-init:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 20px var(--primary);
}

/* HUD mobile adjustments */
@media (max-width: 600px) {
  .hud { padding: 0 10px; font-size: 0.5rem; }
  #score { font-size: 1rem; letter-spacing: 5px; }
}

.hud {
  height: 50px;
  border-bottom: 1px solid rgba(0, 243, 255, 0.2);
  background: rgba(0, 243, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
  font-family: var(--font-header);
  font-size: 0.65rem;
  color: var(--primary);
  letter-spacing: 2px;
}

#score {
  font-size: 1.5rem;
  font-family: var(--font-mono);
  letter-spacing: 12px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

#threat-level {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
}

#viewport {
  flex: 1;
  position: relative;
  background: radial-gradient(circle at center, #0a141d 0%, #000 100%);
  overflow: hidden;
}

#viewport.active {
  cursor: none;
}

#stage {
  width: 100%;
  height: 100%;
  display: block;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 1px, rgba(0,0,0,0.15) 2px, rgba(0,0,0,0.15) 3px);
  pointer-events: none;
  z-index: 5;
}

#ui-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 8, 0.95);
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: opacity 0.5s;
}

#ui-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}