/* ═══════════════════════════════════════════════════════════════════════
   LOL Catch Them — In-Game Styles (LOL brand)
   Matches games.lolonsol.lol landing exactly: yellow bg, comic typography,
   offset shadows, Dela Gothic One / DM Sans / Bangers / Permanent Marker.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --lol-yellow:  #FFDE34;
  --lol-gold:    #FBD771;
  --lol-pale:    #FFF6C8;
  --lol-dark:    #2F3846;
  --lol-darker:  #1E252E;
  --lol-white:   #FFFFFF;
  --lol-pink:    #FF69B4;
  --lol-red:     #F44336;
  --lol-green:   #4CAF50;
}

#game-canvas-wrap canvas {
  display: block; margin: 0 auto;
  touch-action: none; user-select: none;
}

/* ════════════════════════════════════════════════════════════════════════
   OVERLAYS — yellow LOL backdrop
   ════════════════════════════════════════════════════════════════════════ */
.game-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 10; padding: 20px; text-align: center;
  font-family: 'DM Sans', sans-serif;
}
.game-overlay.hidden { display: none; }

/* Background scrolling LOL text in overlays — matches landing aesthetic */
.game-overlay::before {
  content: 'LOL LOL LOL LOL LOL';
  position: absolute; top: 8%; left: -10%;
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 5rem; opacity: 0.05;
  white-space: nowrap; pointer-events: none;
  color: var(--lol-dark); letter-spacing: -0.04em;
  transform: rotate(-4deg);
}
.game-overlay::after {
  content: '😂 GAMES 😂';
  position: absolute; bottom: 6%; right: -5%;
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 4rem; opacity: 0.07;
  white-space: nowrap; pointer-events: none;
  color: var(--lol-dark); letter-spacing: -0.02em;
  transform: rotate(3deg);
}

/* ── Start screen ── */
#go-start { background: var(--lol-yellow); }

.game-title {
  font-family: 'Dela Gothic One', cursive;
  font-size: clamp(28px, 7vw, 42px);
  color: var(--lol-dark); line-height: 0.95;
  margin-bottom: 6px;
  position: relative; z-index: 2;
}
.game-subtitle {
  font-family: 'Permanent Marker', cursive;
  font-size: 14px; color: var(--lol-dark); opacity: 0.7;
  margin-bottom: 12px;
  position: relative; z-index: 2;
}
.game-daily-best {
  font-family: 'Bangers', cursive;
  font-size: 18px; color: var(--lol-dark);
  background: var(--lol-white);
  border: 2px solid var(--lol-dark);
  border-radius: 100px; padding: 4px 16px;
  letter-spacing: 0.04em; margin-bottom: 14px;
  min-height: 24px;
  box-shadow: 3px 3px 0 var(--lol-dark);
  position: relative; z-index: 2;
}
.game-daily-best:empty { display: none; }

.game-input {
  background: var(--lol-white);
  border: 3px solid var(--lol-dark);
  border-radius: 12px;
  color: var(--lol-dark);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; font-weight: 600;
  padding: 12px 18px; width: 240px;
  text-align: center; outline: none;
  margin-bottom: 8px;
  box-shadow: 4px 4px 0 var(--lol-dark);
  transition: transform 0.1s, box-shadow 0.1s;
  position: relative; z-index: 2;
}
.game-input:focus {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--lol-dark);
}
.game-input::placeholder { color: rgba(47,56,70,0.4); }
.game-input.input-error  { border-color: var(--lol-red); }
.game-input.input-ok     { border-color: var(--lol-green); }

.g-username-msg {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
  min-height: 16px; margin-top: -2px; margin-bottom: 14px;
  position: relative; z-index: 2;
  color: var(--lol-dark);
}
.g-username-msg.msg-error   { color: var(--lol-red); }
.g-username-msg.msg-ok      { color: var(--lol-green); }
.g-username-msg.msg-loading { color: var(--lol-dark); opacity: 0.6; }

