/* Spotted (spotted.sylent.eu): styles.css
   Black like sylent.eu, Cheevio and dealium, the Geom font, and the gun sight's gold as the accent.
   1. Base  2. Top bar and footer  3. Player and numbers  4. Garage  5. Tank cards  6. Small screens */

/* 1. Base ---------------------------------------------------------------------------------------------- */
:root {
  --bg: #000;
  --panel: #070707;
  --panel-hover: #0d0d0d;
  --text: #f2f2f2;
  --text-soft: #a8a8a8;
  --text-muted: #6b6b6b;
  --line: #1f1f1f;
  --line-hover: #4a4a4a;
  --accent: #e6b450;   /* the gun sight's gold */
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  color: var(--text);
  font-family: "Geom", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
#app { width: min(100%, 72rem); flex: 1; }
.loading, .message { margin: 4rem 0; color: var(--text-muted); text-align: center; }
.section-title { margin: 0; color: var(--text-soft); font-size: 1rem; font-weight: 500; }

/* 2. Top bar and footer --------------------------------------------------------------------------------- */
.topbar {
  width: min(100%, 72rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.brand-mark { width: 2rem; height: 2rem; }
.topbar-link { color: var(--text-muted); font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.topbar-link:hover, .topbar-link:focus-visible { color: var(--text); outline: none; }
.footer { width: min(100%, 72rem); margin-top: 3rem; padding: 1.5rem 0 2rem; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 0.75rem; text-align: center; }
.footer p { margin: 0.3rem 0; }

/* 3. Player and numbers ------------------------------------------------------------------------------- */
.player { margin-top: 2rem; }
.player-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.player-name { margin: 0; font-size: 2rem; font-weight: 600; overflow-wrap: anywhere; }
.pill {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line-hover);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.pill--rating { border-color: rgba(230, 180, 80, 0.5); background: rgba(230, 180, 80, 0.1); color: var(--accent); cursor: help; font-variant-numeric: tabular-nums; }
.player-meta { margin: 0.4rem 0 0; color: var(--text-muted); font-size: 0.85rem; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; margin-top: 1.75rem; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--panel);
}
.stat[title] { cursor: help; }
.stat-value { font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-muted); font-size: 0.78rem; }

/* 4. Garage ---------------------------------------------------------------------------------------------- */
.garage { margin-top: 2.5rem; }
.garage-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.garage-count { color: var(--text-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.garage-controls { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}
.input:focus-visible { border-color: var(--line-hover); outline: none; }
select.input { cursor: pointer; }

/* 5. Tank cards ----------------------------------------------------------------------------------------- */
.tank-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.empty { grid-column: 1 / -1; padding: 2rem 0; color: var(--text-muted); text-align: center; }
.tank {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.7rem 0.9rem 0.7rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--panel);
  transition: border-color 0.2s, background 0.2s;
}
.tank:hover { border-color: var(--line-hover); background: var(--panel-hover); }
.tank--premium { border-color: rgba(230, 180, 80, 0.3); }
.tank-art {
  position: relative;
  align-self: start;
  aspect-ratio: 160 / 100;
  border-radius: 0.4rem;
  background: radial-gradient(ellipse at 50% 70%, #1a1a1a, #0a0a0a 70%);
}
.tank-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.tank-tier {
  position: absolute;
  left: 0.3rem;
  top: 0.25rem;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.tank-body { display: grid; gap: 0.3rem; min-width: 0; align-content: start; }
.tank-name { margin: 0; overflow: hidden; font-size: 0.95rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tank--premium .tank-name { color: var(--accent); }
.tank-info { margin: 0; color: var(--text-muted); font-size: 0.72rem; }
.tank-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; min-height: 1.25rem; }
.badge { padding: 0.1rem 0.5rem; border: 1px solid; border-radius: 999px; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.03em; white-space: nowrap; }
.badge--ace { border-color: rgba(230, 180, 80, 0.55); background: rgba(230, 180, 80, 0.12); color: var(--accent); }
.badge--first { border-color: rgba(200, 200, 210, 0.45); color: #d0d4da; }
.badge--second { border-color: rgba(200, 140, 80, 0.45); color: #d39a62; }
.badge--third { border-color: rgba(140, 140, 140, 0.4); color: #9a9a9a; }
/* Marks of excellence: three small stripes, lit as many as earned. */
.marks { display: inline-flex; gap: 0.15rem; cursor: help; }
.mark { width: 0.35rem; height: 0.85rem; border-radius: 0.1rem; background: #262626; transform: skewX(-15deg); }
.mark--on { background: var(--accent); box-shadow: 0 0 0.35rem rgba(230, 180, 80, 0.5); }
.tank-numbers { display: grid; grid-template-columns: repeat(4, auto); gap: 0.05rem 0.9rem; justify-content: start; margin: 0.15rem 0 0; }
.tank-numbers dt { grid-row: 1; color: var(--text-muted); font-size: 0.62rem; }
.tank-numbers dd { grid-row: 2; margin: 0; font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 6. Small screens -------------------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .garage-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .garage-controls .input[type="search"] { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  body { padding: 0 0.9rem; }
  .tank { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .player-name { font-size: 1.6rem; }
}
