/* =========================================================
   THOMZY.com — Games window styles
   ========================================================= */

/* ---- Games window body ---- */
.games-body {
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  color: #d0d0d0;
}

/* ---- Create section ---- */
.games-create {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  padding: 10px;
}

.games-create-title,
.games-lobby-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8080a0;
  margin-bottom: 8px;
}

.games-bet-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.games-bet-label {
  color: #f0c040;
  font-size: 12px;
}

.games-bet-input {
  width: 70px;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
  color: #f0c040;
  font-size: 12px;
  padding: 3px 6px;
  text-align: center;
}
.games-bet-input:focus { outline: 1px solid #f0c040; }

.games-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.games-create-btn {
  flex: 1;
  font-size: 12px;
  padding: 6px 8px;
}

/* ---- Lobby list ---- */
.games-lobby {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.games-lobby-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.games-lobby-row:last-of-type { border-bottom: none; }

.games-lobby-info { flex: 1; font-size: 12px; }

.games-join-btn   { font-size: 11px; padding: 3px 8px; }
.games-refresh-btn { font-size: 11px; margin-top: 6px; align-self: flex-start; }

.games-waiting-tag {
  font-size: 11px;
  color: #8080a0;
  font-style: italic;
}

.games-empty {
  color: #5a5a7a;
  font-style: italic;
  font-size: 12px;
  text-align: center;
  padding: 6px 0;
}

/* ---- Active game ---- */
.games-active-title {
  font-size: 13px;
  font-weight: 700;
  color: #e8e8ff;
  margin-bottom: 8px;
}

.games-bet-tag {
  font-size: 11px;
  color: #f0c040;
  margin-left: 6px;
}

.games-turn-label {
  font-size: 12px;
  color: #a0a0c0;
  margin-bottom: 10px;
}

.games-waiting {
  color: #8080a0;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
}

/* ---- RPS ---- */
.games-rps-choices {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px 0;
}

.games-rps-btn {
  font-size: 18px;
  padding: 12px 16px;
  flex: 1;
  min-width: 90px;
  transition: transform .1s, box-shadow .1s;
}
.games-rps-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(240,192,64,.5);
}

/* ---- TTT grid ---- */
.games-ttt-grid {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows:    repeat(3, 56px);
  gap: 4px;
  margin: 10px auto;
  width: fit-content;
}

.games-ttt-cell {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  transition: background .1s;
}

.games-ttt-cell.games-ttt-empty {
  cursor: pointer;
}
.games-ttt-cell.games-ttt-empty:hover {
  background: rgba(255,255,255,.12);
}

.games-ttt-cell.games-ttt-x { color: #60b8ff; border-color: #60b8ff44; }
.games-ttt-cell.games-ttt-o { color: #ff8060; border-color: #ff806044; }

/* ---- Result ---- */
.games-result {
  text-align: center;
  padding: 16px 8px;
  border-radius: 8px;
  border: 2px solid transparent;
}
.games-result.win  { border-color: #80ff80; background: rgba(64,192,64,.08); }
.games-result.lose { border-color: #ff8060; background: rgba(192,64,64,.08); }
.games-result.draw { border-color: #8080ff; background: rgba(64,64,192,.08); }

.games-result-emoji  { font-size: 36px; margin-bottom: 6px; }
.games-result-label  { font-size: 18px; font-weight: 700; color: #e8e8ff; margin-bottom: 8px; }
.games-result-moves  { display: flex; gap: 16px; justify-content: center; font-size: 20px; margin: 8px 0; }
.games-result-move   { font-weight: 700; }
.games-result-pot    { font-size: 13px; color: #f0c040; margin-top: 6px; }
.games-result-forfeit { font-size: 12px; color: #8080a0; margin-top: 4px; }

.games-back-btn    { margin-top: 12px; width: 100%; }
.games-forfeit-btn { margin-top: 10px; opacity: .6; font-size: 11px; }
.games-forfeit-btn:hover { opacity: 1; }

/* =========================================================
   Peggle canvas (rendered inside the games window body)
   ========================================================= */

#peggle-canvas,
.peggle-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 554px;
  cursor: crosshair;
  touch-action: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Waiting screen shown in the Games window body while opponent plays */
.peggle-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  text-align: center;
  color: #c0c0d0;
}

.peggle-waiting-score {
  font-size: 18px;
  font-weight: 700;
  color: #ffcc44;
}

.peggle-waiting-text {
  font-size: 13px;
  color: #aabbcc;
}

.peggle-waiting-sub {
  font-size: 11px;
  color: #667788;
}

/* ---- Games button in player bar ---- */
.btn-games {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-color: #f0c040;
  color: #f0c040;
}
.btn-games:hover {
  background: #f0c040;
  color: #1a1a2e;
}
