/* Pixel Combat Arcade Stylesheet matching Snake Arcade reference styling */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --room-top: #2f2e50;
  --room-sides: #494883;
  --room-bottom: #6060a8;
  --bezel-outer: #28162e;
  --screen-plum: #351d3d;
  --btn-amber: #fda415;
  --btn-red: #fc7814;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background-color: var(--room-top);
  color: #fff5ea;
  font-family: 'Press Start 2P', monospace, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  overflow-x: hidden;
  position: relative;
}

.arcade-viewport {
  position: relative;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Perspective Walls SVG */
.room-perspective-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Cabinet Frame */
.arcade-cabinet {
  position: relative;
  z-index: 2;
  background: var(--bezel-outer);
  border: 10px solid #1f1025;
  border-radius: 46px;
  padding: 16px 16px 20px 16px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.9),
    inset 0 3px 8px rgba(255, 255, 255, 0.1),
    0 0 30px rgba(73, 72, 131, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

/* 4:3 Screen Wrapper */
.screen-wrapper {
  position: relative;
  width: 560px;
  height: 420px;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 38px;
  overflow: hidden;
  background: var(--screen-plum);
  box-shadow: 
    inset 0 0 25px rgba(0, 0, 0, 0.8),
    0 0 0 3px #1a0c1e;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-radius: 38px;
}

/* Game Boy Dot-Matrix / CRT Filter */
.lcd-dotmatrix-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 38px;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.16) 50%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.04));
  background-size: 100% 3px, 3px 100%;
  z-index: 10;
}

/* Non-Interactive Arcade Control Deck */
.arcade-control-deck {
  width: 100%;
  margin-top: 14px;
  background: linear-gradient(180deg, #2a1634 0%, #1a0c20 100%);
  border: 3px solid #3c2049;
  border-radius: 20px;
  padding: 12px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.08), 0 6px 16px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.joystick-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 80px;
  height: 70px;
}

.joystick-washer {
  position: absolute;
  bottom: 4px;
  width: 58px;
  height: 22px;
  background: radial-gradient(ellipse at center, #2b2b2b 0%, #111111 100%);
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.joystick-shaft {
  position: absolute;
  bottom: 14px;
  width: 10px;
  height: 28px;
  background: linear-gradient(90deg, #999 0%, #fff 45%, #777 75%, #444 100%);
  border-radius: 2px;
}

.joystick-balltop {
  position: absolute;
  bottom: 34px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6b7e 0%, #ff2a44 45%, #a8071c 100%);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.deck-label {
  font-size: 8px;
  color: #7b5888;
  letter-spacing: 2px;
}

.buttons-assembly {
  display: flex;
  gap: 12px;
  align-items: center;
}

.arcade-btn-socket {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.arcade-pushbutton {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #190b20;
  border: 3px solid #33173d;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.7);
}

.btn-cap {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4), 0 3px 6px rgba(0, 0, 0, 0.5);
}

.btn-cap.cap-punch {
  background: radial-gradient(circle at 35% 30%, #60a5fa 0%, #00bbf9 50%, #0369a1 100%);
}

.btn-cap.cap-kick {
  background: radial-gradient(circle at 35% 30%, #ffd066 0%, #fda415 50%, #c46d00 100%);
}

.btn-cap.cap-special {
  background: radial-gradient(circle at 35% 30%, #ff8597 0%, #ff2a44 50%, #ab0016 100%);
}

.btn-tag {
  font-size: 7px;
  color: #9878a8;
  letter-spacing: 1px;
}

/* Instructions Footer */
.arcade-footer {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  font-size: 8px;
  color: #c0b9d6;
  text-align: center;
  line-height: 1.7;
}

.arcade-footer a {
  color: var(--btn-amber);
  text-decoration: none;
}

.arcade-footer a:hover {
  text-decoration: underline;
}

.controls-guide {
  margin-top: 6px;
  color: #fda415;
  font-size: 7.5px;
}

@media (max-width: 620px) {
  .screen-wrapper {
    width: 92vw;
    height: 69vw;
    border-radius: 26px;
  }
  .arcade-cabinet {
    border-radius: 34px;
    padding: 10px;
    border-width: 6px;
  }
  .arcade-control-deck {
    padding: 8px 14px;
  }
}