/* ════════════════════════════════════════════════════════════════════════
   COMIC BUTTONS — offset shadow, hover lift
   ════════════════════════════════════════════════════════════════════════ */
.game-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px; border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 800; letter-spacing: 0.3px;
  cursor: pointer; border: 2px solid var(--lol-dark);
  transition: transform 0.12s, box-shadow 0.12s;
  text-decoration: none;
}
.game-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--lol-dark) !important; }

.game-btn-primary {
  background: var(--lol-dark);
  color: var(--lol-yellow);
  box-shadow: 4px 4px 0 var(--lol-darker);
}
.game-btn-primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--lol-darker);
}

.game-btn-secondary {
  background: var(--lol-white);
  color: var(--lol-dark);
  box-shadow: 4px 4px 0 var(--lol-dark);
}
.game-btn-secondary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--lol-dark);
}

.game-btn-danger {
  background: var(--lol-red);
  color: var(--lol-white);
  border-color: var(--lol-darker);
  box-shadow: 4px 4px 0 #b71c1c;
}
.game-btn-danger:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #b71c1c;
}

.game-btn-twitter {
  background: #000;
  color: #fff;
  border-color: var(--lol-darker);
  box-shadow: 4px 4px 0 var(--lol-darker);
}
.game-btn-twitter:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--lol-darker);
}

.game-btn-tg {
  background: #229ED9;
  color: var(--lol-white);
  border-color: #1c7ca8;
  box-shadow: 4px 4px 0 #1c7ca8;
}
.game-btn-tg:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #1c7ca8;
}

.game-btn-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  justify-content: center; margin-top: 6px;
  position: relative; z-index: 2;
}

/* ════════════════════════════════════════════════════════════════════════
   GAME OVER
   ════════════════════════════════════════════════════════════════════════ */
#go-over { background: var(--lol-yellow); }

.go-new-best {
  font-family: 'Bangers', cursive;
  font-size: 22px; color: var(--lol-dark);
  background: var(--lol-yellow);
  border: 3px solid var(--lol-dark);
  border-radius: 100px;
  padding: 5px 20px; letter-spacing: 0.06em;
  margin-bottom: 10px;
  box-shadow: 4px 4px 0 var(--lol-dark);
  animation: lol-best-bounce 1.2s ease-in-out infinite;
  position: relative; z-index: 2;
}
@keyframes lol-best-bounce {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50%      { transform: rotate(3deg)  scale(1.05); }
}

.go-rekt {
  font-family: 'Dela Gothic One', cursive;
  font-size: clamp(36px, 9vw, 52px);
  color: var(--lol-red);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-shadow: 4px 4px 0 var(--lol-dark);
  transform: rotate(-2deg);
  position: relative; z-index: 2;
  animation: rekt-shake 0.4s ease-out;
}
@keyframes rekt-shake {
  0%   { transform: rotate(-2deg) translateY(-30px) scale(0.5); opacity: 0; }
  60%  { transform: rotate(-2deg) translateY(8px)  scale(1.1); opacity: 1; }
  100% { transform: rotate(-2deg) translateY(0)    scale(1); opacity: 1; }
}

.go-score-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 800;
  color: var(--lol-dark); opacity: 0.6;
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 4px;
  position: relative; z-index: 2;
}
.go-score-val {
  font-family: 'Bangers', cursive;
  font-size: clamp(36px, 9vw, 50px);
  color: var(--lol-dark);
  letter-spacing: 0.04em;
  background: var(--lol-white);
  border: 3px solid var(--lol-dark);
  border-radius: 14px;
  padding: 6px 24px;
  margin-bottom: 8px;
  box-shadow: 5px 5px 0 var(--lol-dark);
  position: relative; z-index: 2;
}
.go-rank {
  font-family: 'Permanent Marker', cursive;
  font-size: 14px;
  color: var(--lol-dark);
  margin-bottom: 14px;
  min-height: 18px;
  position: relative; z-index: 2;
}
.go-rank:not(:empty)::before { content: '🏆 '; }

