@font-face {
  font-family: 'Game Boy 1989';
  font-style: normal;
  font-weight: normal;
  src: local('Game Boy 1989 Regular'),
       url('fonts/game_boy_1989.woff') format('woff');
}

@font-face {
  font-family: 'Pretendo';
  font-style: normal;
  font-weight: normal;
  src: url('fonts/Pretendo.woff') format('woff');
}

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

body {
  background: #fff;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.GB {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* transform-box/origin are needed for per-letter scale to work from each letter's center */
.letter {
  fill: #1733ff;
  stroke: #1733ff;
  stroke-width: 5px;
  stroke-linejoin: round;
  paint-order: stroke fill;
  transform-box: fill-box;
  transform-origin: center;
}

#NINTENDO_TEXT text {
  font-family: 'Pretendo', monospace;
  fill: rgb(232, 54, 213);
}

#NINTENDO path { fill: rgb(232, 54, 213); }

.overlay0 { fill: #7C51A1; }
.overlay1 { fill: #9E53A0; opacity: 0.55; }
.overlay2 { fill: #BF60A5; opacity: 0.35; }
.overlay3 { fill: #E3B2D3; opacity: 0.18; }

/* Inline text editors — transparent overlays, only caret visible */
#inlineEditor,
#nintendoEditor {
  display: none;
  position: fixed;
  background: transparent;
  border: none;
  outline: none;
  color: transparent;
  caret-color: rgba(123, 47, 190, 0.85);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  padding: 0;
  margin: 0;
  z-index: 6;
  cursor: text;
}

#inlineEditor {
  font-family: 'Game Boy 1989', monospace;
  text-transform: uppercase;
}

#nintendoEditor {
  font-family: 'Pretendo', monospace;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Controls */
.controls {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#playHint {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(7px, 1vw, 13px);
  color: #7b2fbe;
  letter-spacing: 0.2em;
  cursor: pointer;
  user-select: none;
  animation: blink 1.1s step-end infinite;
  white-space: nowrap;
}

#exportBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(248, 248, 255, 0.94);
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 16px;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(6px, 0.75vw, 9px);
  color: #7b2fbe;
  letter-spacing: 0.1em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 10;
  transition: filter 0.12s, transform 0.08s;
  white-space: nowrap;
}
#exportBtn:hover  { filter: brightness(0.85); }
#exportBtn:active { transform: scale(0.96); }
