/* Angry Pigs — shell overlay */
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: #1a1630;
  color: #e8ecf4;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
#pg-wrap { position: relative; width: 100%; height: 100%; overflow: hidden; }
#canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.pg-overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center;
  padding: 16px; background: linear-gradient(transparent 40%, rgba(18,12,28,.88));
  pointer-events: none;
}
.pg-overlay[hidden] { display: none !important; }
.pg-panel {
  pointer-events: auto; width: min(420px, 100%); padding: 18px 20px 20px;
  border-radius: 16px; background: rgba(28, 22, 40, .94);
  border: 1px solid rgba(255, 160, 190, .22);
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
}
.pg-title { margin: 0 0 6px; font-size: 1.25rem; color: #ffb3d0; }
.pg-sub { margin: 0 0 14px; color: #b0a8c4; font-size: .92rem; }
.submit-row { display: flex; gap: 8px; margin-bottom: 8px; }
.text-input {
  flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25); color: #fff; font: inherit;
}
.btn-secondary {
  padding: 10px 16px; border-radius: 10px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #ff7aa8, #f43f6e); color: #fff; font-weight: 700;
}
.submit-status { min-height: 1.2em; font-size: .85rem; color: #ffb3d0; margin-bottom: 12px; }
.leaderboard-card { margin-bottom: 12px; }
.card-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: #8a8098; margin-bottom: 6px; }
.board-list { font-size: .88rem; }
.board-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.text-link { color: #ffb3d0; font-size: .88rem; }
.pg-panel-row { display: flex; justify-content: space-between; align-items: center; }
.btn-ghost {
  padding: 8px 14px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255,255,255,.18); color: #cfd6e4; font: inherit;
}
.btn-ghost:hover { border-color: rgba(255,180,200,.5); }
#pg-error { position: absolute; left: 16px; bottom: 16px; color: #f87171; font: 14px system-ui; z-index: 9; }
#pg-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,120,160,.25), transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(100,180,255,.2), transparent 45%),
    linear-gradient(160deg, #2a1f3d, #152238 55%, #1a3a2a);
  z-index: 8;
}
.pg-load-title {
  font-size: 2rem; font-weight: 800; letter-spacing: .28em; color: #ffb3d0;
  text-shadow: 0 0 28px rgba(255,120,160,.45);
}
.pg-load-track { width: min(320px, 70vw); height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
#pg-load-fill { width: 0%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ff7aa8, #ffd36a); transition: width .2s; }
#pg-load-text { color: #b0a8c4; font-size: .85rem; }
