@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --bg: #0F1117;
  --bg2: #181B24;
  --card: #1E2130;
  --card2: #252A3A;
  --border: rgba(255,255,255,0.07);
  --gold: #F5C842;
  --gold2: #E8A820;
  --rust: #E8603A;
  --green: #2ECC71;
  --blue: #4A90D9;
  --text: #FFFFFF;
  --text2: rgba(255,255,255,0.6);
  --text3: rgba(255,255,255,0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 64px;
  --bot-h: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  min-height: fit-content;
  padding-top: var(--nav-h);
  padding-bottom: calc(var(--bot-h) + 16px);
  overflow-x: hidden;
}
/* TOP NAV */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 900; color: var(--text);
  text-decoration: none;
}
.logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav-btn {
  background: var(--gold); color: var(--bg);
  border: none; border-radius: 20px;
  padding: 8px 14px; font-size: 13px; font-weight: 800;
  cursor: pointer; text-decoration: none;
  display: flex; align-items: center; gap: 4px;
  font-family: 'Nunito', sans-serif;
}
.nav-icon-btn {
  width: 38px; height: 38px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text); text-decoration: none;
  border: none;
}

/* BOTTOM NAV */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: var(--bot-h);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 8px;
}
.bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none; color: var(--text3);
  font-size: 10px; font-weight: 700;
  flex: 1; padding: 8px 0;
  position: relative;
}
.bnav-item.active { color: var(--gold); }
.bnav-icon { font-size: 22px; line-height: 1; }
.bnav-badge {
  position: absolute; top: 4px; right: calc(50% - 18px);
  background: var(--rust); color: white;
  font-size: 10px; font-weight: 800;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.bnav-center {
  width: 50px; height: 50px;
  background: var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 10px;
  box-shadow: 0 4px 20px rgba(245,200,66,0.4);
  text-decoration: none; flex-shrink: 0; color: var(--bg);
  font-weight: 900;
}

/* PAGE */
.page { padding: 16px; max-width: 600px; margin: 0 auto; }

@media (min-width: 900px) {
  .page { max-width: 1400px; padding: 16px 40px; }
}

/* SECTION */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title { font-size: 18px; font-weight: 900; }
.section-link { font-size: 13px; color: var(--gold); font-weight: 700; text-decoration: none; }

/* CARD */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* BUTTONS */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 50px; cursor: pointer;
  font-family: 'Nunito', sans-serif; font-weight: 800;
  transition: transform .15s, opacity .15s;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-dark { background: var(--card2); color: var(--text); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-green { background: var(--green); color: white; }
.btn-rust { background: var(--rust); color: white; }
.btn-lg { padding: 16px 28px; font-size: 16px; width: 100%; }
.btn-md { padding: 12px 20px; font-size: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* TAGS */
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 50px;
  font-size: 12px; font-weight: 800;
}
.tag-gold { background: rgba(245,200,66,0.15); color: var(--gold); }
.tag-green { background: rgba(46,204,113,0.15); color: var(--green); }
.tag-rust { background: rgba(232,96,58,0.15); color: var(--rust); }
.tag-blue { background: rgba(74,144,217,0.15); color: var(--blue); }

/* INPUT */
.input {
  width: 100%; background: var(--card2);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: 'Nunito', sans-serif;
  font-size: 15px; padding: 13px 16px; outline: none;
  transition: border-color .2s;
}
.input:focus { border-color: var(--gold); }
.input::placeholder { color: var(--text3); }

/* CHIPS */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 50px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--card); color: var(--text2);
  display: flex; align-items: center; gap: 6px;
  transition: all .2s; white-space: nowrap;
}
.chip.active { background: var(--gold); color: var(--bg); border-color: var(--gold); }

/* STAT ROW */
.stat-row { display: flex; gap: 1px; }
.stat-box {
  flex: 1; background: var(--card2);
  padding: 14px 8px; text-align: center;
}
.stat-box:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stat-box:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stat-num { font-size: 22px; font-weight: 900; color: var(--gold); }
.stat-lbl { font-size: 11px; color: var(--text3); font-weight: 700; margin-top: 2px; }

/* BACK HEADER */
.back-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; text-decoration: none; color: var(--text);
}
.back-title { font-size: 20px; font-weight: 900; }

/* LOADING SPINNER */
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  animation: spin .8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* EMPTY STATE */
.empty {
  text-align: center; padding: 60px 20px;
  color: var(--text3);
}
.empty-icon { font-size: 60px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 800; color: var(--text2); margin-bottom: 8px; }
.empty-desc { font-size: 14px; line-height: 1.6; }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 300; display: none; align-items: flex-end;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: var(--bg2); border-radius: 24px 24px 0 0;
  padding: 24px 20px 40px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal-handle {
  width: 40px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 0 auto 20px;
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .4s ease both; }

/* SUPABASE CONFIG */
.sb-config {
  display: none;
  --url: 'https://ncmzfaszaowiynzjdefb.supabase.co';
  }
