
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: 'Press Start 2P', monospace;
  overflow: hidden;
  user-select: none;
}

#wrapper {
  position: relative;
  width: 900px;
  height: 420px;
  border: 2px solid #fff;
  box-shadow:
    0 0 40px rgba(255, 255, 255, 0.08),
    0 0 80px rgba(255, 255, 255, 0.03);
  overflow: hidden;
  background: #000;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  pointer-events: none;
  z-index: 10;
}

#hud .label {
  color: #444;
  font-size: 8px;
  margin-bottom: 2px;
}

#hud .val {
  color: #fff;
  font-size: 11px;
  letter-spacing: 1px;
}

#hud .block {
  text-align: right;
}

#speedBar {
  color: #555;
  font-size: 8px;
  padding: 4px 8px;
  border: 1px solid #222;
}

#overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  gap: 10px;
}

#overlay.hidden {
  display: none;
}

.overlay-title {
  font-size: 20px;
  color: #fff;
  letter-spacing: 6px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  margin-bottom: 8px;
}

.overlay-sub {
  font-size: 7px;
  color: #666;
  letter-spacing: 1px;
  line-height: 1.8;
  text-align: center;
}

.overlay-score {
  font-size: 9px;
  color: #aaa;
  margin: 4px 0;
}

.overlay-hiscore {
  font-size: 8px;
  color: #555;
  margin-bottom: 8px;
}

.btn {
  margin-top: 8px;
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 10px 24px;
  cursor: pointer;
  letter-spacing: 2px;
  transition: background 0.15s;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

#camWrap {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#camFeed {
  width: 100px;
  height: 75px;
  border: 1px solid #333;
  opacity: 0.6;
  display: none;
  transform: scaleX(-1); 
}

#camStatus {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: #444;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 4px;
}

#scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.07) 3px,
    rgba(0, 0, 0, 0.07) 4px
  );
}

.corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: #444;
  border-style: solid;
  pointer-events: none;
  z-index: 6;
}

.c-tl { top: -2px;    left: -2px;  border-width: 2px 0 0 2px; }
.c-tr { top: -2px;    right: -2px; border-width: 2px 2px 0 0; }
.c-bl { bottom: -2px; left: -2px;  border-width: 0 0 2px 2px; }
.c-br { bottom: -2px; right: -2px; border-width: 0 2px 2px 0; }