/* ==========================================================
   Canonical navbar styling (clean + organized + mobile drawer)
   Loaded AFTER each page's inline <style> to override drift.
   ========================================================== */

/* Performance: pause CSS animations when the tab is hidden (nav.js toggles this). */
html.anim-paused *, html.anim-paused *::before, html.anim-paused *::after {
  animation-play-state: paused !important;
}

header.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, rgba(10, 6, 4, 0.98) 0%, rgba(10, 6, 4, 0.88) 100%);
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, transparent, #8b6914 18%, #d4af37 50%, #8b6914 82%, transparent) 1;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.bar-content {
  width: min(100%, 1200px);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Brand (injected by nav.js) */
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #f4e4c1;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.95;
}

.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 18px rgba(212,175,55,0.18);
}

.nav-brand-text {
  display: inline-block;
  white-space: nowrap;
}

.navbar .links {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.navbar .links a {
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(244, 228, 193, 0.88);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.navbar .links a:hover {
  background: rgba(212, 175, 55, 0.10);
  border-color: rgba(212, 175, 55, 0.25);
  color: #d4af37;
  transform: translateY(-1px);
}

.navbar .links a.active,
.navbar .links a[aria-current="page"] {
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.35);
  color: #d4af37;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

/* Hide locked items in the top bar (they still show in the mobile drawer) */
.navbar .links a.inactive,
.navbar .links a[data-locked="true"] {
  display: none;
}

/* Stake CTA (still special, but not “chaotic”) */
.navbar .links a.stake-btn-nav {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.28) 0%, rgba(139, 105, 20, 0.22) 100%);
  border-color: rgba(212, 175, 55, 0.55);
  color: #ffd56a;
}

.navbar .links a.stake-btn-nav:hover {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.38) 0%, rgba(139, 105, 20, 0.28) 100%);
  border-color: rgba(212, 175, 55, 0.85);
}

/* Social (icons-only for cleanliness) */
.navbar .social {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.navbar .social a,
.navbar .social .x-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(139, 105, 20, 0.35);
  background: rgba(0,0,0,0.18);
  color: rgba(244, 228, 193, 0.9);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.navbar .social a:hover,
.navbar .social .x-badge:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.45);
  color: #d4af37;
  transform: translateY(-1px);
}

.navbar .social span,
.navbar .social .x-label { display: none; }

.navbar .icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  fill: currentColor;
  display: block;
}

/* Burger (injected by nav.js) */
.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(139, 105, 20, 0.35);
  background: rgba(0,0,0,0.18);
  color: #d4af37;
  cursor: pointer;
  flex: 0 0 auto;
}

.nav-burger:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.45);
}

.nav-burger-lines {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}

.nav-burger-lines span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 5000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.nav-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
}

.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(380px, 92vw);
  background: linear-gradient(180deg, rgba(20,10,5,0.98) 0%, rgba(10,6,4,0.98) 100%);
  border-left: 2px solid rgba(139,105,20,0.5);
  box-shadow: -14px 0 50px rgba(0,0,0,0.65);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.nav-drawer.open .nav-drawer-panel {
  transform: translateX(0);
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(139,105,20,0.25);
}

.nav-drawer-title {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 12px;
  color: #d4af37;
}

.nav-drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(139,105,20,0.35);
  background: rgba(0,0,0,0.18);
  color: rgba(244,228,193,0.9);
  cursor: pointer;
}

.nav-drawer-body {
  padding: 14px;
  overflow: auto;
}

.nav-section { margin-bottom: 16px; }
.nav-section-title {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(244,228,193,0.65);
  margin: 0 0 8px;
}

.nav-section-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-drawer a,
.nav-drawer .x-badge {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(139,105,20,0.25);
  background: rgba(0,0,0,0.20);
  color: rgba(244,228,193,0.92);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.nav-drawer a:hover,
.nav-drawer .x-badge:hover {
  border-color: rgba(212,175,55,0.45);
  background: rgba(212,175,55,0.12);
  color: #d4af37;
}

.nav-drawer a.active {
  border-color: rgba(212,175,55,0.55);
  background: rgba(212,175,55,0.14);
  color: #d4af37;
}

.nav-drawer a.inactive,
.nav-drawer a[data-locked="true"] {
  opacity: 0.75;
  border-color: rgba(180,80,80,0.28);
}

/* Prevent background scroll when drawer open */
body.nav-open { overflow: hidden; }

@media (max-width: 900px) {
  .navbar .links { display: none; }
  .navbar .social { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-brand-text { display: none; } /* keep it ultra clean on mobile */
}

