/* $LOOT — shared dApp styles across Home / Dashboard / Explorer / Protocol */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #050603;
  --bg-elevated: #0c0f06;
  --bg-panel: #0a0d05;
  --gold: #a7c704;
  --gold-bright: #c2e108;
  --gem: #6b8a02;
  --gem-bright: #d4ff2a;
  --text: #f4f6ec;
  --text-dim: #8a9270;
  --text-faint: #5a6048;
  --border: rgba(167, 199, 4, 0.16);
  --border-bright: rgba(167, 199, 4, 0.4);
  --red: #ff5c5c;
  --mono: 'JetBrains Mono', 'SF Mono', 'Roboto Mono', monospace;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  min-height: 100%;
}

body {
  position: relative;
  padding-bottom: 60px;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 600px at 50% -10%, rgba(167,199,4,0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 100%, rgba(107,138,2,0.06), transparent 60%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- NAV ---------- */
#site-nav {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(5,6,3,0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(167,199,4,0.4));
}
.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 7px;
  transition: all 0.15s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(167,199,4,0.06); }
.nav-links a.active { color: var(--gold-bright); background: rgba(167,199,4,0.1); }
.nav-x {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.nav-x:hover { border-color: var(--border-bright); background: rgba(167,199,4,0.06); }

@media (max-width: 720px) {
  .nav-inner { flex-wrap: wrap; gap: 12px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; }
  .nav-brand span { display: none; }
}

/* ---------- SHARED PAGE LAYOUT ---------- */
.page {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px;
}
.page-header { margin-bottom: 36px; }
.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.page-sub {
  font-size: 14.5px;
  color: var(--text-dim);
  max-width: 560px;
  line-height: 1.55;
}

/* ---------- PANELS / CARDS ---------- */
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--mono);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.stat-value.accent { color: var(--gold-bright); }
.stat-sub {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 6px;
}

/* ---------- TABLES (ranking / round history) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data-table thead th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
table.data-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(167,199,4,0.08);
  color: var(--text);
}
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover { background: rgba(167,199,4,0.04); }
.mono { font-family: var(--mono); }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.pill.locked { background: rgba(255,92,92,0.1); color: var(--red); border: 1px solid rgba(255,92,92,0.25); }
.pill.idle { background: rgba(167,199,4,0.1); color: var(--gold-bright); border: 1px solid rgba(167,199,4,0.25); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13.5px;
  font-style: italic;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover:not(:disabled) { border-color: var(--border-bright); background: rgba(167,199,4,0.06); }
.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0d05;
}
.btn-primary:hover:not(:disabled) { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* footer */
footer.site-footer {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 40px auto 0;
  padding: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site-footer a { color: var(--text-dim); text-decoration: none; }
footer.site-footer a:hover { color: var(--gold-bright); }
