@font-face {
  font-family: "PixelFallback";
  src: local("Courier New");
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #0b0b14;
  background-image:
    radial-gradient(circle at 20% 20%, #1a1a2e 0%, #0b0b14 60%);
  color: #fff;
  font-family: "PixelFallback", "Courier New", monospace;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cabinet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  background: linear-gradient(#2b2140, #1a1428);
  border: 6px solid #ff5fd2;
  border-radius: 18px;
  box-shadow:
    0 0 0 4px #0b0b14,
    0 0 0 8px #4be3ff,
    0 20px 60px rgba(0,0,0,0.6);
  max-width: 96vw;
}

#screenTitle {
  font-size: 22px;
  letter-spacing: 3px;
  color: #ffe14d;
  text-shadow:
    2px 2px 0 #d1370c,
    4px 4px 0 #5a0a02;
  font-weight: bold;
  text-align: center;
}

#hud {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.hudBox {
  background: #000;
  border: 3px solid #4be3ff;
  color: #4be3ff;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #013a44;
  border-radius: 4px;
}

.hudBox span { color: #ffe14d; }

.hudBtn {
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  padding: 4px 8px;
}
.hudBtn:hover { background: #113; }

.volBox {
  display: flex;
  align-items: center;
  gap: 6px;
}

.volBox input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  background: #0b3540;
  border: 1px solid #4be3ff;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.volBox input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #ffe14d;
  border: 1px solid #013a44;
  border-radius: 2px;
  cursor: pointer;
}
.volBox input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ffe14d;
  border: 1px solid #013a44;
  border-radius: 2px;
  cursor: pointer;
}

#screenWrap {
  position: relative;
  border: 5px solid #111;
  outline: 3px solid #4be3ff;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

#game {
  display: block;
  width: min(88vw, 900px);
  height: calc(min(88vw, 900px) * 0.6);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  background: #000;
}

#screenWrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.18) 0px,
    rgba(0,0,0,0.18) 1px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0) 3px
  );
  mix-blend-mode: multiply;
  z-index: 5;
}

#overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.72);
  transition: opacity 0.25s ease;
}

#overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#titleCard {
  text-align: center;
  padding: 20px;
}

.bigTitle {
  font-size: clamp(28px, 6vw, 46px);
  font-weight: bold;
  line-height: 1.05;
  color: #ffe14d;
  text-shadow:
    3px 3px 0 #d1370c,
    6px 6px 0 #5a0a02;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.blurb {
  color: #b8f7ff;
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 18px;
  text-shadow: 1px 1px 0 #001;
}

.blurb .boom {
  color: #ff5f5f;
  font-weight: bold;
}

.arcadeBtn {
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #1a1428;
  background: #4dff88;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 6px 0 #1a9e4c, 0 6px 14px rgba(0,0,0,0.4);
  transition: transform 0.05s ease;
}
.arcadeBtn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #1a9e4c, 0 4px 8px rgba(0,0,0,0.4);
}

.tip {
  margin-top: 14px;
  font-size: 10px;
  color: #888;
}

#cabinet.fsModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  gap: 0;
}

#cabinet.fsModal #screenTitle,
#cabinet.fsModal #footerTip {
  display: none;
}

#cabinet.fsModal #hud {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 10px;
  border-radius: 8px;
}

#cabinet.fsModal #screenWrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  border-radius: 0;
}

#cabinet.fsModal #game {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 400 / 240;
}

#footerTip {
  font-size: 10px;
  color: #7a7a99;
  letter-spacing: 1px;
  text-align: center;
}
