@import "chess.css?v=20260925h";
/* ============================================================
   BibleChess Online — lobby + game styles.
   Board, piece, and character-card visuals come from chess.css
   (imported above). This file holds only multiplayer UI.
   Design: calm, clean, uncrowded. Big touch targets (>=44px).
   ============================================================ */

.mp-wrap { max-width: 680px; margin: 0 auto; padding: 8px 16px 48px; }
.mp-wrap h1 { margin: 10px 0 2px; }
.mp-sub { color: #666; margin: 0 0 14px; max-width: 560px; }

/* ---------- tabs ---------- */
.mp-tabs { display: flex; gap: 8px; margin: 14px 0 20px; }
.mp-tab {
  flex: 1; padding: 13px 0; min-height: 48px;
  border: 2px solid #e4d9c2; border-radius: 12px;
  background: #fffdf7; color: #7a6a52;
  font-size: 1.05em; font-weight: 700; font-family: inherit;
  cursor: pointer;
}
.mp-tab.on { border-color: #2f7d4f; color: #2f7d4f; background: #f4faf5; }

/* ---------- lobby sections ---------- */
.mp-sec { margin: 22px 0; }
.mp-sec > h2 { font-size: 1.05em; margin: 0 0 4px; color: #2c2317; }
.mp-hint { color: #8a7a63; font-size: .88em; margin: 0 0 10px; }
.mp-name-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mp-name {
  flex: 1 1 200px; min-height: 48px;
  padding: 10px 14px; font-size: 1.05em;
  border: 2px solid #e4d9c2; border-radius: 10px;
  font-family: inherit; background: #fff;
}
.mp-rating { color: #8a7a63; font-size: .9em; white-space: nowrap; }

/* progression chip in the lobby */
.mp-level {
  display: flex; align-items: center; gap: 12px;
  background: #f7f3ea; border: 1px solid #e4d9c2;
  border-radius: 12px; padding: 12px 16px; margin: 4px 0 0;
}
.mp-level strong { color: #2c2317; }
.mp-level .mp-xp { font-size: .85em; color: #8a7a63; }
.mp-bar { flex: 1; height: 8px; background: #e8dcc4; border-radius: 6px; overflow: hidden; }
.mp-bar i { display: block; height: 100%; background: #c9a35c; border-radius: 6px; }

/* time controls */
.tc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-btn {
  flex: 1 1 100px; min-height: 48px; padding: 10px 6px;
  border: 2px solid #e4d9c2; border-radius: 10px;
  background: #fffdf7; font-family: inherit; cursor: pointer;
}
.tc-btn b { display: block; font-size: 1.05em; color: #2c2317; }
.tc-btn span { font-size: .78em; color: #8a7a63; }
.tc-btn.on { border-color: #2f7d4f; background: #f4faf5; }
.tc-btn.on b { color: #2f7d4f; }

/* primary actions — max two side by side, big and calm */
.mp-actions { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.mp-actions .btn { flex: 1 1 200px; min-height: 54px; font-size: 1.08em; }
.mp-linklike {
  background: none; border: 0; padding: 12px 4px; min-height: 44px;
  color: #2f7d4f; font-size: .95em; text-decoration: underline;
  cursor: pointer; font-family: inherit;
}

/* searching / waiting */
.mp-wait {
  text-align: center; background: #f7f3ea;
  border: 1px solid #e4d9c2; border-radius: 14px;
  padding: 26px 20px; margin: 20px 0;
}
.mp-wait h2 { margin: 0 0 6px; }
.mp-queue { color: #2f7d4f; font-weight: 600; margin: 8px 0 16px; }
.mp-spin {
  width: 34px; height: 34px; margin: 0 auto 12px;
  border: 4px solid #e4d9c2; border-top-color: #2f7d4f;
  border-radius: 50%; animation: mp-spin 1s linear infinite;
}
@keyframes mp-spin { to { transform: rotate(360deg); } }

/* friend share card */
.mp-share { background: #f7f3ea; border: 1px solid #e4d9c2; border-radius: 14px; padding: 22px 20px; margin: 20px 0; text-align: center; }
.mp-share h2 { margin: 0 0 4px; }
.mp-code {
  font-size: 1.6em; font-weight: 800; letter-spacing: .3em;
  color: #2c2317; margin: 10px 0;
}
.mp-linkbox {
  display: flex; gap: 8px; margin: 10px 0;
}
.mp-linkbox input {
  flex: 1; min-height: 48px; padding: 8px 12px;
  border: 1px solid #ddd; border-radius: 8px; font-size: .85em;
  background: #fff; color: #555; font-family: inherit;
}
.mp-share .mp-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.mp-share .mp-row .btn { min-height: 48px; }

/* join-by-code */
.mp-join { display: flex; gap: 8px; margin: 10px 0; }
.mp-join input {
  flex: 1; min-height: 48px; padding: 10px 14px;
  border: 2px solid #e4d9c2; border-radius: 10px;
  font-size: 1.1em; letter-spacing: .2em; text-transform: uppercase;
  font-family: inherit;
}
.mp-join .btn { min-height: 48px; }

/* ---------- membership upsell (calm card) ---------- */
.mp-upsell {
  background: #fffdf7; border: 2px solid #c9a35c; border-radius: 16px;
  padding: 26px 24px; margin: 24px 0; text-align: center;
  box-shadow: 0 8px 24px rgba(60,40,15,.08);
}
.mp-upsell h2 { margin: 0 0 6px; color: #2c2317; }
.mp-upsell .mp-price { font-size: 1.3em; color: #2f7d4f; font-weight: 800; margin: 4px 0 12px; }
.mp-upsell ul { list-style: none; padding: 0; margin: 0 0 18px; text-align: left; display: inline-block; }
.mp-upsell li { margin: 8px 0; color: #3d3226; }
.mp-upsell li::before { content: "\2713  "; color: #2f7d4f; font-weight: 800; }
.mp-upsell .btn { min-height: 54px; font-size: 1.05em; width: 100%; max-width: 340px; }
.mp-preview {
  display: inline-block; margin-top: 14px;
  font-size: .82em; color: #aaa; text-decoration: underline;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  min-height: 44px;
}

/* ---------- game screen ---------- */
.mp-game-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 2px; }
.mp-opp {
  display: flex; align-items: center; gap: 10px;
  background: #fffdf7; border: 1px solid #e4d9c2;
  border-radius: 12px; padding: 10px 14px; margin: 8px 0;
  position: relative;
}
.mp-opp .mp-opp-name { font-weight: 700; color: #2c2317; }
.mp-opp .mp-opp-rate { font-size: .85em; color: #8a7a63; }
.mp-tc-tag { font-size: .78em; color: #8a7a63; background: #f7f3ea; border-radius: 8px; padding: 3px 10px; }

.mp-clock {
  font-size: 1.9em; font-weight: 800; font-variant-numeric: tabular-nums;
  background: #1f3d2b; color: #fff; border-radius: 12px;
  padding: 8px 18px; min-width: 120px; text-align: center;
  letter-spacing: .04em;
}
.mp-clock.low { background: #a33b3b; }
.mp-clock-row { display: flex; justify-content: center; margin: 8px 0; }

.mp-board-wrap { position: relative; }
.mp-board-wrap .chess-board { margin: 0 auto; }
.mp-board-wrap.shake { animation: mp-shake .4s ease; }
@keyframes mp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-9px); }
  75% { transform: translateX(9px); }
}

.mp-status { text-align: center; font-weight: 700; min-height: 1.8em; margin: 10px 0 4px; font-size: 1.05em; }
.mp-result {
  text-align: center; background: #f7f3ea;
  border: 2px solid #c9a35c; border-radius: 14px;
  padding: 18px; margin: 12px 0;
}
.mp-result h2 { margin: 0 0 6px; }
.mp-result p { margin: 4px 0; color: #555; }

/* game buttons — calm row */
.mp-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.mp-btns .btn { min-height: 48px; }

/* preset chat */
.mp-chat-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 8px 0 4px; }
.mp-chat-btn {
  min-height: 44px; padding: 8px 14px;
  border: 1px solid #e4d9c2; border-radius: 20px;
  background: #fffdf7; color: #5a4c38;
  font-family: inherit; font-size: .9em; cursor: pointer;
}
.mp-chat-btn:active { background: #f4faf5; border-color: #2f7d4f; }
/* incoming chat bubble over the opponent's side */
.mp-chat-bubble {
  position: absolute; top: -8px; right: 10px;
  transform: translateY(-100%);
  background: #fff; border: 2px solid #c9a35c; border-radius: 14px;
  padding: 8px 14px; font-style: italic; color: #3d3226;
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
  animation: charpop .3s ease;
  max-width: 80%; z-index: 5;
  transition: opacity .5s ease;
}
.mp-chat-bubble.fade { opacity: 0; }

/* small toast (non-celebratory notices) */
.mp-toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%);
  background: #2c2317; color: #fff;
  border-radius: 12px; padding: 12px 20px;
  max-width: min(92vw, 420px); text-align: center;
  z-index: 2000; box-shadow: 0 8px 24px rgba(0,0,0,.3);
  animation: bc-toast-in .3s ease;
}

/* ---------- learn tab ---------- */
.mp-how { display: grid; gap: 10px; margin: 12px 0 26px; }
.mp-how-card {
  background: #fffdf7; border: 1px solid #e4d9c2;
  border-radius: 12px; padding: 14px 16px;
}
.mp-how-card h3 { margin: 0 0 4px; font-size: 1em; color: #2c2317; }
.mp-how-card p { margin: 0; color: #5a4c38; font-size: .92em; line-height: 1.5; }

.mp-lesson {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #e6e6e6; border-radius: 12px;
  padding: 12px 16px; margin: 8px 0;
  text-decoration: none; color: inherit; min-height: 48px;
  width: 100%; text-align: left; font-family: inherit; cursor: pointer;
}
button.mp-lesson { border: 1px solid #e6e6e6; }
.mp-lesson:hover { border-color: #2f7d4f; }
.mp-lnum {
  flex: 0 0 38px; height: 38px; border-radius: 50%;
  background: #2f7d4f; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.mp-lesson.advanced .mp-lnum { background: #c9a35c; }
.mp-lbody { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mp-lunit { font-size: .8em; color: #888; }
.mp-badge {
  font-size: .72em; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  background: #f7f3ea; color: #8a6d2f; border: 1px solid #c9a35c;
  border-radius: 10px; padding: 3px 10px; white-space: nowrap;
}
.mp-lgo { color: #2f7d4f; font-weight: 700; white-space: nowrap; }

.mp-puzzles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 26px; }
.mp-puzzle {
  background: #fffdf7; border: 1px solid #e4d9c2; border-radius: 10px;
  padding: 12px 10px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 4px; min-height: 44px;
}
.mp-puzzle:hover { border-color: #2f7d4f; }
.mp-puzzle strong { font-size: .88em; color: #2c2317; line-height: 1.3; }
.mp-puzzle .mp-kind { font-size: .72em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #2f7d4f; }
.mp-puzzle .mp-kind.tactic { color: #8a6d2f; }

.mp-group-title { font-size: .85em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a7a63; margin: 22px 0 6px; }

@media (min-width: 640px) {
  .mp-how { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .mp-clock { font-size: 1.6em; min-width: 104px; padding: 6px 14px; }
  .mp-actions .btn { flex: 1 1 100%; }
}
