/* ============================================================
   NAV - GENERAL STYLES
   ============================================================ */

/* Profile avatar next to Live tab */
.profile-link {
  display: flex;
  align-items: center;
  margin-right: 10px;
  text-decoration: none;
}

.profile-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  flex-shrink: 0;
  border: 2px solid #ffffff;   /* default = offline gray */
}

/* OFFLINE = gray border */
.profile-circle.offline { border-color: #ffffff; }

/* ONLINE = your electric blue */
.profile-circle.online { border-color: #04aaff; }

.profile-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Viewer avatar: a bit smaller + blue border */
.viewer-profile {
  width: 32px;
  height: 32px;
  border: 2px solid #ffffff;
}

/* HOME BUTTON: always locked to left */
#mainSiteLink {
  order: -1 !important;
  margin-right: 8px;
  flex-shrink: 0;
}

/* Make the bar a positioning anchor */
.top-bar {
  position: relative;
  z-index: 5000; /* Ensure nav stays on top */
}

.top-bar-inner {
  padding-right: 62px; /* Space for the Desktop Resources Dot */
}

/* The Right Side Container */
.top-right {
  display: flex;
  align-items: center;
}

/* ============================================================
   NAV EXTRAS & HAMBURGER (The New Logic)
   ============================================================ */

/* 1. Mobile Menu Button - Hidden on Desktop */
.mobile-menu-btn {
  display: none; 
}

/* 2. Nav Extras - Default Desktop View (Row) */
.nav-extras {
  display: flex;
  align-items: center;
}

/* 3. Resources Dot - Desktop Position */
.nav-more {
  position: absolute;
  right: 25px; /* Moved left as requested so it's not on the edge */
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
  font-size: 22px;
  line-height: 1;
  padding: 3px 4px;
  border-radius: 8px;
  color: #bbb;
  background-color: #1e1e1e;

}

/* ============================================================
   LOGIN AREA STYLES
   ============================================================ */
.top-login-area,
.nav-login-area {
  display: flex;
  align-items: center;
  margin-left: 18px;
  margin-right: 17px;

}

/* Logged-out button */
.nav-login-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Logged-in pill */
.nav-login-pill {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  margin-left: 8px;
}

.nav-login-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

/* Logout Dropdown */
.nav-login-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: #111;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 0;
  min-width: 140px;
  z-index: 1000;
}

.nav-login-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.nav-login-menu button:hover { background: rgba(255, 255, 255, 0.08); }


/* ============================================================
   NAV DROPDOWNS (Notes / Media / Nostr) - DESKTOP
   ============================================================ */
.nav-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.nav-dd-trigger::after {
  content: "▾";
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.7;
}

.nav-dd-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 190px;
  display: none; /* Hidden by default */
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 12px;
  z-index: 9999;
  background: rgba(20,20,20,0.95);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

/* Desktop Hover: Show menu */
.nav-dd:hover .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu,
.nav-dd.open .nav-dd-menu {
  display: flex;
}

.nav-sub {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-sub:hover { background: rgba(255,255,255,0.08); }

/* ✅ Active sub-tab highlight (desktop) */
.nav-sub.active {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
}


/* ============================================================
   MOBILE STYLES (Max Width 720px)
   ============================================================ */
@media screen and (max-width: 720px) {

  /* 1. RESET SCROLLING & PADDING */
  .top-bar-inner {
    padding-right: 10px !important;
    overflow: visible !important; /* Allow popup to overflow if needed */
  }

  /* 2. SHOW HAMBURGER BUTTON */
  .mobile-menu-btn {
    display: block;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 20px;
    border-radius: 4px;
    padding: 2px 10px;
    cursor: pointer;
    margin-left: 10px;
  }

  /* 3. MOBILE POPUP MENU (.nav-extras) */
  .nav-extras {
    display: none; /* Hidden until .active */
    
    position: fixed;
    top: 60px;       /* Below the header */
    right: 10px;
    width: 220px;    /* Width of the menu */
    
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    
    background: #111;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.9);
    z-index: 99999;
  }

  /* Show when active */
  .nav-extras.active {
    display: flex;
  }

/* 4. ITEMS INSIDE MOBILE MENU */
  .nav-extras .top-link {
    width: 100%;
    text-align: left;
    margin: 0;
    display: block;
  }

  /* FIX: Stack the dropdown vertically (Column) so items go UNDER the button */
  .nav-extras .nav-dd {
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column; /* This forces the menu to appear BELOW the button */
    align-items: stretch;   /* This ensures it uses the full width */
    padding-bottom: 0;      /* Remove the hover-bridge padding used on desktop */
  }

  /* Ensure the trigger button inside takes full width */
  .nav-extras .nav-dd .top-link {
    width: 100%;
    box-sizing: border-box;
  }

  /* Fix Login Area inside menu */
  .nav-extras .top-login-area {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  /* Fix Resources Dot inside menu */
  .nav-more {
    position: static;
    transform: none;
    margin-top: 10px;
    font-size: 28px;
    display: block;
    text-align: center;
    width: 100%;
  }



  /* 5. MOBILE SUB-MENUS (ALWAYS OPEN) */
  
  /* Hide the little arrow "▾" since it's always open */
  .nav-dd-trigger::after {
    display: none;
  }

  /* Force the menu to be ALWAYS visible (Flex) */
  .nav-dd .nav-dd-menu {
    display: flex !important;
    position: static;       /* Sit naturally under the button */
    width: 100%;
    box-shadow: none;       /* No floating shadow */
    border: none;           /* No border */
    background: transparent;/* Blend into background */
    
    margin-top: 2px;
    padding-left: 20px;     /* Indent sub-items so they look nested */
    padding-bottom: 10px;   /* Space after the group */
  }

  /* Style the sub-links to be smaller/dimmer to look like a list */
  .nav-sub {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
    color: #ccc;            /* Slightly dimmer text */
    border-left: 1px solid #444; /* Optional: cool tree line effect */
  }


/* ✅ Active sub-tab highlight (mobile) */
.nav-sub.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-left: 1px solid #fff;
}
  
}



.lfl-scrollnav{
  position:fixed;
  right:14px;
  bottom:14px;
  display:none;            /* hidden until scroll */
  z-index:9999;
}
.lfl-scrollbtn{
  width:42px;
  height:42px;
  display:block;
  margin-top:6px;
  border: 1px solid #7c7f82;
  border-radius:8px;
  cursor:pointer;
  font-size:18px;
  line-height:38px;
  text-align:center;
  background: rgba(0,0,0,.65);
  transition: background .2s ease;
  color:#fff;
}
.lfl-scrollbtn:hover{
  background: rgba(255,255,255,.15);
}
