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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 25%, #1d2238 0%, #0d101b 65%, #06070d 100%);
  color: #e6ecff;
  font-family: "Courier New", Courier, monospace;
}

#arcade-shell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

#bezel {
  display: flex;
  flex-direction: column;
  width: min(96vw, calc((100vh - 28px) * 16 / 9));
  max-width: 1280px;
  background: linear-gradient(180deg, #2d3142 0%, #1c1f2b 100%);
  border: 2px solid #49506b;
  border-radius: 14px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 6px rgba(0, 0, 0, 0.55);
  padding: 10px 14px 10px;
  gap: 8px;
}

#bezel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #b7c4e8;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-shadow: 0 1px 2px #000;
}

.amiga-check {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(#e63946 0% 25%, #f8fafc 0% 50%) 50% / 6px 6px;
  box-shadow: 0 0 8px rgba(230, 57, 70, 0.65);
  display: inline-block;
}

#quick-controls {
  display: flex;
  gap: 6px;
}

.bezel-btn {
  background: linear-gradient(180deg, #3c435c 0%, #272c3d 100%);
  border: 1px solid #596385;
  border-radius: 5px;
  color: #eaf0ff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  cursor: pointer;
  letter-spacing: 0.6px;
  transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease;
}

.bezel-btn:hover {
  background: linear-gradient(180deg, #4b5575 0%, #31384f 100%);
  border-color: #8496cf;
}

.bezel-btn:active {
  transform: translateY(1px);
}

#screen-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid #10131c;
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.9),
    0 0 0 1px #404863;
}

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

#crt-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  background:
    linear-gradient(
      rgba(18, 16, 16, 0) 50%,
      rgba(0, 0, 0, 0.22) 50%
    ),
    radial-gradient(
      ellipse at center,
      rgba(255, 255, 255, 0) 62%,
      rgba(0, 0, 0, 0.32) 100%
    );
  background-size: 100% 4px, 100% 100%;
}

#screen-wrap.crt-on #crt-overlay {
  opacity: 1;
}

#bezel-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #9ba8cc;
}

.key-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.key-hints span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

kbd {
  display: inline-block;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  color: #f4f7ff;
  background: #232838;
  border: 1px solid #525c7a;
  border-bottom-width: 2px;
  border-radius: 4px;
}

.led-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.led {
  width: 9px;
  height: 5px;
  border-radius: 2px;
  display: inline-block;
}

.led-power {
  background: #ff4545;
  box-shadow: 0 0 8px #ff4545;
}

.led-drive {
  background: #33e06b;
  box-shadow: 0 0 6px #33e06b;
  transition: opacity 0.1s ease;
}

.led-drive.off {
  background: #253d2e;
  box-shadow: none;
}

.led-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #7c89ad;
  margin-right: 4px;
}

@media (max-width: 720px) {
  #arcade-shell {
    padding: 4px;
  }
  #bezel {
    padding: 6px 8px;
    border-radius: 8px;
  }
  .key-hints {
    font-size: 10px;
    gap: 6px;
  }
}
