/* Override Martin's gameboy.css body styles */
body {
  margin: 0;
  background: #1a1a2e;
  overflow-x: hidden;
  align-items: flex-start;
}

/* Dynamic scaling applied via JS transform; override the fixed scale(0.5) */
.gameboy {
  transform-origin: top center;
  margin: 0 auto;
}

/* ROM picker overlay inside .screen */
#rom-picker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #9aa13c;
  color: #5a6028;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  z-index: 2;
}

#rom-browse {
  margin-top: 8px;
  padding: 8px 24px;
  background: #8a9132;
  color: #4a5020;
  border: 1px solid #7a8128;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

#rom-browse:hover {
  background: #7a8128;
}

#rom-error {
  color: #6b2020;
  margin-top: 12px;
  max-width: 90%;
  word-break: break-all;
  font-size: 12px;
}

body.drag-over #rom-picker {
  background: #8a9132;
}

#rom-status {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #9aa13c;
  color: #5a6028;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  margin: 0;
  z-index: 2;
}

.hidden {
  display: none !important;
}

.game-container {
  position: relative;
}

.game-container .game-canvas {
  width: 100%;
  height: 100%;
  margin: 0;
}

/* Raise screen inset shadow above canvas and rom-picker */
.screen-container .screen::after {
  z-index: 3;
}
