/* Ginger's Fish Dash — PS4 browser build. Plain CSS, no flexbox gap, no CSS variables. */
* { -webkit-box-sizing: border-box; box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #0A0A0A; }
body {
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #0A0A0A;
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-text-size-adjust: 100%;
}
#stage { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; background: #000; }
#screen { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: block; width: 100%; margin: 0.9rem 0 0 0; padding: 0 1.2rem;
  height: 3.4rem; line-height: 3.4rem;
  font-family: inherit; font-size: 1.35rem; font-weight: 600; text-align: center;
  border: 0; border-radius: 0.6rem; cursor: pointer; outline: none;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  -webkit-transition: background-color 0.15s ease, box-shadow 0.15s ease;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn-dark { background: #0A0A0A; color: #FFFFFF; }
.btn-dark:hover { background: #27272A; }
.btn-light { background: #FFFFFF; color: #0A0A0A; box-shadow: 0 0 0 1px #D4D4D8; }
.btn-light:hover { background: #F4F4F5; }
.btn:focus, .level-card:focus, .btn.is-focus, .level-card.is-focus {
  box-shadow: 0 0 0 0.25rem #FFFFFF, 0 0 0 0.55rem #00795E;
}
.row2 { font-size: 0; }
.row2 .btn { display: inline-block; width: 49%; margin-left: 2%; font-size: 1.35rem; vertical-align: top; }
.row2 .btn:first-child { margin-left: 0; }

/* ---------- screens & cards ---------- */
.screen { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: rgba(10,10,10,0.5); }
.card {
  position: absolute; left: 50%; top: 50%; width: 44rem; margin-left: -22rem;
  -webkit-transform: translateY(-50%); transform: translateY(-50%);
  background: #FFFFFF; border-radius: 1rem; padding: 2.2rem 2.4rem 2.4rem;
  box-shadow: 0 1rem 3rem rgba(10,10,10,0.3);
}
.card.wide { width: 64rem; margin-left: -32rem; }
.eyebrow { display: block; font-size: 1.05rem; font-weight: 600; color: #00795E; letter-spacing: 0.02em; }
h1 { margin: 0.3rem 0 0; font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
h2 { margin: 0.3rem 0 0; font-size: 2.1rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
h3 { margin: 0 0 0.5rem; font-size: 1.3rem; font-weight: 600; }
.lead { margin: 0.7rem 0 0.6rem; font-size: 1.3rem; line-height: 1.45; color: #52525B; }
.lead.small { font-size: 1.15rem; }
.note { margin: 1rem 0 0; font-size: 1.05rem; line-height: 1.4; color: #52525B; }

/* how to play */
.cols3 { margin-top: 1.2rem; font-size: 0; }
.cols3 .col { display: inline-block; vertical-align: top; width: 32%; margin-left: 2%; font-size: 1.1rem; }
.cols3 .col:first-child { margin-left: 0; }
.cols3 p { margin: 0 0 0.6rem; line-height: 1.45; color: #3F3F46; }

/* level select */
#scrLevels .card.wide { width: 52rem; margin-left: -26rem; }
#levelGrid { margin-top: 1rem; font-size: 0; }
.level-card {
  display: inline-block; vertical-align: top; width: 49%; margin: 0 0 1.2rem 2%;
  padding: 0.6rem 0.6rem 0.9rem; background: #FFFFFF; border: 0; border-radius: 0.8rem;
  box-shadow: 0 0 0 1px #E4E4E7; text-align: left; cursor: pointer; outline: none;
  font-family: inherit; color: #0A0A0A; -webkit-appearance: none; appearance: none;
}
.level-card:nth-child(2n+1) { margin-left: 0; }
.level-card:hover { background: #F4F4F5; }
.level-thumb {
  display: block; width: 100%; height: auto; border-radius: 0.5rem;
  image-rendering: -moz-crisp-edges; image-rendering: -webkit-optimize-contrast;
  image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor;
}
.level-name { display: block; margin: 0.7rem 0.3rem 0; font-size: 1.4rem; font-weight: 600; }
.level-tag { display: block; margin: 0.2rem 0.3rem 0; font-size: 1.05rem; color: #52525B; }
.level-new { display: block; margin: 0.25rem 0.3rem 0; font-size: 1.05rem; font-weight: 600; color: #0A0A0A; }
.level-best { display: block; margin: 0.35rem 0.3rem 0; font-size: 1.05rem; font-weight: 600; color: #00795E; }

/* ---------- HUD ---------- */
.hud-stats { position: absolute; left: 1.4rem; top: 1.4rem; font-size: 0; }
.stat {
  display: inline-block; vertical-align: top; min-width: 8.5rem; margin-right: 0.7rem;
  padding: 0.55rem 1.1rem; background: #FFFFFF; border-radius: 0.6rem; box-shadow: 0 0 0 1px #E4E4E7;
}
.stat-label { display: block; font-size: 0.95rem; color: #52525B; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 600; line-height: 1.25; white-space: nowrap; }
.stat-value small { font-size: 1rem; font-weight: 500; color: #71717A; }
.cursor-hint {
  display: block; margin-top: 0.7rem; font-size: 1.15rem; font-weight: 600; color: #FFFFFF;
  text-shadow: 0 0.1rem 0.3rem rgba(0,0,0,0.8);
}
.hud-buttons { position: absolute; right: 1.4rem; top: 1.4rem; font-size: 0; }
.hud-btn { display: inline-block; width: auto; min-width: 9rem; margin: 0 0 0 0.7rem; height: 3.9rem; line-height: 3.9rem; font-size: 1.3rem; }
#track {
  position: absolute; left: 1.4rem; right: 1.4rem; bottom: 1.2rem; height: 2.6rem;
  background: rgba(255,255,255,0.94); border-radius: 0.6rem; box-shadow: 0 0 0 1px #E4E4E7;
}
.track-label { position: absolute; top: 0; line-height: 2.6rem; font-size: 1rem; font-weight: 500; color: #52525B; }
.track-start { left: 1rem; }
.track-end { right: 1rem; }
.track-bar { position: absolute; left: 5.2rem; right: 8.8rem; top: 0; height: 2.6rem; }
.track-line { position: absolute; left: 0; right: 0; top: 1.2rem; height: 0.2rem; background: #E4E4E7; border-radius: 0.2rem; }
.track-fill { position: absolute; left: 0; top: 1.2rem; height: 0.2rem; width: 0; background: #00795E; border-radius: 0.2rem; }
.marker {
  position: absolute; top: 0.75rem; left: 0; width: 1.1rem; height: 1.1rem; margin-left: -0.55rem;
  border-radius: 50%; border: 0.15rem solid #0A0A0A; background: #8B929C;
}
.marker-you { top: 0.55rem; width: 1.5rem; height: 1.5rem; margin-left: -0.75rem; border: 0.2rem solid #00795E; }

/* ---------- results ---------- */
#resRows { margin: 0.6rem 0 0.4rem; }
.res-row { position: relative; height: 3rem; line-height: 3rem; padding: 0 1rem; border-radius: 0.5rem; font-size: 1.2rem; }
.res-row.you { background: #EEF6F3; font-weight: 600; }
.res-place { position: absolute; left: 1rem; font-weight: 600; }
.res-name { position: absolute; left: 5rem; }
.res-dot { display: inline-block; width: 0.9rem; height: 0.9rem; margin-right: 0.6rem; border-radius: 50%; box-shadow: 0 0 0 1px #0A0A0A; vertical-align: middle; }
.res-time { position: absolute; left: 20rem; color: #52525B; }
.res-fish { position: absolute; left: 27rem; color: #52525B; }
.res-score { position: absolute; right: 1rem; font-weight: 600; }
.res-head { height: 2.2rem; line-height: 2.2rem; font-size: 1rem; color: #71717A; }
.res-head .res-place, .res-head .res-score, .res-head .res-time, .res-head .res-fish { font-weight: 500; color: #71717A; }

/* ---------- controller test ---------- */
.pad-status { margin: 0.6rem 0 0.8rem; font-size: 1.05rem; line-height: 1.6; color: #3F3F46; }
#padUa { font-size: 0.95rem; color: #71717A; word-break: break-all; }
#padButtons { font-size: 0; }
.pb {
  display: inline-block; width: 6.6rem; margin: 0 0.4rem 0.4rem 0; padding: 0.45rem 0;
  text-align: center; font-size: 0.95rem; font-weight: 500; border-radius: 0.4rem;
  background: #F4F4F5; color: #3F3F46; box-shadow: 0 0 0 1px #E4E4E7;
}
.pb.on { background: #00795E; color: #FFFFFF; box-shadow: none; }
#padAxes { margin-top: 0.4rem; font-size: 0; }
.axis { display: inline-block; width: 24%; margin-right: 1%; font-size: 0.95rem; color: #3F3F46; }
.axis-track { position: relative; height: 0.6rem; margin-top: 0.3rem; background: #E4E4E7; border-radius: 0.3rem; }
.axis-dot { position: absolute; top: -0.2rem; width: 1rem; height: 1rem; margin-left: -0.5rem; border-radius: 50%; background: #00795E; left: 50%; }
.pad-log-title { margin-top: 1rem; font-size: 1.05rem; color: #3F3F46; }
#eventLog {
  margin-top: 0.4rem; height: 8.4rem; overflow: hidden; padding: 0.6rem 0.8rem;
  background: #F4F4F5; border-radius: 0.5rem; font-family: "IBM Plex Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem; line-height: 1.35rem; color: #27272A;
}

#toast {
  position: absolute; left: 50%; top: 6.6rem; width: 46rem; margin-left: -23rem;
  padding: 1rem 1.4rem; background: #0A0A0A; color: #FFFFFF; border-radius: 0.6rem;
  font-size: 1.15rem; line-height: 1.45; text-align: center;
}
