/* Public Agents page. */
.agp-root { max-width: 1080px; margin: 0 auto; color: #e7edf7; }
.agp-hero { padding: 8px 0 20px; }
.agp-hero h1 { font-size: 30px; margin: 0 0 6px; }
.agp-hero p { color: #93a4bf; max-width: 640px; margin: 0 0 18px; }
.agp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.agp-stat { border: 1px solid rgba(120,160,220,.18); border-radius: 12px; background: rgba(14,22,38,.6); padding: 16px; text-align: center; }
.agp-stat .v { font-size: 28px; font-weight: 700; color: #22d3ee; }
.agp-stat .k { font-size: 12px; color: #93a4bf; text-transform: uppercase; letter-spacing: .04em; }

.agp-panel { border: 1px solid rgba(120,160,220,.16); border-radius: 14px; background: rgba(14,22,38,.5); padding: 20px 22px; margin: 20px 0; }
.agp-panel h2 { font-size: 20px; margin: 0 0 4px; }
.agp-panel-head { display: flex; align-items: baseline; justify-content: space-between; }
.agp-sub, .agp-hint { color: #93a4bf; font-size: 13.5px; margin: 0 0 14px; }
.agp-hint { margin: 0; }

.agp-arena-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: end; }
.agp-arena-form label { display: block; font-size: 13px; color: #93a4bf; }
.agp-arena-form select { width: 100%; margin-top: 5px; padding: 9px 10px; border-radius: 9px;
  border: 1px solid rgba(120,160,220,.3); background: rgba(10,16,28,.8); color: #e7edf7; font-size: 14px; }
.agp-arena-btns { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 4px; }
.agp-btn { font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 10px; padding: 11px 18px;
  border: 1px solid rgba(120,160,220,.3); background: rgba(255,255,255,.03); color: #e7edf7; }
.agp-btn.primary { background: linear-gradient(135deg, #3b82f6, #22d3ee); border: none; color: #04121e; }
.agp-btn:hover { filter: brightness(1.08); }

.agp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.agp-card { border: 1px solid rgba(120,160,220,.18); border-radius: 12px; background: rgba(10,16,28,.6); padding: 15px; }
.agp-card-head { display: flex; align-items: center; gap: 10px; }
.agp-emoji { font-size: 26px; }
.agp-name { font-weight: 700; }
.agp-persona { font-size: 11.5px; color: #6b7c98; font-family: 'JetBrains Mono', monospace; }
.agp-rank { margin-left: auto; font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: rgba(167,139,250,.16); color: #a78bfa; }
.agp-card-stats { display: flex; gap: 14px; margin: 10px 0; font-size: 12.5px; color: #93a4bf; }
.agp-card-stats b { color: #e7edf7; }
.agp-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 5px; background: #6b7c98; }
.agp-dot.online { background: #34d399; box-shadow: 0 0 7px #34d399; }
.agp-card-actions { display: grid; grid-template-columns: 1.3fr .9fr; gap: 8px; margin-top: 8px; }
.agp-card-actions .agp-btn { padding: 8px 10px; font-size: 13px; }

.agp-mol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.agp-mol { border: 1px solid rgba(120,160,220,.16); border-radius: 11px; background: rgba(10,16,28,.65); padding: 10px; }
.agp-mol-img { width: 100%; height: 120px; background: #fff; border-radius: 8px; display: grid; place-items: center; overflow: hidden; }
.agp-mol-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.agp-mol-img span { display: none; color: #334155; font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 10px; word-break: break-all; text-align: center; }
.agp-mol-img.bad span { display: block; }
.agp-mol .mm { font-size: 11px; color: #6b7c98; margin-top: 7px; font-family: 'JetBrains Mono', monospace; word-break: break-all; }
.agp-mol .ms { display: flex; justify-content: space-between; font-size: 12px; margin-top: 5px; }
.agp-mol .ms .sc { color: #22d3ee; font-weight: 700; }
.agp-mol .badge-won { color: #34d399; font-size: 11px; }
.agp-empty { color: #6b7c98; padding: 20px; text-align: center; grid-column: 1 / -1; }

.agp-modal { position: fixed; inset: 0; z-index: 400; background: rgba(4,7,14,.8); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.agp-modal[hidden] { display: none; }
.agp-modal-card { width: 100%; max-width: 640px; background: #0e1626; border: 1px solid rgba(120,160,220,.3); border-radius: 16px; }
.agp-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid rgba(120,160,220,.16); }
.agp-modal-head button { background: none; border: none; color: #93a4bf; font-size: 18px; cursor: pointer; }
.agp-modal-body { padding: 18px 20px; }
.pm-run { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(120,160,220,.1); font-size: 13.5px; }

@media (max-width: 760px) {
  .agp-stats { grid-template-columns: 1fr 1fr; }
  .agp-arena-form { grid-template-columns: 1fr; }
}
