/* HAPAX Legomenemon — dark broadcast look.
   One dominant accent (amber), near-black blue ground, huge display type
   for the lot and the money, tabular numerals everywhere a number moves.
   Red exists ONLY for timer urgency, green ONLY for money — colour is
   meaning, not decoration. */

:root {
  --bg: #0a0d13;
  --surface: #131824;
  --surface-2: #1b2231;
  --edge: #232c3f;
  --ink: #f2f4f8;
  --ink-2: #9aa3b5;
  --ink-3: #5b6474;
  --accent: #f0a63a;
  --accent-hi: #ffc24d;
  --danger: #e5484d;
  --money: #37b26c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
}

.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 18px 22px; }

/* ── header ── */
.topbar {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0 16px; border-bottom: 1px solid var(--edge);
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.brand {
  font-weight: 900; letter-spacing: .04em; font-size: 20px;
  text-transform: uppercase;
}
.brand .accent { color: var(--accent); }
.topbar .meta { color: var(--ink-2); font-size: 13px; }

/* ── hero lot ── */
.hero {
  background: linear-gradient(180deg, var(--surface) 0%, #10141d 100%);
  border: 1px solid var(--edge); border-radius: 14px;
  padding: 26px 30px; text-align: center; position: relative;
  overflow: hidden;
}
.hero .nominated { color: var(--ink-3); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.hero .player {
  font-weight: 900; line-height: .95; letter-spacing: -.01em;
  font-size: clamp(40px, 7vw, 92px); text-transform: uppercase; margin: 8px 0 4px;
}
.hero .postag {
  display: inline-block; font-weight: 700; font-size: 15px;
  color: var(--ink-2); letter-spacing: .18em; text-transform: uppercase;
}
.pricebar {
  display: flex; justify-content: center; align-items: baseline;
  gap: 26px; margin-top: 14px; flex-wrap: wrap;
}
.price {
  font-weight: 900; color: var(--accent-hi);
  font-size: clamp(48px, 8vw, 110px); line-height: 1;
  text-shadow: 0 0 40px rgba(240, 166, 58, .25);
}
.leader { text-align: left; }
.leader .lab { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.leader .who { font-weight: 900; font-size: clamp(22px, 3vw, 40px); text-transform: uppercase; }

/* ── timer ── */
.timerblock { margin-top: 18px; }
.clock {
  font-weight: 900; font-size: clamp(40px, 6vw, 76px); line-height: 1;
}
.clock.warn { color: var(--danger); animation: pulse .5s infinite alternate; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.07); } }
.tbar {
  height: 10px; background: var(--surface-2); border-radius: 6px;
  margin: 10px auto 0; max-width: 640px; overflow: hidden;
}
.tbar .fill {
  height: 100%; background: var(--accent);
  border-radius: 6px; transition: width .2s linear;
}
.tbar .fill.warn { background: var(--danger); }
.paused-tag {
  display: inline-block; margin-top: 8px; padding: 3px 14px; border-radius: 6px;
  background: var(--danger); color: #fff; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; font-size: 13px;
}

/* ── ledger ── */
.ledger { margin-top: 14px; color: var(--ink-2); font-size: 14px;
          display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.ledger b { color: var(--ink); }

/* ── layout ── */
.cols { display: grid; grid-template-columns: 2.2fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface); border: 1px solid var(--edge);
  border-radius: 12px; padding: 16px 18px;
}
.panel h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink-3); margin-bottom: 10px; font-weight: 700;
}

/* ── scoreboard ── */
table.score { width: 100%; border-collapse: collapse; }
table.score th {
  text-align: right; font-size: 11px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-3); padding: 4px 8px; font-weight: 700;
}
table.score th:first-child { text-align: left; }
table.score td {
  padding: 7px 8px; border-top: 1px solid var(--edge);
  text-align: right; font-size: 16px;
}
table.score td:first-child { text-align: left; font-weight: 700; }
table.score td.money { color: var(--money); font-weight: 900; font-size: 19px; }
table.score tr.leading td { background: rgba(240, 166, 58, .07); }
table.score tr.me td:first-child { color: var(--accent-hi); }
.dollar-chip {
  font-size: 10px; background: var(--danger); color: #fff; border-radius: 4px;
  padding: 1px 6px; margin-left: 6px; letter-spacing: .06em; vertical-align: 2px;
}

