/* Benchmark modal a HUD */
/* Bez diakritiky v kodu a komentarich. Viditelne texty smi diakritiku obsahovat. */

.pill { cursor: pointer; user-select: none; pointer-events: auto; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.pill:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(10, 186, 181, 0.35); }

/* Backdrop pres canvas */
#bench-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#bench-modal.visible { display: flex; }

.bench-card {
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: rgba(10, 14, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 20px 22px;
  color: #fff;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.bench-card h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: #0abab5;
}
.bench-card .sub { color: rgba(255,255,255,0.6); margin-bottom: 14px; font-size: 12px; }
.bench-card .close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  opacity: 0.7;
}
.bench-card .close:hover { opacity: 1; }
.bench-card .wrap { position: relative; }

.bench-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #c9d0ee;
}
.bench-stats .big {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #fff;
}
.bench-stats .big .v { font-size: 28px; font-weight: 700; }
.bench-stats .big .u { color: rgba(255,255,255,0.55); font-size: 12px; }
.bench-stats .row { display: flex; justify-content: space-between; gap: 8px; }
.bench-stats .row .k { color: rgba(255,255,255,0.55); }
.bench-stats canvas { grid-column: 1 / -1; width: 100%; height: 36px; display: block; }

.bench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.bench-actions button,
.bench-actions input[type="text"] {
  font: inherit;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #fff;
}
.bench-actions input[type="text"] { flex: 1; min-width: 140px; }
.bench-actions input[type="text"]::placeholder { color: rgba(255,255,255,0.4); }
.bench-actions button { cursor: pointer; }
.bench-actions button.primary {
  background: #0abab5;
  border-color: #0abab5;
  color: #000;
  font-weight: 600;
}
.bench-actions button:hover { opacity: 0.9; }
.bench-actions button:disabled { opacity: 0.5; cursor: not-allowed; }

.bench-results {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #c9d0ee;
  white-space: pre;
  min-height: 1em;
}
.bench-msg {
  margin-top: 10px;
  font-size: 13px;
  min-height: 1em;
}
.bench-msg.ok { color: #0abab5; }
.bench-msg.err { color: #ff7a7a; }

.bench-board {
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
}
.bench-board h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0.02em;
}
.bench-board table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.bench-board th,
.bench-board td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #d4d8eb;
}
.bench-board th { color: rgba(255,255,255,0.55); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.bench-board td.score { font-family: ui-monospace, Menlo, Consolas, monospace; color: #0abab5; font-weight: 600; }
.bench-board td.rank { width: 28px; color: rgba(255,255,255,0.55); }
.bench-board td.gpu { color: rgba(255,255,255,0.55); font-size: 11px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 480px) {
  .bench-card { padding: 16px 14px; font-size: 13px; }
  .bench-stats .big .v { font-size: 22px; }
  .bench-board td.gpu { display: none; }
  .bench-board th.gpu { display: none; }
}
