/* PauseJeu Solo SDK — overlay styles
 * Self-contained: no dependency on sdk.css
 * Included by solo games for intro/result overlays
 */

/* ── Base overlay ────────────────────────────────────────────────────────────── */

.pjs-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(20, 12, 5, 0.72);
  backdrop-filter: blur(5px);
  z-index: 300;
  animation: pjs-fadeIn 0.3s ease;
}
.pjs-overlay.pjs-hidden { display: none; }

@keyframes pjs-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pjs-box {
  background: #faf6ee;
  border-radius: 18px;
  padding: 32px 36px 28px;
  max-width: 440px;
  width: 92%;
  text-align: center;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.4);
  animation: pjs-slideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes pjs-slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Intro box ───────────────────────────────────────────────────────────────── */

.pjs-intro-box {
  max-width: 480px;
  padding: 36px 40px 32px;
}

.pjs-logo {
  font-size: 52px;
  margin-bottom: 8px;
}

.pjs-game-title {
  font-size: 26px;
  color: #3d2706;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.pjs-tagline {
  font-size: 14px;
  color: #a07840;
  margin-bottom: 20px;
}

.pjs-rules-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pjs-rules-list li {
  font-size: 14px;
  color: #5a3e1b;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
  padding: 8px 12px;
  background: rgba(106, 170, 94, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(106, 170, 94, 0.18);
}

.pjs-rule-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.pjs-play-btn {
  width: 100%;
  padding: 13px 24px;
  background: linear-gradient(135deg, #6aaa5e, #4e8c3f);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  letter-spacing: 0.5px;
  font-family: inherit;
}
.pjs-play-btn:hover  { filter: brightness(1.08); }
.pjs-play-btn:active { transform: scale(0.98); }

/* ── Result box ──────────────────────────────────────────────────────────────── */

.pjs-trophy {
  font-size: 48px;
  margin-bottom: 10px;
}

.pjs-result-title {
  font-size: 22px;
  color: #3d2706;
  margin-bottom: 6px;
  font-weight: 700;
}

.pjs-score-detail {
  font-size: 15px;
  color: #7a5230;
  margin-bottom: 20px;
  min-height: 20px;
}

/* ── Submit section ──────────────────────────────────────────────────────────── */

.pjs-submit-label {
  font-size: 13px;
  color: #6b4c22;
  margin-bottom: 10px;
}

.pjs-input-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.pjs-pseudo-input {
  flex: 1;
  padding: 9px 14px;
  border: 2px solid #d4b87a;
  border-radius: 10px;
  font-size: 14px;
  color: #3d2706;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.pjs-pseudo-input:focus { border-color: #8b6432; }

.pjs-submit-btn {
  padding: 9px 18px;
  background: #6aaa5e;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}
.pjs-submit-btn:hover    { background: #5a9a4e; }
.pjs-submit-btn:active   { transform: scale(0.97); }
.pjs-submit-btn:disabled { background: #aaa; cursor: default; }

.pjs-submit-error {
  color: #c0392b;
  font-size: 12px;
  margin-top: 8px;
}

/* ── Leaderboard ─────────────────────────────────────────────────────────────── */

.pjs-lb-section { margin-top: 20px; }

.pjs-lb-title {
  font-size: 15px;
  color: #5a3e1b;
  margin-bottom: 10px;
  border-bottom: 1px solid #e0d0b0;
  padding-bottom: 6px;
}

.pjs-lb-loading {
  font-size: 13px;
  color: #aaa;
  padding: 12px 0;
}

.pjs-lb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 220px;
  overflow-y: auto;
  text-align: left;
}

.pjs-lb-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
  color: #4a3010;
  gap: 8px;
}
.pjs-lb-list li:last-child { border-bottom: none; }
.pjs-lb-list li.pjs-me {
  background: #f0e8cf;
  border-radius: 8px;
  font-weight: bold;
  color: #3d2706;
}

.pjs-lb-rank  { color: #aaa; font-size: 11px; min-width: 24px; }
.pjs-lb-name  { flex: 1; }
.pjs-lb-score { font-variant-numeric: tabular-nums; color: #6aaa5e; }

.pjs-no-scores {
  font-size: 13px;
  color: #aaa;
  padding: 12px 0;
}

/* ── Home link ───────────────────────────────────────────────────────────────── */

.pjs-home-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 12px;
  color: #a07840;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.pjs-home-link:hover { opacity: 1; }