/* ── rotation ── */
.rota { display: flex; flex-wrap: wrap; gap: 8px; }
.rota .m {
  padding: 6px 12px; background: var(--surface-2); border-radius: 8px;
  color: var(--ink-2); font-weight: 600; font-size: 14px;
  border: 1px solid transparent;
}
.rota .m.up {
  color: #111; background: var(--accent); font-weight: 900;
  border-color: var(--accent-hi);
}

/* ── buttons and inputs ── */
button {
  font-family: inherit; font-weight: 700; border: none; cursor: pointer;
  border-radius: 9px; font-size: 16px; transition: transform .05s;
}
button:active { transform: scale(.96); }
.bid-btn {
  background: var(--accent); color: #14100a; padding: 16px 0; width: 100%;
  font-size: 22px; font-weight: 900;
}
.bid-btn:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
.ghost {
  background: var(--surface-2); color: var(--ink); padding: 10px 16px;
  border: 1px solid var(--edge);
}
.danger-btn { background: var(--danger); color: #fff; padding: 10px 16px; }
input[type=text], input[type=number], input[type=password] {
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--edge);
  border-radius: 8px; padding: 11px 12px; font-size: 17px; font-family: inherit;
  width: 100%;
}
input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; }

/* ── banners / toasts ── */
.maxbanner {
  background: rgba(240, 166, 58, .12); border: 1px solid var(--accent);
  color: var(--accent-hi); border-radius: 10px; padding: 10px 14px;
  font-weight: 700; margin-bottom: 12px;
}
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--danger); color: #fff; font-weight: 700;
  padding: 12px 22px; border-radius: 10px; z-index: 60; font-size: 15px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}

/* ── sold overlay ── */
.sold-overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  background: rgba(8, 10, 15, .92); backdrop-filter: blur(3px);
  animation: soldin .25s ease-out;
}
@keyframes soldin { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; } }
.sold-overlay .stamp {
  font-size: clamp(60px, 12vw, 150px); font-weight: 900; color: var(--accent);
  letter-spacing: .06em; transform: rotate(-4deg);
  border: 6px solid var(--accent); border-radius: 18px; padding: 4px 34px;
  text-transform: uppercase; animation: stamp .3s cubic-bezier(.2, 2.2, .4, 1);
}
@keyframes stamp { from { transform: rotate(-4deg) scale(2.2); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
.sold-overlay .detail { margin-top: 20px; font-size: clamp(22px, 3.4vw, 40px); font-weight: 900; text-transform: uppercase; }
.sold-overlay .joke { margin-top: 14px; color: var(--ink-2); font-size: clamp(16px, 2.2vw, 24px); max-width: 900px; }

/* ── login ── */
.login-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 640px; margin: 30px auto; }
@media (max-width: 700px) { .login-grid { grid-template-columns: repeat(2, 1fr); } }
.login-grid .m {
  background: var(--surface); border: 1px solid var(--edge); color: var(--ink);
  padding: 22px 0; font-size: 18px; font-weight: 900; text-transform: uppercase;
}
.login-grid .m.sel { background: var(--accent); color: #14100a; }

/* ── results ── */
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.teams-grid table { width: 100%; border-collapse: collapse; font-size: 14px; }
.teams-grid td { padding: 4px 6px; border-top: 1px solid var(--edge); }
.teams-grid td:last-child { text-align: right; font-weight: 700; }

.search-hit {
  display: flex; justify-content: space-between; padding: 9px 10px;
  border-top: 1px solid var(--edge); cursor: pointer; font-size: 15px;
}
.search-hit:hover, .search-hit.sel { background: var(--surface-2); }
.search-hit .pos { color: var(--ink-3); }

.endbanner {
  background: var(--accent); color: #14100a; font-weight: 900; text-align: center;
  padding: 14px; border-radius: 12px; font-size: 22px; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 16px;
}

.av { border-radius: 50%; vertical-align: middle; object-fit: cover;
      background: #1a2030; flex: none; }
