/* Burger — greasy-spoon diner arcade cabinet: cream tile, ketchup, mustard. */
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #17110f;
  --panel: #241a16;
  --bevel-light: #6b4a35;
  --bevel-dark: #0b0806;
  --cream: #f6f0dd;
  --ketchup: #e8433f;
  --mustard: #ffd34d;
  --relish: #57c85a;
  --gray: #b09a86;
  --muted: #7d6a5c;
  --pixel: "Press Start 2P", "Courier New", monospace;
}

html,
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1.6;
  image-rendering: pixelated;
}

.crt {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.16) 0px,
    rgba(0, 0, 0, 0.16) 1px,
    transparent 1px,
    transparent 3px
  );
}

.vhs-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: vhs-drift 0.12s steps(2) infinite;
}

@keyframes vhs-drift {
  50% {
    transform: translateX(1px);
  }
}

#app {
  max-width: 930px;
  margin: 0 auto;
  padding: 20px 14px 40px;
}

.hidden {
  display: none !important;
}

.cabinet-header {
  position: relative;
  text-align: center;
  margin-bottom: 20px;
  padding-top: 22px;
}

.back-link,
.header-btn {
  position: absolute;
  top: 0;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-decoration: none;
  font-family: var(--pixel);
}

.back-link {
  left: 0;
}

.header-right {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 14px;
}

.header-btn {
  position: static;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.back-link:hover,
.header-btn:hover {
  color: var(--mustard);
}

.marquee {
  display: inline-block;
  padding: 16px 30px 14px;
  background: var(--ketchup);
  color: var(--cream);
  border: 4px solid var(--bevel-dark);
  box-shadow:
    inset 0 0 0 2px #ff6a5e,
    0 0 0 4px var(--bevel-light),
    6px 6px 0 var(--bevel-dark);
  animation: marquee-glow 2s steps(2) infinite;
}

@keyframes marquee-glow {
  50% {
    background: #c9322f;
  }
}

.burger-title {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.14em;
  color: var(--mustard);
  text-shadow:
    2px 2px 0 #6b1109,
    -1px -1px 0 #ffe9b0;
}

.marquee-sub {
  margin: 8px 0 0;
  font-size: 7px;
  letter-spacing: 0.15em;
  color: #ffe1d8;
}

.cabinet-panel {
  background: var(--panel);
  border: 4px solid var(--bevel-dark);
  box-shadow: 0 0 0 4px var(--bevel-light);
}

.panel-bevel {
  padding: 18px 16px 20px;
  box-shadow:
    inset 2px 2px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-dark);
}

#lobby {
  max-width: 420px;
  margin: 0 auto;
}

.insert-coin {
  margin: 0 0 14px;
  text-align: center;
  color: var(--mustard);
  font-size: 8px;
  animation: blink 1.2s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

.field-label {
  display: block;
  margin-bottom: 14px;
}

.field-label span {
  display: block;
  margin-bottom: 6px;
  font-size: 7px;
  color: var(--gray);
}

.field-label input,
.join-row input {
  width: 100%;
  padding: 10px 12px;
  border: 3px solid var(--bevel-dark);
  background: #100b09;
  color: var(--cream);
  font-family: var(--pixel);
  font-size: 10px;
}

.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.join-row {
  display: flex;
  gap: 8px;
}

.join-row input {
  flex: 1;
  text-transform: uppercase;
}

.btn {
  padding: 10px 14px;
  border: 3px solid var(--bevel-dark);
  background: #3a2820;
  color: var(--cream);
  font-family: var(--pixel);
  font-size: 9px;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 var(--bevel-dark);
}

.btn:hover {
  background: #4d362b;
}

.btn--primary {
  background: var(--mustard);
  color: #2a1c08;
}

.btn--primary:hover {
  background: #ffe07a;
}

.btn--cook {
  width: 100%;
  margin-top: 12px;
  background: var(--ketchup);
  color: var(--cream);
  animation: cook-pulse 1.4s steps(2) infinite;
}

@keyframes cook-pulse {
  50% {
    background: #ff6a5e;
  }
}

.status-line {
  min-height: 1.6em;
  margin: 12px 0 0;
  color: var(--ketchup);
  font-size: 8px;
}

.blurb {
  margin: 10px 0 0;
  font-size: 6px;
  line-height: 2;
  color: var(--muted);
  text-align: center;
}

.waiting-room-inner {
  max-width: 420px;
  margin: 0 auto;
}

.waiting-room-code {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2em;
  text-align: center;
  color: var(--mustard);
}

.room-label,
.settings-heading,
.players-heading {
  margin: 0 0 8px;
  font-size: 7px;
  color: var(--gray);
  text-align: center;
}

.settings-block {
  margin: 16px 0;
}

.shift-picker {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
}

.shift-btn {
  min-width: 26px;
  padding: 6px 7px;
  border: 2px solid var(--bevel-light);
  background: #100b09;
  color: var(--cream);
  font-family: var(--pixel);
  font-size: 8px;
  cursor: pointer;
}

.shift-btn.selected {
  background: var(--mustard);
  color: #2a1c08;
}

.shift-btn:disabled {
  cursor: default;
  opacity: 0.55;
}

.map-desc {
  margin: 10px 0 0;
  text-align: center;
  font-size: 6px;
  color: var(--muted);
  line-height: 2;
}

.waiting-player-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.waiting-player-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #3a2820;
  font-size: 8px;
}

.chef-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid var(--bevel-dark);
}

.waiting-host-message {
  margin: 12px 0 0;
  text-align: center;
  color: var(--gray);
  font-size: 8px;
}

.screen-bezel {
  padding: 10px;
  background: #0a0706;
  border: 4px solid var(--bevel-dark);
  box-shadow:
    inset 0 0 0 3px #241a16,
    0 0 0 4px var(--bevel-light);
}

#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  background: #2a2320;
  image-rendering: pixelated;
}

.quick-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: center;
  margin-top: 12px;
  font-size: 6px;
  color: var(--muted);
}

kbd {
  display: inline-block;
  min-width: 16px;
  padding: 2px 5px;
  border: 2px solid var(--bevel-light);
  background: #100b09;
  color: var(--cream);
  font-family: var(--pixel);
  font-size: 6px;
}

.overlay-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(10, 7, 6, 0.85);
}

.controls-modal-panel,
.game-end-panel {
  width: min(100%, 460px);
  margin: auto;
}

.controls-modal-title,
.end-title {
  margin: 0 0 14px;
  text-align: center;
  font-size: 12px;
  color: var(--mustard);
}

.controls-sub {
  margin: 16px 0 8px;
  font-size: 8px;
  color: var(--ketchup);
}

.controls-grid {
  display: grid;
  gap: 10px;
  font-size: 7px;
  line-height: 1.8;
}

.controls-grid kbd {
  margin-right: 4px;
  font-size: 7px;
}

.how-to {
  margin: 0;
  padding-left: 16px;
  font-size: 7px;
  line-height: 2.2;
  color: var(--gray);
}

.how-to b {
  color: var(--cream);
}

.controls-close-btn {
  width: 100%;
  margin-top: 18px;
}

.end-stats {
  margin: 0 0 16px;
}

.end-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #3a2820;
  font-size: 8px;
  color: var(--gray);
}

.end-stat b {
  color: var(--mustard);
}

#playAgainBtn {
  width: 100%;
}

.waiting-for-host {
  margin: 12px 0 0;
  text-align: center;
  color: var(--gray);
  font-size: 8px;
}