/* ════════════════════════════════════════════════════════════════════════
   PAUSE
   ════════════════════════════════════════════════════════════════════════ */
#go-paused { background: rgba(47,56,70,0.85); }

.paused-panel {
  background: var(--lol-yellow);
  border: 3px solid var(--lol-dark);
  border-radius: 18px;
  padding: 28px 32px;
  text-align: center;
  box-shadow: 6px 6px 0 var(--lol-darker);
  position: relative; z-index: 2;
}
.paused-title {
  font-family: 'Dela Gothic One', cursive;
  font-size: 30px; color: var(--lol-dark);
  letter-spacing: 0.04em; margin-bottom: 6px;
}
.paused-hint {
  font-family: 'Permanent Marker', cursive;
  font-size: 13px; color: var(--lol-dark); opacity: 0.7;
  margin-bottom: 18px;
}

/* ════════════════════════════════════════════════════════════════════════
   LEADERBOARD
   ════════════════════════════════════════════════════════════════════════ */
#go-leaderboard { background: var(--lol-yellow); overflow-y: auto; }

.lb-panel {
  background: var(--lol-white);
  border: 3px solid var(--lol-dark);
  border-radius: 18px;
  padding: 22px 24px;
  width: 100%; max-width: 360px;
  box-shadow: 6px 6px 0 var(--lol-dark);
  position: relative; z-index: 2;
}
.lb-title {
  font-family: 'Dela Gothic One', cursive;
  font-size: 16px; color: var(--lol-dark);
  letter-spacing: 0.04em; margin-bottom: 14px;
  text-align: center; line-height: 1.1;
}
.lb-divider {
  border: none;
  border-top: 2px dashed rgba(47,56,70,0.2);
  margin: 10px 0;
}

/* ── Tabs ── */
.lb-tabs { display: flex; gap: 8px; margin: 6px 0 10px; }
.lb-tab-btn {
  flex: 1; padding: 8px 0;
  border-radius: 8px;
  border: 2px solid var(--lol-dark);
  background: var(--lol-pale);
  color: var(--lol-dark);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: 2px 2px 0 var(--lol-dark);
}
.lb-tab-btn.active {
  background: var(--lol-dark);
  color: var(--lol-yellow);
  box-shadow: 3px 3px 0 var(--lol-darker);
  transform: translate(-1px, -1px);
}
.lb-tab-btn:hover:not(.active) {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--lol-dark);
}

