/* ---------- base ---------- */
* { box-sizing: border-box; }

:root {
  --bg: #0e0f12;
  --panel: #16181d;
  --panel-2: #1d2027;
  --text: #e8e8ea;
  --muted: #8b8e95;
  --accent: #6aa9ff;
  --good: #6dc36d;
  --bad: #e26b6b;
  --border: rgba(255, 255, 255, 0.08);
  --banner-max-w: 493px;
  --banner-aspect: 493 / 96;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

/* ---------- picker (banner = dropdown trigger) ---------- */
.picker {
  position: relative;
  width: 100%;
  max-width: var(--banner-max-w);
  aspect-ratio: var(--banner-aspect);
  margin: 8px auto;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  cursor: pointer;
}

/* the visible banner sits underneath, fills the picker */
.banner-display {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;       /* clicks pass through to the select */
}
.banner-display img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* synthetic player banner */
.banner-display.player {
  background: linear-gradient(90deg, var(--panel-2) 0%, var(--panel) 100%);
}
.banner-display.player .avatar {
  height: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-color: var(--panel-2);
  flex-shrink: 0;
}
.banner-display.player .name {
  flex: 1;
  padding: 0 16px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* native select sits on top, fully transparent. Clicking the
   picker = clicking the select = native dropdown opens. */
.banner-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  font-size: 16px;            /* prevents iOS zoom on focus */
}

.chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--muted);
  pointer-events: none;
}

/* ---------- main content ---------- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 12px 32px;
}

#content-header { margin-bottom: 16px; }
#content-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  color: var(--muted);
}
#content-title strong { color: var(--text); font-weight: 600; }

.rec-section { margin-bottom: 24px; }
.rec-section h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 600;
}
.rec-section[data-section="avoid"] h2 { color: var(--bad); }

.op-table-head, .op-row {
  display: grid;
  grid-template-columns: 1fr 56px 56px 48px 48px;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
}

.op-table-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.op-table-head span:not(:first-child) { text-align: right; }

.op-row {
  background: var(--panel);
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 14px;
}
.op-row .op-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.op-row .op-cell img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--panel-2);
}
.op-row .op-cell .op-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.op-row span:not(.op-cell) { text-align: right; font-variant-numeric: tabular-nums; }
.op-row .wr.good { color: var(--good); }
.op-row .wr.bad  { color: var(--bad); }
.op-row .entry.pos { color: var(--good); }
.op-row .entry.neg { color: var(--bad); }

.empty-msg {
  color: var(--muted);
  font-style: italic;
  padding: 6px 12px;
  margin: 0;
  display: none;
}
.rec-section.empty .empty-msg { display: block; }
.rec-section.empty .op-list   { display: none; }

@media (min-width: 600px) {
  main { padding: 24px 16px 48px; }
  .op-row, .op-table-head { padding: 8px 14px; }
}
