/* ═══════════════════════════════════════════════════
   Maze Runner — ui.css
   Screen panels, buttons, tables, legend
════════════════════════════════════════════════════ */

/* ── Screen inner card ── */
.screen-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 36px;
  background: rgba(14, 14, 28, 0.96);
  border: 1px solid #1e2040;
  border-radius: 12px;
  max-width: 480px;
  width: 90vw;
  box-shadow: 0 0 60px rgba(68, 136, 255, 0.12), 0 0 120px rgba(0,0,0,0.6);
  text-align: center;
}

#maze-comments .ac-wrap {
  width: 100%;
  max-width: 100%;
  margin: 1.25rem 0 0;
}

#maze-comments .ac-textarea,
#maze-comments .ac-submit {
  width: 100%;
}

.screen-inner.compact {
  gap: 16px;
  padding: 32px 28px;
}

/* ── Title screen logo ── */
.screen-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.logo-sub {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: 4px;
  color: #7788aa;
}

.logo-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(36px, 8vw, 58px);
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1.0;
  background: linear-gradient(135deg, #55aaff 0%, #00ff99 60%, #ffbb00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.logo-tag {
  font-size: 11px;
  color: #7788aa;
  letter-spacing: 0.5px;
  max-width: 320px;
  line-height: 1.5;
}

/* ── Controls grid ── */
.screen-controls {
  width: 100%;
}

.controls-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  align-items: center;
  justify-items: start;
  width: fit-content;
  margin: 0 auto;
}

kbd {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  background: #161628;
  border: 1px solid #2a3060;
  border-radius: 4px;
  padding: 3px 8px;
  color: #99bbff;
  letter-spacing: 2px;
}

.controls-grid span {
  font-size: 11px;
  color: #7788aa;
}

/* ── Stat pills ── */
.screen-stats-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-pill {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  padding: 4px 12px;
  border: 1px solid #2a3060;
  border-radius: 20px;
  color: #7788aa;
  background: #0e0e1c;
}

/* ── Buttons ── */
.btn-primary {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 13px 36px;
  background: linear-gradient(135deg, #2255cc 0%, #4488ff 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  width: 100%;
  max-width: 280px;
}
.btn-primary:hover  { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 10px 28px;
  background: linear-gradient(135deg, #ff8844 0%, #ffbb00 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  width: 100%;
  max-width: 280px;
}
.btn-secondary:hover  { opacity: 0.9; transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-ghost {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  padding: 10px 28px;
  background: transparent;
  color: #7788aa;
  border: 1px solid #2a3060;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  width: 100%;
  max-width: 280px;
}
.btn-ghost:hover { background: #161628; color: #dde4ff; }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-link {
  font-size: 11px;
  color: #7788aa;
  text-decoration: none;
  font-family: 'Orbitron', monospace;
  letter-spacing: 1px;
  transition: color 0.2s;
}
.btn-link:hover { color: #dde4ff; }

/* ── Legend ── */
.screen-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.legend-item {
  font-size: 10px;
  color: #7788aa;
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend-item.trap  { color: #cc4444; }
.legend-item.loot  { color: #ffbb00; }
.legend-item.exit  { color: #00ff88; }

/* ── Floor summary & game over headings ── */
.screen-title-small {
  font-family: 'Orbitron', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #00ff88;
}

.screen-badge {
  font-family: 'Orbitron', monospace;
  font-size: 15px;
  letter-spacing: 2px;
  color: #4488ff;
}

/* ── Stat table ── */
.stat-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 280px;
}
.stat-table td {
  padding: 7px 12px;
  font-size: 12px;
  border-bottom: 1px solid #1a1a30;
}
.stat-table td:first-child { color: #7788aa; text-align: left; }
.stat-table td:last-child  { color: #dde4ff; text-align: right; font-family: 'Orbitron', monospace; font-size: 13px; }

/* ── Leaderboard table ── */
.lb-table {
  border-collapse: collapse;
  width: 100%;
}
.lb-table th {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: #7788aa;
  padding: 6px 10px;
  border-bottom: 1px solid #1e2040;
  text-align: left;
}
.lb-table td {
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid #111122;
  color: #dde4ff;
}
.lb-table tr:first-child td { color: #ffbb00; font-family: 'Orbitron', monospace; }
.lb-table tr:nth-child(2) td { color: #aabbcc; }
.lb-name { font-size: 10px; color: #7788aa !important; }
