/* StrawberryBench Leaderboard — Dark Neon Theme */

:root {
  --bg-primary: #09090f;
  --bg-secondary: #0f0f1a;
  --bg-card: #13131f;
  --bg-card-hover: #1a1a2e;
  --accent-red: #ff4d6d;
  --accent-pink: #ff85a1;
  --accent-teal: #00f5d4;
  --accent-purple: #b388ff;
  --accent-gold: #ffd700;
  --accent-silver: #c0c0c0;
  --accent-bronze: #cd7f32;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #555577;
  --border: #1e1e3a;
  --border-glow: #ff4d6d44;
  --score-high: #00f5a0;
  --score-mid: #ffd43b;
  --score-low: #ff6b6b;
  --radius: 12px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-red); border-radius: 3px; }

/* ── Header ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem 3rem;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, #ff4d6d22 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff4d6d' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-logo {
  font-size: 5rem;
  line-height: 1;
  filter: drop-shadow(0 0 30px #ff4d6d88);
  animation: float 4s ease-in-out infinite;
  display: inline-block;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ff4d6d, #ff85a1, #b388ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.5rem 0 0.75rem;
}

.hero-tagline {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-badges {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid;
  text-decoration: none;
  transition: all 0.2s;
}

.badge-dataset  { background: #ffd70015; border-color: #ffd70044; color: #ffd700; }
.badge-paper    { background: #ff4d6d15; border-color: #ff4d6d44; color: var(--accent-red); }
.badge-github   { background: #b388ff15; border-color: #b388ff44; color: var(--accent-purple); }

.badge:hover { transform: translateY(-2px); filter: brightness(1.2); }

/* ── Stats Banner ── */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-card {
  background: var(--bg-secondary);
  padding: 1.5rem 1rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-teal);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

/* ── Main Layout ── */
main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-title span {
  color: var(--accent-red);
}

/* ── Controls ── */
.controls {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
}

.search-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  outline: none;
  width: 180px;
  transition: border-color 0.15s;
}

.search-input:focus { border-color: var(--accent-red); }
.search-input::placeholder { color: var(--text-muted); }

/* ── Leaderboard Table ── */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 40px #ff4d6d0a;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 2;
}

th {
  padding: 1rem 0.7rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}

th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--accent-pink); }
th.sort-asc::after  { content: ' ↑'; color: var(--accent-red); }
th.sort-desc::after { content: ' ↓'; color: var(--accent-red); }

th.numeric { text-align: right; }

td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--bg-card-hover); }

/* ── Rank Badge ── */
.rank {
  font-weight: 800;
  font-size: 1rem;
  width: 2rem;
  text-align: center;
}

.rank-1 { color: var(--accent-gold); text-shadow: 0 0 12px #ffd70066; }
.rank-2 { color: var(--accent-silver); }
.rank-3 { color: var(--accent-bronze); }
.rank-other { color: var(--text-muted); }

/* ── Model Info ── */
.model-name {
  font-weight: 600;
  color: var(--text-primary);
}

.model-provider {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

/* ── Score Bar ── */
.score-cell { text-align: right; }

.score-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: flex-end;
}

.score-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.88rem;
  min-width: 3.2rem;
  text-align: right;
}

.score-high { color: var(--score-high); }
.score-mid  { color: var(--score-mid); }
.score-low  { color: var(--score-low); }

.bar-bg {
  width: 40px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-high { background: linear-gradient(90deg, #00c8a0, #00f5d4); }
.bar-mid  { background: linear-gradient(90deg, #e6b800, #ffd43b); }
.bar-low  { background: linear-gradient(90deg, #cc2222, #ff6b6b); }

/* ── Strawberry Badge ── */
.strawberry-check {
  font-size: 1.1rem;
  text-align: center;
  cursor: help;
}

/* ── Strategy Tag ── */
.strategy-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.strategy-zero_shot   { background: #00f5d415; color: var(--accent-teal); }
.strategy-few_shot    { background: #b388ff15; color: var(--accent-purple); }
.strategy-chain_of_thought { background: #ffd43b15; color: #ffd43b; }

/* ── About Section ── */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

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

.about-card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.about-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.about-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; }

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent-pink);
}

/* ── Difficulty Key ── */
.difficulty-key {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.diff-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.diff-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

.diff-easy   { background: var(--score-high); }
.diff-medium { background: var(--score-mid); }
.diff-hard   { background: var(--score-low); }
.diff-sentence { background: var(--accent-purple); }

/* ── Section Divider ── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 3rem 0;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--accent-teal);
  color: var(--accent-teal);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  pointer-events: none;
  z-index: 100;
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ── Footer ── */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

footer a { color: var(--accent-pink); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .bar-bg { display: none; }
  th:nth-child(n+5), td:nth-child(n+5) { display: none; }
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.table-wrapper { animation: fadeInUp 0.5s ease-out; }
.about-card    { animation: fadeInUp 0.5s ease-out both; }
.about-card:nth-child(2) { animation-delay: 0.1s; }
.about-card:nth-child(3) { animation-delay: 0.2s; }
.about-card:nth-child(4) { animation-delay: 0.3s; }
