@font-face {
  font-family: "Inter-Black";
  src: url("../fonts/Inter-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter-Thin";
  src: url("../fonts/Inter-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-raised: #232f42;
  --border: #2d3a4f;
  --border-bright: #3b4b66;
  --accent: #8b5cf6;
  --accent-dim: #7c3aed;
  --accent-hover: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.22);
  --accent-border: rgba(139, 92, 246, 0.35);
  --accent-bg-soft: rgba(139, 92, 246, 0.08);
  --white: #f4f4f4;
  --muted: #94a3b8;
  --muted-dim: #64748b;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-display-black: "Inter-Black", var(--font-sans);
  --font-display-thin: "Inter-Thin", var(--font-sans);
  --radius: 12px;
  --max-width: 68rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--white);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.wrap {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.site-header img {
  height: 2rem;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.875rem;
}

.site-header nav a {
  color: var(--muted);
  font-weight: 500;
}

.site-header nav a:hover {
  color: var(--white);
}

.hero {
  padding: 3.5rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -15%;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-family: var(--font-display-black);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  line-height: 1.1;
}

.hero h1 em {
  font-family: var(--font-display-thin);
  font-weight: 100;
  font-style: normal;
  color: var(--accent-hover);
}

.hero-lead {
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

.privacy-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  background: var(--accent-bg-soft);
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.privacy-banner strong {
  color: var(--white);
}

.grid-2 {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.35rem;
}

.panel h2 {
  font-family: var(--font-display-black);
  font-weight: 900;
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.dropzone {
  border: 2px dashed var(--border-bright);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-bg-soft);
}

.dropzone input {
  display: none;
}

.dropzone p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dropzone .mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-dim);
  margin-top: 0.5rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.field-hint {
  margin: -0.15rem 0 0.5rem;
  font-size: 0.8rem;
  color: var(--muted-dim);
  line-height: 1.45;
}

.field-readonly {
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
}

.field-readonly strong {
  color: var(--white);
  font-weight: 500;
}

.field input,
.field select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font: inherit;
  color: var(--white);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  margin: 1rem 0;
}

.checkbox-row input {
  accent-color: var(--accent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #0f1419;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--border-bright);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.preview-card {
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--accent-bg-soft) 0%, var(--surface-raised) 55%);
  padding: 1.5rem;
  min-height: 14rem;
  position: relative;
  overflow: hidden;
}

.preview-card.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-dim);
  font-size: 0.9rem;
  border-style: dashed;
  background: var(--surface-raised);
}

.preview-card .tps {
  font-family: var(--font-display-black);
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  color: var(--accent-hover);
  margin: 0;
}

.preview-card .tps-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin: 0.25rem 0 1rem;
}

.preview-card .meta {
  display: grid;
  gap: 0.35rem;
  font-size: 0.875rem;
}

.preview-card .meta span {
  color: var(--muted);
}

.preview-card .meta strong {
  color: var(--white);
}

.preview-card .badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  color: var(--accent-hover);
}

.status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted-dim);
  margin-top: 0.75rem;
  min-height: 1.2em;
}

.status.ok {
  color: #c4b5fd;
}

.status.err {
  color: #f87171;
}

section.leaderboard {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--border);
}

section.leaderboard h2 {
  font-family: var(--font-display-black);
  font-weight: 900;
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.lb-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.15rem;
  transition: border-color 0.15s, transform 0.15s;
}

.lb-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.lb-card .rank {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-dim);
}

.lb-card .tps {
  font-family: var(--font-display-black);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--accent-hover);
  margin: 0.15rem 0;
}

.lb-card .name {
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.lb-card .model {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-all;
}

.lb-card .gh {
  font-size: 0.75rem;
  color: var(--muted-dim);
  margin-top: 0.5rem;
}

.empty-leaderboard {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 2rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.8125rem;
  color: var(--muted-dim);
}
