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

:root {
  --yellow:   #f0b429;
  --yellow-d: #d49a1a;
  --bg:       #0b0f1a;
  --bg2:      #111827;
  --bg3:      #1a2236;
  --text:     #f0f0f0;
  --muted:    rgba(255,255,255,.45);
  --line:     rgba(255,255,255,.08);
  --radius:   10px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,15,26,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 62px;
}

.nav-logo {
  font-size: 17px; font-weight: 700; letter-spacing: .12em;
  color: var(--yellow); text-transform: uppercase;
}
.nav-logo span { color: var(--text); }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

.nav-btn {
  background: var(--yellow); color: #0b0f1a;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 700; letter-spacing: .02em;
  padding: 9px 20px; cursor: pointer; transition: background .15s;
}
.nav-btn:hover { background: var(--yellow-d); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1fr 360px;
  gap: 48px; align-items: start;
  padding: 72px 28px 60px;
  max-width: 1100px; margin: 0 auto;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(240,180,41,.12); color: var(--yellow);
  border: 1px solid rgba(240,180,41,.25);
  border-radius: 20px; font-size: 12px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 5px 14px; margin-bottom: 20px;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -.02em; margin-bottom: 8px;
}
.hero h1 em { color: var(--yellow); font-style: normal; display: block; }

.hero-tagline {
  font-size: clamp(20px, 3vw, 28px); font-weight: 700;
  color: var(--muted); letter-spacing: .1em;
  margin-bottom: 24px;
}

.hero-desc { color: var(--muted); font-size: 16px; max-width: 440px; margin-bottom: 36px; }

.hero-stats { display: flex; gap: 32px; margin-bottom: 36px; }
.hero-stat-val {
  font-size: 32px; font-weight: 800; color: var(--yellow);
  line-height: 1;
}
.hero-stat-lbl { font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: .03em; }

.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--yellow); color: #0b0f1a;
  border: none; border-radius: 10px;
  font-size: 16px; font-weight: 700; padding: 14px 28px;
  cursor: pointer; transition: background .15s, transform .1s;
  text-decoration: none;
}
.hero-cta:hover { background: var(--yellow-d); transform: translateY(-1px); text-decoration: none; }
.hero-cta-arrow { font-size: 20px; }

/* ── Leaderboard (hero right) ────────────────────────────────────────── */
.hot-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.hot-card-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.hot-card-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.hot-card-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 6px var(--yellow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; } 50% { opacity: .4; }
}

.hot-row {
  display: grid; grid-template-columns: 52px 1fr auto;
  align-items: center; gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  transition: background .15s;
}
.hot-row:first-of-type { border-top: none; }
.hot-row:hover { background: rgba(255,255,255,.03); }

.hot-thumb {
  width: 52px; height: 52px; border-radius: 8px;
  overflow: hidden; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 22px; flex-shrink: 0;
}
.hot-thumb img { width: 100%; height: 100%; object-fit: cover; }

.hot-name { font-size: 14px; font-weight: 600; }
.hot-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.hot-meta em {
  color: var(--yellow); font-style: normal;
  font-weight: 700; font-size: 10px;
  letter-spacing: .05em; text-transform: uppercase;
}
.hot-val { font-size: 16px; font-weight: 700; color: var(--yellow); white-space: nowrap; }

/* ── Section ─────────────────────────────────────────────────────────── */
.section { max-width: 1100px; margin: 0 auto; padding: 48px 28px; }
.section-divider { border: none; border-top: 1px solid var(--line); }

.section-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}

/* ── Species tabs ────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tab {
  background: var(--bg3); border: 1px solid var(--line);
  border-radius: 8px; color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 7px 18px;
  cursor: pointer; transition: all .15s; white-space: nowrap;
  text-decoration: none;
}
.tab:hover { border-color: rgba(255,255,255,.2); color: var(--text); text-decoration: none; }
.tab.active {
  background: var(--yellow); border-color: var(--yellow);
  color: #0b0f1a;
}

/* ── Topplista table ─────────────────────────────────────────────────── */
.gl-table-wrap { overflow-x: auto; }
.gl-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.gl-table thead th {
  text-align: left; font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); padding: 0 16px 12px;
}
.gl-table tbody tr {
  border-top: 1px solid var(--line);
  transition: background .12s;
}
.gl-table tbody tr:hover { background: rgba(255,255,255,.03); }
.gl-table td { padding: 14px 16px; }
.gl-table .td-rank { color: var(--muted); font-size: 13px; font-weight: 600; width: 36px; }
.gl-table .td-rank.gold   { color: #f0b429; }
.gl-table .td-rank.silver { color: #9db4c0; }
.gl-table .td-rank.bronze { color: #cd7f32; }
.gl-table .td-img { width: 44px; padding: 10px 0 10px 16px; }
.gl-table .td-img-thumb {
  width: 40px; height: 40px; border-radius: 6px;
  object-fit: cover; background: var(--bg3);
}
.gl-table .td-name { font-weight: 600; }
.gl-table .td-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.gl-table .td-val { font-size: 16px; font-weight: 700; color: var(--yellow); white-space: nowrap; }
.gl-table .td-date { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ── Form ────────────────────────────────────────────────────────────── */
.form-wrap {
  max-width: 680px; margin: 0 auto; padding: 60px 28px;
}
.form-hero { margin-bottom: 48px; }
.form-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.form-hero p { color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.field input, .field select, .field textarea {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text);
  font-size: 15px; padding: 12px 14px;
  outline: none; transition: border-color .15s;
  font-family: inherit;
  -webkit-appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--yellow);
}
.field textarea { resize: vertical; min-height: 100px; }
.field select option { background: var(--bg2); }

.field-upload-wrap {
  background: var(--bg2); border: 2px dashed var(--line);
  border-radius: 8px; padding: 28px;
  text-align: center; cursor: pointer; transition: border-color .15s;
  position: relative;
}
.field-upload-wrap:hover { border-color: rgba(240,180,41,.4); }
.field-upload-wrap input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  border: none; padding: 0;
}
.upload-icon { font-size: 28px; color: var(--muted); margin-bottom: 8px; }
.upload-label { font-size: 14px; color: var(--muted); }
.upload-label strong { color: var(--yellow); }

.form-submit {
  display: flex; align-items: center; gap: 14px; margin-top: 8px;
}
.btn-primary {
  background: var(--yellow); color: #0b0f1a;
  border: none; border-radius: 10px;
  font-size: 16px; font-weight: 700; padding: 14px 32px;
  cursor: pointer; transition: background .15s;
}
.btn-primary:hover { background: var(--yellow-d); }
.form-note { font-size: 13px; color: var(--muted); }

.alert {
  border-radius: 8px; padding: 14px 18px;
  font-size: 14px; margin-bottom: 24px;
}
.alert-success { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.25); color: #34d399; }
.alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.25);  color: #f87171; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  text-align: center; padding: 32px 28px;
  color: var(--muted); font-size: 13px;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ── Empty state ─────────────────────────────────────────────────────── */
.empty {
  text-align: center; padding: 60px 20px;
  color: var(--muted); font-size: 15px;
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 48px 20px 40px; }
  .nav-links { display: none; }
  .nav { padding: 0 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 36px 20px; }
  .hero-stats { gap: 20px; }
}
