:root {
  --phosphor: #5dff8a;
  --phosphor-dim: #1c6b3a;
  --amber: #ffb000;
  --crt-black: #010805;
  --bezel: #0b120e;
  --metal: #1a241c;
}

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

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(ellipse at center, #0a160e 0%, #000 70%);
  color: var(--phosphor);
  font-family: "Share Tech Mono", ui-monospace, monospace;
  overflow: hidden;
}

#cabinet {
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 10px 14px 12px;
}

#bezel {
  width: min(1280px, 100%);
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: linear-gradient(180deg, #151e18 0%, #0a0f0c 40%, #070b08 100%);
  border: 2px solid #243328;
  box-shadow:
    0 0 0 1px #000,
    0 0 80px rgba(40, 255, 110, 0.08),
    inset 0 0 40px rgba(0, 0, 0, 0.6);
}

#topplate {
  padding: 8px 16px 6px;
  text-align: center;
  letter-spacing: 0.28em;
  border-bottom: 1px solid #1c3324;
}

.plate-line {
  font-size: 13px;
  color: var(--phosphor);
  text-shadow: 0 0 8px rgba(93, 255, 138, 0.7);
}

.plate-sub {
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #6aa87a;
}

#crt {
  position: relative;
  background: var(--crt-black);
  overflow: hidden;
  min-height: 0;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
  background: #000;
  image-rendering: auto;
}

#scanlines,
#vignette,
#glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.16) 0px,
    rgba(0, 0, 0, 0.16) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.55;
  mix-blend-mode: multiply;
}

#vignette {
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(80, 255, 140, 0.04), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.35));
}

#glass {
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 28%,
    transparent 62%,
    rgba(93, 255, 138, 0.03) 100%
  );
}

#deck {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 16px;
  border-top: 1px solid #1c3324;
  background: #0c120e;
  flex-wrap: wrap;
}

.lamp {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #4e7a5b;
}

.lamp span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1a2a1e;
  box-shadow: inset 0 0 3px #000;
}

.lamp.on span {
  background: var(--phosphor);
  box-shadow: 0 0 10px var(--phosphor);
}

.lamp.warn span {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

.lamp.hot span {
  background: #ff3a2a;
  box-shadow: 0 0 10px #ff3a2a;
}

.lamp.force.on span {
  background: #7ec8ff;
  box-shadow: 0 0 10px #7ec8ff;
}

#deck-legend {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #5e886c;
}

@media (max-width: 820px) {
  #cabinet { padding: 0; }
  #bezel { border: none; width: 100%; }
  #topplate { display: none; }
  #deck-legend { display: none; }
  .plate-line { letter-spacing: 0.12em; }
}
