/* Authentic Retro Arcade Cabinet with Control Deck (Joystick + Pushbuttons) */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  /* Exact Room Colors from reference image */
  --room-top: #2f2e50;
  --room-sides: #494883;
  --room-bottom: #6060a8;
  --room-seams: #242340;

  /* Monitor & Bezel */
  --bezel-outer: #28162e;
  --bezel-inner: #1e1024;
  --screen-plum: #351d3d;
  --screen-grid: rgba(92, 54, 102, 0.35);

  /* Arcade Controls Deck */
  --deck-bg: #22142a;
  --deck-border: #381f44;
  --balltop-red: #ff334b;
  --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;
}

/* Perspective 4-Wall Room Container */
.arcade-viewport {
  position: relative;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

/* Cabinet Container */
.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%;
}

/* Monitor Screen Wrapper (Aspect Ratio 4:3 matching reference) */
.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 / CRT Dot-Matrix LCD Screen 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;
}

/* Decorative Non-Interactive Arcade Control Panel (Joystick + Buttons) */
.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; /* NON-INTERACTIVE as requested */
}

/* Joystick Assembly */
.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;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.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;
  text-shadow: 0 1px 2px #000;
}

/* Pushbuttons Assembly */
.buttons-assembly {
  display: flex;
  gap: 16px;
  align-items: center;
}

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

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

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

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

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

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

/* Footer Credits & Instructions */
.arcade-footer {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  font-size: 8px;
  color: #c0b9d6;
  text-align: center;
  line-height: 1.7;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

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

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

/* Mobile Responsiveness */
@media (max-width: 620px) {
  .screen-wrapper {
    width: 92vw;
    height: 69vw; /* 4:3 */
    border-radius: 26px;
  }
  .arcade-cabinet {
    border-radius: 34px;
    padding: 10px;
    border-width: 6px;
  }
  .arcade-control-deck {
    padding: 8px 16px;
  }
  .joystick-assembly {
    width: 60px;
    height: 55px;
  }
  .joystick-balltop {
    width: 28px;
    height: 28px;
    bottom: 26px;
  }
  .joystick-shaft {
    height: 22px;
    bottom: 10px;
  }
  .arcade-pushbutton {
    width: 36px;
    height: 36px;
  }
  .btn-cap {
    width: 24px;
    height: 24px;
  }
}
