/* Player-stats page. Visual design ported from the data analyst's app; scoped
   under main.stats so it overrides the generic site table styles. */

main.stats { max-width: none; }

.stats h2 { color: #38bdf8; font-weight: 600; margin: 10px 0 20px; }

.stats .box { background: #1e2230; padding: 22px; border-radius: 10px;
  border: 1px solid #2d3446; margin-bottom: 25px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.2), 0 2px 4px -1px rgba(0,0,0,.1); }
.stats .box h3 { margin-top: 0; color: #f1f5f9; border-bottom: 1px solid #2d3446;
  padding-bottom: 12px; font-weight: 600; }

.stats label { color: #94a3b8; margin-right: 10px; }
.stats select { padding: 12px; font-size: 16px; width: 320px; max-width: 100%;
  border-radius: 6px; background: #252b3e; color: #f8fafc;
  border: 1px solid #3d465e; cursor: pointer; outline: none;
  transition: border-color .2s; }
.stats select:focus { border-color: #38bdf8; }

.stats table { width: 100%; border-collapse: collapse; margin-top: 10px;
  background: #1e2230; }
.stats th, .stats td { padding: 12px 10px; text-align: left;
  border-bottom: 1px solid #2d3446; font-size: .9rem; }
.stats th { background: #181b26; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
  cursor: default; position: static; }
.stats td { color: #cbd5e1; }
.stats tr:last-child td { border-bottom: none; }
.stats tbody tr:hover td { background-color: #252b3e; color: #fff; }

/* History column sized to its content; the scoreboard takes the rest and
   scrolls inside its box when tight (minmax(0,..) lets it shrink). */
.stats .grid { display: grid; grid-template-columns: max-content minmax(0, 1fr);
  gap: 25px; align-items: start; }
@media (max-width: 1400px) { .stats .grid { grid-template-columns: 1fr; } }

.stats a { color: #38bdf8; text-decoration: none; font-weight: 500;
  transition: color .15s; }
.stats a:hover { color: #7dd3fc; text-decoration: underline; }

.stats .win { color: #4ade80; font-weight: bold; }
.stats .win-bg { background-color: rgba(74, 222, 128, .1); color: #4ade80;
  font-weight: 600; text-align: center; border-radius: 4px; padding: 4px 8px;
  display: inline-block; }
.stats .loss-bg { background-color: rgba(248, 113, 113, .1); color: #f87171;
  font-weight: 600; text-align: center; border-radius: 4px; padding: 4px 8px;
  display: inline-block; }

.stats .highlight-row td { background: #242e42; color: #38bdf8; font-weight: 500; }
.stats .text-muted { color: #64748b; font-style: italic; }
.stats .muted { color: #64748b; }
.stats .avg { color: #64748b; font-size: .85rem; }
.stats .cell-strong { color: #f1f5f9; font-weight: 700; }
.stats .queue-cell { color: #94a3b8; font-size: .85rem; }
.stats td.dmg { color: #f43f5e; }
.stats td.heal { color: #10b981; }
.stats td.obj { color: #eab308; }

.stats .meta-line { margin-bottom: 15px; color: #94a3b8; }
.stats .meta-line strong { color: #fff; }
.stats .meta-line .sep { color: #475569; margin: 0 8px; }
.stats .table-scroll { overflow-x: auto; }
