/* Callahorn Pong — retro CRT styling */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: #000;
  color: #fff;
  font-family: "Courier New", ui-monospace, monospace;
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

#app { position: fixed; inset: 0; }

#game {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  touch-action: none;
  image-rendering: pixelated;
}

/* ------------------------------------------------------------- screens */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: max(20px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom));
  background: #000;
  z-index: 10;
  text-align: center;
}
.screen.overlay { background: rgba(0, 0, 0, 0.88); }
.hidden { display: none !important; }

h1 {
  font-size: clamp(34px, 10vw, 56px);
  letter-spacing: 0.18em;
  line-height: 1.15;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.55);
  font-weight: 700;
}

.menu-section { letter-spacing: 0.3em; opacity: 0.6; font-size: 13px; margin-top: 6px; }
.playerline { font-size: 15px; letter-spacing: 0.1em; }
.fine { font-size: 12px; opacity: 0.55; line-height: 1.6; letter-spacing: 0.06em; }

/* ------------------------------------------------------------- buttons */
button {
  font-family: inherit;
  background: #000;
  color: #fff;
  border: 2px solid #fff;
  letter-spacing: 0.15em;
  cursor: pointer;
  touch-action: manipulation;
}
button:active { background: #fff; color: #000; }

.big {
  font-size: 19px;
  padding: 14px 10px;
  width: min(320px, 82vw);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}
.big.gold { border-color: #ffd24a; color: #ffd24a; box-shadow: 0 0 12px rgba(255, 210, 74, 0.35); }
.big.gold:active { background: #ffd24a; color: #000; }

.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(320px, 82vw);
}
.btn-grid .big { width: 100%; font-size: 17px; padding: 16px 4px; }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: min(320px, 82vw); }
.opt { font-size: 12px; padding: 10px 4px; opacity: 0.85; }

.mini { font-size: 11px; padding: 4px 8px; }
.corner { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 20; opacity: 0.7; }

/* --------------------------------------------------------------- input */
input {
  font-family: inherit;
  font-size: 22px;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  background: #000;
  color: #fff;
  border: 2px solid #fff;
  padding: 12px;
  width: min(320px, 82vw);
  outline: none;
}

/* ---------------------------------------------------------- leaderboard */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tab { font-size: 11px; padding: 8px 10px; opacity: 0.5; }
.tab.active { opacity: 1; box-shadow: 0 0 10px rgba(255, 255, 255, 0.4); }

.board-list {
  width: min(340px, 88vw);
  min-height: 240px;
  font-size: 15px;
  letter-spacing: 0.08em;
  line-height: 2.1;
  text-align: left;
}
.board-row { display: flex; justify-content: space-between; border-bottom: 1px dashed #333; }
.board-row .rank { opacity: 0.5; width: 2.2em; }
.board-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row.me { color: #ffd24a; }

/* ------------------------------------------------------------ game over */
.over-score { font-size: 44px; letter-spacing: 0.25em; text-shadow: 0 0 14px rgba(255,255,255,0.5); }
.over-best { font-size: 14px; letter-spacing: 0.12em; min-height: 3em; line-height: 1.7; color: #ffd24a; }
