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

html, body {
  width: 100%;
  height: 100dvh;
  background: radial-gradient(circle at center, #222328 0%, #0d0d10 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  color: #f8f8f8;
}

#crt-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 14px;
  background: #1a1a1f;
  border: 4px solid #3a3a44;
  border-radius: 14px;
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.8),
    0 20px 60px rgba(0, 0, 0, 0.85);
  max-width: 820px;
  width: 96vw;
}

#bezel-label {
  font-size: 9px;
  color: #d82800;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #000;
}

#game-canvas {
  width: min(100%, calc(78dvh * 256 / 240));
  max-width: 768px;
  aspect-ratio: 256 / 240;
  background: #000;
  border: 4px solid #0a0a0c;
  border-radius: 6px;
  image-rendering: auto;
  cursor: crosshair;
  touch-action: none;
}

#controls-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 8px;
  color: #9e9ea8;
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 600px) {
  #crt-frame {
    padding: 10px;
  }
  #bezel-label {
    font-size: 7px;
  }
  #controls-bar {
    font-size: 7px;
  }
}


.arcade-brand{
  position: fixed; top: 12px; left: 14px; z-index: 10;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  font-size: 8px; letter-spacing: .08em; line-height: 1.5;
  color: #E4B14A; text-decoration: none;
  text-shadow: 0 1px 0 #000;
  opacity: .9;
}
.arcade-brand span{ color: #FFF8E8; opacity: .65; }
.arcade-brand:hover{ opacity: 1; }
@media (max-width: 600px){
  .arcade-brand{ top: 8px; left: 8px; font-size: 7px; }
}


/* Embedded in the FlockDrop game page: wrapper supplies chrome. */
html.is-embedded body{ background:#000; }
html.is-embedded #crt-frame{
  width:100%; max-width:none; padding:0; gap:0;
  border:0; border-radius:0; box-shadow:none; background:transparent;
}
html.is-embedded #bezel-label,
html.is-embedded #controls-bar{ display:none; }
html.is-embedded #game-canvas{
  width: min(100%, calc(100dvh * 768 / 720));
  height: auto; max-width: 100%; max-height: 100dvh;
  border:0; border-radius:0; box-shadow:none;
}
