/* ===== SHARED DESIGN SYSTEM — used by leaderboard.html & caller.html ===== */

/* Font Faces */
@font-face {
  font-family: 'Proxima Nova';
  src: url('fonts/Proxima Nova Font.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Neue Montreal';
  src: url('fonts/NeueMontreal-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Neue Montreal';
  src: url('fonts/NeueMontreal-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Neue Montreal';
  src: url('fonts/NeueMontreal-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Reset & Variables */
* { margin: 0; padding: 0; box-sizing: border-box; }
input, button, select, textarea { font-family: var(--font-body); }
:root {
  --bg: #0A0A0A;
  --bg-1000: #0C0D0F;
  --bg-800: #1A1D21;
  --bg-700: #22262B;
  --bg-600: #2A2F36;
  --border: #1E2228;
  --text-white: #FFFFFF;
  --text-secondary: #A0A6B1;
  --text-third: #6B7280;
  --green: #00FFA3;
  --green-end: #95F785;
  --gold: #FFB020;
  --gold-end: #FFE252;
  --red: #FF4D4D;
  --font-body: 'Proxima Nova', 'Inter', -apple-system, sans-serif;
  --font-heading: 'Neue Montreal', 'Proxima Nova', sans-serif;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-white);
  line-height: 1.5;
}

/* ===== INNER CONTAINER ===== */
.inner { max-width: 1256px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}
.navbar .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-left { display: flex; align-items: center; gap: 8px; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.social-icons { display: flex; align-items: center; gap: 12px; }
.nav-right a.social { display: flex; color: var(--text-third); font-size: 18px; text-decoration: none; transition: color 0.2s; }
.nav-right a.social:hover { color: var(--text-secondary); }
.nav-right .nav-link { color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-right .nav-link:hover { color: var(--text-white); }

/* ===== BUTTONS ===== */
.btn-green {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 4px;
  background: linear-gradient(135deg, var(--green), var(--green-end));
  color: #000; font-size: 14px; font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
}
.btn-green:hover { opacity: 0.9; }
.btn-gold {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 4px;
  background: linear-gradient(135deg, var(--gold), var(--gold-end));
  color: #000; font-size: 12px; font-weight: 800;
  text-decoration: none; border: none; cursor: pointer;
}
.btn-gold:hover { filter: brightness(0.9); }
.btn-copy {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 4px;
  background: var(--bg-800); color: var(--text-white);
  font-size: 12px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s;
  text-decoration: none;
}
.btn-copy:hover { background: var(--bg-700); }

/* ===== PERIOD PILLS ===== */
.period-pills { display: flex; gap: 4px; }
.period-pill {
  padding: 8px 16px; border-radius: 4px;
  font-size: 14px; font-weight: 600;
  border: none; background: var(--bg-800);
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.2s; font-family: var(--font-body);
}
.period-pill:hover { background: var(--bg-700); color: var(--text-white); }
.period-pill.active {
  background: var(--text-white); color: var(--bg);
}

/* ===== TABLE ===== */
.left-col { min-width: 0; }
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.table-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
}
.table-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 500;
}
.table-title .icon { font-size: 20px; }
.lb-thead, .lb-tbody, #tableBody {
  display: contents;
}
.lb-thead-inner {
  display: grid; grid-column: 1 / -1;
  grid-template-columns: subgrid;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}
.lb-th {
  font-size: 12px; font-weight: 500; color: var(--text-third);
  padding: 0 8px; line-height: 16px;
  letter-spacing: 0.02em; text-align: left;
}
.lb-row {
  display: grid; grid-column: 1 / -1;
  grid-template-columns: subgrid;
  padding: 0 8px; align-items: center;
  background: var(--bg); border-radius: 8px;
  margin-bottom: 1px; min-height: 56px;
  transition: background 0.15s; position: relative;
}
.lb-row:hover { background: #131517; }
.lb-cell { padding: 8px; font-size: 14px; text-align: left; }
.lb-token-name {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 600;
  justify-content: flex-start;
}
.lb-token-name img { width: 16px; height: 16px; border-radius: 50%; }
.lb-token-name a { color: var(--text-white); text-decoration: none; }
.lb-token-name a:hover { text-decoration: underline; }
.lb-token-time { font-size: 12px; color: var(--text-secondary); }
.lb-entry { font-size: 14px; color: var(--text-secondary); }
.lb-peak { font-size: 14px; color: var(--text-white); }
.lb-mult { font-size: 16px; font-weight: 600; color: var(--green); }
.lb-called-by {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px;
  background: linear-gradient(90deg, #00ffa3, #95f785);
  color: #0c0d0f; font-size: 12px; font-weight: 600;
  line-height: 16px; white-space: nowrap; border-radius: 4px;
}
.lb-called-by img { width: 16px; height: 16px; flex-shrink: 0; }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.side-card {}
.side-title {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 0; font-family: var(--font-heading);
  font-size: 20px; font-weight: 500;
}
.side-title .icon { font-size: 20px; }
.side-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px; border-bottom: 1px solid var(--border);
  gap: 8px; position: relative; border-radius: 8px;
}
.side-row:last-child { border-bottom: none; }
.side-row.has-called-by { border-bottom: 1px solid rgba(0, 255, 163, 0.4); }
.side-row .lb-called-by {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-size: 12px; padding: 2px 6px;
}
.side-row-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.side-row-rank { font-size: 14px; font-weight: 600; color: var(--text-third); width: 20px; text-align: center; flex-shrink: 0; }
.side-row-info { min-width: 0; }
.side-token {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 600; color: var(--text-white);
  line-height: 20px;
}
.side-token img { width: 16px; height: 16px; border-radius: 50%; }
.side-token a { color: var(--text-white); text-decoration: none; }
.side-token a:hover { text-decoration: underline; }
.side-mcap { font-size: 12px; color: var(--text-secondary); line-height: 16px; }
.side-date { font-size: 11px; color: var(--text-third); }
.side-row-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.side-mult { font-size: 14px; font-weight: 700; color: var(--green); }
.side-row.gold-border {
  border: 1px solid #d78800;
  border-radius: 6px; padding: 10px; margin: 4px -4px;
  position: relative; overflow: hidden;
  box-shadow: 0 0 12px rgba(255,216,72,0.6);
}
.side-row.gold-border::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: url('assets/Containerglow.png') center/cover no-repeat;
  border-radius: 6px;
}
.side-row.gold-border::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: rgba(12,13,15,0.2);
  border-radius: 6px;
}
.side-row.gold-border > * { position: relative; z-index: 1; }

/* Groups sidebar */
.side-group-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.side-group-row:last-child { border-bottom: none; }
.side-group-left { display: flex; align-items: center; gap: 8px; }
.side-group-avatar {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--bg-600); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
}
.side-group-avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-group-name { font-size: 14px; font-weight: 600; color: var(--text-white); }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.footer .inner {
  display: flex; align-items: center; justify-content: space-between;
}
.footer-left { font-size: 12px; color: var(--text-third); }
.footer-socials { display: flex; align-items: center; gap: 12px; }
.footer-socials a { color: var(--text-third); font-size: 16px; text-decoration: none; }
.footer-socials a:hover { color: var(--text-secondary); }
.footer-right { font-size: 12px; color: var(--text-third); }

/* ===== LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-800) 25%, var(--bg-600) 50%, var(--bg-800) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-600); border-radius: 2px; }

/* ===== SHARED RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-right .nav-link { display: none; }
  .nav-right { gap: 12px; }
  .btn-green { padding: 8px 14px; font-size: 13px; }
  .table-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer .inner { flex-direction: column; gap: 16px; text-align: center; }
}
@media (max-width: 480px) {
  .social-icons { gap: 8px; }
  .nav-right { gap: 8px; }
  .btn-green { padding: 6px 10px; font-size: 12px; }
  .btn-green img { width: 16px; height: 16px; }
  .nav-left img { height: 36px !important; }
  .period-pill { padding: 6px 10px; font-size: 13px; }
  .side-title { font-size: 18px; }
}