.lb-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; color: var(--lol-dark);
  background: var(--lol-pale);
  border: 2px solid var(--lol-dark);
  border-radius: 10px;
  margin-bottom: 5px;
  animation: lb-slide-in 0.35s ease-out both;
}
@keyframes lb-slide-in {
  from { transform: translateX(-16px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.lb-row:nth-child(1)  { animation-delay: 0.04s }
.lb-row:nth-child(2)  { animation-delay: 0.08s }
.lb-row:nth-child(3)  { animation-delay: 0.12s }
.lb-row:nth-child(4)  { animation-delay: 0.16s }
.lb-row:nth-child(5)  { animation-delay: 0.20s }
.lb-row:nth-child(6)  { animation-delay: 0.24s }
.lb-row:nth-child(7)  { animation-delay: 0.28s }
.lb-row:nth-child(8)  { animation-delay: 0.32s }
.lb-row:nth-child(9)  { animation-delay: 0.36s }
.lb-row:nth-child(10) { animation-delay: 0.40s }

.lb-row.lb-me {
  background: var(--lol-yellow);
  border-color: var(--lol-dark);
  box-shadow: 3px 3px 0 var(--lol-dark);
  font-weight: 800;
}

.lb-rank {
  font-family: 'Bangers', cursive;
  width: 32px; font-size: 18px;
  color: var(--lol-dark); flex-shrink: 0;
  text-align: center;
}
.lb-row:nth-child(1) .lb-rank { color: #c9a800; font-size: 22px; }
.lb-row:nth-child(2) .lb-rank { color: #888;    font-size: 20px; }
.lb-row:nth-child(3) .lb-rank { color: #b87333; font-size: 20px; }

.lb-medal {
  width: 28px; font-size: 20px; flex-shrink: 0;
  text-align: center; line-height: 1;
}
.lb-name {
  flex: 1; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; text-align: left;
}
.lb-right {
  display: flex; flex-direction: column;
  align-items: flex-end; flex-shrink: 0; gap: 1px;
}
.lb-score {
  font-family: 'Bangers', cursive;
  font-weight: 700; color: var(--lol-dark);
  font-size: 15px; letter-spacing: 0.02em;
  white-space: nowrap;
}
.lb-level {
  font-size: 10px; font-weight: 700;
  color: var(--lol-dark); opacity: 0.55;
  white-space: nowrap; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lb-empty {
  font-family: 'Permanent Marker', cursive;
  color: var(--lol-dark); font-size: 14px;
  text-align: center; padding: 16px 0;
  opacity: 0.7;
}

/* ════════════════════════════════════════════════════════════════════════
   HELP
   ════════════════════════════════════════════════════════════════════════ */
#go-help { background: var(--lol-yellow); overflow-y: auto; }

.help-panel {
  background: var(--lol-white);
  border: 3px solid var(--lol-dark);
  border-radius: 18px;
  padding: 22px 24px;
  width: 100%; max-width: 380px;
  text-align: left;
  box-shadow: 6px 6px 0 var(--lol-dark);
  position: relative; z-index: 2;
}
.help-section { margin: 8px 0; }
.help-title {
  font-family: 'Dela Gothic One', cursive;
  font-size: 14px; color: var(--lol-dark);
  letter-spacing: 0.02em; margin-bottom: 8px;
  line-height: 1.1;
}
.help-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; color: var(--lol-dark);
  opacity: 0.75; line-height: 1.6;
}
.help-items { display: flex; flex-direction: column; gap: 7px; }
.help-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; color: var(--lol-dark);
  line-height: 1.5;
  background: var(--lol-pale);
  border: 2px solid var(--lol-dark);
  border-radius: 8px;
  padding: 8px 10px;
}
.help-item b { font-weight: 800; }
.hi-icon {
  font-size: 22px; flex-shrink: 0;
  width: 28px; text-align: center; line-height: 1;
}

/* ════════════════════════════════════════════════════════════════════════
   GAME SWITCHER PILLS — quick-jump to other games / hub
   Shown on start screen and game over screen. NOT during active gameplay.
   ════════════════════════════════════════════════════════════════════════ */
.game-switch-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  justify-content: center; margin-top: 16px;
  padding-top: 14px;
  border-top: 2px dashed rgba(47,56,70,0.18);
  position: relative; z-index: 2;
}
.game-switch-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 100px;
  font-family: 'DM Sans'; font-size: 11px; font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--lol-white); color: var(--lol-dark);
  border: 2px solid var(--lol-dark);
  box-shadow: 2px 2px 0 var(--lol-dark);
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
}
.game-switch-pill:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--lol-dark);
}
.game-switch-hub {
  background: var(--lol-dark) !important;
  color: var(--lol-yellow) !important;
  box-shadow: 2px 2px 0 var(--lol-darker) !important;
}
.game-switch-hub:active {
  box-shadow: 0 0 0 var(--lol-darker) !important;
}

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 500px) {
  .game-overlay { padding: 14px; }
  .help-panel, .lb-panel, .paused-panel { padding: 16px 18px; }
  .game-title { font-size: 26px; }
  .go-rekt    { font-size: 38px; }
  .go-score-val { font-size: 36px; padding: 5px 18px; }
  .game-btn { padding: 10px 16px; font-size: 12px; }
  .game-switch-pill { padding: 5px 10px; font-size: 10px; }
}
