/* ==========================================================================
   HARSHGURUJI - PREMIUM NAVBAR (MODERN REDESIGN)
   ========================================================================== */

/* --- CSS VARIABLES --- */
:root {
  --hg-nav-bg: rgba(10, 10, 10, 0.7);
  --hg-nav-border: rgba(255, 255, 255, 0.08);
  --hg-nav-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  --hg-nav-blur: blur(20px);
  --hg-nav-height: 70px;
  
  --hg-text-primary: #ffffff;
  --hg-text-secondary: #a1a1aa;
  --hg-accent: #ff6b4a; /* PeachWeb Coral */
  
  --hg-trans: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* --- MAIN HEADER --- */
.hg-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: var(--hg-nav-height);
  background: transparent;
  z-index: 1000;
  transition: all var(--hg-trans);
}

.hg-header.hg-scrolled {
  background: var(--hg-nav-bg);
  backdrop-filter: var(--hg-nav-blur);
  -webkit-backdrop-filter: var(--hg-nav-blur);
  border-bottom: 1px solid var(--hg-nav-border);
  box-shadow: var(--hg-nav-shadow);
}

.hg-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1400px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- BRAND / LOGO --- */
.hg-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform var(--hg-trans);
}

.hg-nav-logo:hover {
  transform: scale(1.03);
}

.hg-nav-logo img {
  height: 32px;
  width: auto;
  border-radius: 6px;
}

.hg-brand-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--hg-text-primary);
  letter-spacing: -0.5px;
}

/* --- DESKTOP NAVIGATION --- */
.hg-desktop-nav {
  display: flex;
  align-items: center;
}

.hg-nav-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hg-nav-item {
  position: relative;
}

.hg-nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--hg-text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.hg-nav-link:hover, .hg-nav-link.active {
  color: var(--hg-text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Dropdown */
.hg-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(15, 15, 18, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 220px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 100;
}

.hg-nav-item:hover .hg-dropdown,
.hg-user-menu:hover .hg-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.hg-user-menu .hg-dropdown {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(10px);
}
.hg-user-menu:hover .hg-dropdown {
  transform: translateX(0) translateY(0);
}

.hg-dropdown-link {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--hg-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.hg-dropdown-link:hover, .hg-dropdown-link.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--hg-text-primary);
}

.hg-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.5rem 0;
}

/* Bridge for hover */
.hg-has-dropdown::after, .hg-user-menu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 15px;
}

/* --- RIGHT SIDE ACTIONS --- */
.hg-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hg-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  transition: all 0.2s;
}

.hg-search-wrapper {
  position: relative;
}

.hg-search-box:focus-within {
  border-color: var(--hg-accent);
  box-shadow: 0 0 0 2px rgba(255, 107, 74, 0.2);
}

.hg-search-box svg {
  color: var(--hg-text-secondary);
  flex-shrink: 0;
}

.hg-search-box input {
  background: transparent;
  border: none;
  color: var(--hg-text-primary);
  font-size: 0.9rem;
  outline: none;
  width: 170px;
  transition: width 0.2s ease;
}

.hg-search-box input:focus {
  width: 210px;
}

/* --- SEARCH AUTOCOMPLETE DROPDOWN --- */
.hg-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: 90vw;
  background: rgba(15, 20, 32, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.7);
  z-index: 1100;
  overflow: hidden;
  display: none;
  animation: searchSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hg-search-dropdown.show {
  display: block;
}

@keyframes searchSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hg-search-results-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.4rem;
}

.hg-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  transition: all 0.15s;
  background: transparent;
  cursor: pointer;
}

.hg-search-item:hover, .hg-search-item.selected {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.hg-search-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.hg-search-item-icon img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.hg-search-item-info {
  flex: 1;
  min-width: 0;
}

.hg-search-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hg-search-item-desc {
  font-size: 0.75rem;
  color: var(--hg-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.hg-search-item-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hg-search-item-badge.store { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.hg-search-item-badge.app { background: rgba(14, 165, 233, 0.25); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.hg-search-item-badge.auth { background: rgba(236, 72, 153, 0.25); color: #f472b6; border: 1px solid rgba(244, 114, 182, 0.3); }
.hg-search-item-badge.admin { background: rgba(239, 68, 68, 0.25); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.3); }
.hg-search-item-badge.tool { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.hg-search-item-badge.ai { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.hg-search-item-badge.learning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.hg-search-item-badge.game { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.hg-search-item-badge.page { background: rgba(255, 255, 255, 0.1); color: #e2e8f0; }

.hg-search-dropdown-footer {
  padding: 0.6rem 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: var(--hg-text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hg-search-dropdown-footer a {
  color: #818cf8;
  text-decoration: none;
  font-weight: 600;
}
.hg-search-dropdown-footer a:hover {
  color: #a5b4fc;
}

.hg-search-no-results {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--hg-text-secondary);
  font-size: 0.85rem;
}

/* Mobile Search Trigger Icon Button */
.hg-mobile-search-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--hg-text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.hg-mobile-search-btn:hover, .hg-mobile-search-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.4);
}

/* Mobile Expandable Search Strip */
.hg-mobile-search-strip {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(10, 14, 26, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.6rem 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1005;
}

.hg-mobile-drawer-search {
  margin-bottom: 1.5rem;
}
.hg-mobile-drawer-search .hg-search-box {
  width: 100%;
}
.hg-mobile-drawer-search .hg-search-box input {
  width: 100%;
}

.hg-btn-primary {
  background: var(--hg-text-primary);
  color: #000;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.hg-btn-primary:hover {
  transform: scale(1.05);
}

.hg-user-menu {
  position: relative;
}

.hg-user-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.hg-user-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hg-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.hg-avatar-wrap img, .hg-user-trigger img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.golden-tick-badge {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #ffd700, #f59e0b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.85);
  border: 1.5px solid #0f172a;
  color: #0f172a;
  font-size: 8.5px;
  font-weight: 900;
  z-index: 5;
  pointer-events: none;
}

.hg-user-trigger svg {
  color: var(--hg-text-secondary);
  margin-right: 0.5rem;
}

/* --- MOBILE HAMBURGER --- */
.hg-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2000;
}

.hg-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--hg-text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: left center;
}

.hg-hamburger.active span:nth-child(1) { transform: rotate(45deg); }
.hg-hamburger.active span:nth-child(2) { opacity: 0; width: 0; }
.hg-hamburger.active span:nth-child(3) { transform: rotate(-45deg); }


/* --- MOBILE OVERLAY NAV --- */
.hg-mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.hg-mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.hg-mobile-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 100px 2rem 2rem;
  display: flex;
  flex-direction: column;
}

.hg-mobile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hg-mobile-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.hg-mobile-link, .hg-mobile-accordion-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--hg-text-primary);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.hg-mobile-accordion-toggle svg {
  transition: transform 0.3s;
}

.hg-mobile-item.open .hg-mobile-accordion-toggle svg {
  transform: rotate(180deg);
}
.hg-mobile-item.open .hg-mobile-accordion-toggle, .hg-mobile-link.active, .hg-mobile-accordion-toggle.active {
  color: var(--hg-accent);
}

.hg-mobile-accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
  overflow: hidden;
}

.hg-mobile-item.open .hg-mobile-accordion-content {
  grid-template-rows: 1fr;
}

.hg-mobile-accordion-content > a {
  display: block;
  padding: 0.8rem 0;
  color: var(--hg-text-secondary);
  text-decoration: none;
  font-size: 1.1rem;
}

.hg-mobile-accordion-content > a:first-child { margin-top: 1rem; }
.hg-mobile-accordion-content > a.active { color: var(--hg-text-primary); }

.hg-mobile-footer-actions {
  margin-top: 3rem;
}


/* --- MOBILE & TABLET BOTTOM NAVIGATION BAR (Low-Ratio Devices Only) --- */
.hg-bottom-bar {
  display: none !important;
}

/* --- RESPONSIVE BREAKPOINTS (Mobile & Tablet: <= 1024px) --- */
@media (max-width: 1024px) {
  .hg-desktop-nav { display: none; }
  .hg-hamburger { display: none !important; }

  /* Hide top navbar user profile dropdown on mobile/tablet (<= 1024px) */
  .hg-user-menu, #hg-user-profile {
    display: none !important;
  }

  /* Add bottom padding to body on mobile & tablet so content is never blocked */
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Show Bottom Navigation Bar on Mobile & Tablet devices */
  .hg-bottom-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: rgba(10, 14, 26, 0.94) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6) !important;
    align-items: center !important;
    justify-content: space-around !important;
    z-index: 1200 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  .hg-bottom-item {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none !important;
    color: #94a3b8;
    position: relative;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 5px 2px 3px 2px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }

  .hg-bottom-item:active {
    transform: scale(0.92);
  }

  .hg-bottom-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    transition: all 0.2s ease;
  }

  .hg-bottom-icon svg {
    width: 20px;
    height: 20px;
    stroke: #94a3b8;
    transition: all 0.2s ease;
  }

  .hg-bottom-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.08px;
    color: #94a3b8;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
    padding: 0 1px;
  }

  /* Center Home Item Highlight */
  .hg-bottom-item-home {
    position: relative;
  }

  .hg-bottom-item-home .hg-bottom-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 74, 0.18), rgba(236, 72, 153, 0.18));
    border: 1.5px solid rgba(255, 107, 74, 0.45);
    margin-top: -8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .hg-bottom-item-home .hg-bottom-icon svg {
    width: 20px;
    height: 20px;
    stroke: #ff7e5f;
    transition: all 0.25s ease;
  }

  .hg-bottom-item-home:hover .hg-bottom-icon,
  .hg-bottom-item-home.active .hg-bottom-icon {
    background: linear-gradient(135deg, #ff6b4a 0%, #ec4899 100%);
    border-color: #ff6b4a;
    box-shadow: 0 4px 16px rgba(255, 107, 74, 0.7);
    transform: translateY(-2px);
  }

  .hg-bottom-item-home:hover .hg-bottom-icon svg,
  .hg-bottom-item-home.active .hg-bottom-icon svg {
    stroke: #ffffff !important;
    filter: none;
    transform: none;
  }

  .hg-bottom-item-home.active .hg-bottom-label {
    color: #ff6b4a;
    font-weight: 700;
  }

  /* Chat Unread Dot Indicator */
  .hg-bottom-chat-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    background: #ff3b30;
    border-radius: 50%;
    border: 1.5px solid #0a0e1a;
    box-shadow: 0 0 6px rgba(255, 59, 48, 0.85);
  }

  /* Active Navigation Tab */
  .hg-bottom-item.active {
    color: #ff6b4a;
  }

  .hg-bottom-item.active .hg-bottom-icon svg {
    stroke: #ff6b4a;
    filter: drop-shadow(0 0 8px rgba(255, 107, 74, 0.6));
    transform: translateY(-2px);
  }

  .hg-bottom-item.active .hg-bottom-label {
    color: #ff6b4a;
    font-weight: 700;
  }

  /* Glowing indicator on top edge of active tab */
  .hg-bottom-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2.5px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #ff6b4a, #ec4899);
    box-shadow: 0 2px 10px rgba(255, 107, 74, 0.8);
  }

  /* Profile Avatar in Bottom Bar */
  #bottom-auth-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #ff6b4a;
    box-shadow: 0 0 8px rgba(255, 107, 74, 0.4);
  }

  .bottom-golden-tick {
    position: absolute;
    bottom: -2px;
    right: -4px;
    width: 13px;
    height: 13px;
    background: linear-gradient(135deg, #ffd700, #f59e0b);
    color: #0f172a;
    border-radius: 50%;
    font-size: 8.5px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #0b0f19;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.85);
  }

  /* Small screen adjustments for 6-item bottom bar */
  @media (max-width: 380px) {
    .hg-bottom-label {
      font-size: 0.58rem !important;
      letter-spacing: -0.25px !important;
    }
    .hg-bottom-icon svg {
      width: 18px !important;
      height: 18px !important;
    }
    .hg-bottom-item-home .hg-bottom-icon {
      width: 34px !important;
      height: 34px !important;
      margin-top: -6px !important;
    }
  }

  /* On mobile/tablet screens, hide top header login button so it's clean and centered in bottom bar */
  #hg-login-btn {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hg-search-box { display: none; }
  .hg-mobile-search-btn { display: flex; }

  .hg-nav-actions {
    gap: 0.5rem;
  }

  /* Mobile Notification Dropdown Fix: Anchor with uniform margin across screen */
  .hg-notif-dropdown {
    position: fixed !important;
    top: calc(var(--hg-nav-height) + 6px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 85px) !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    z-index: 2500 !important;
    border-radius: 14px !important;
  }

  .hg-notif-list {
    max-height: calc(100vh - 220px) !important;
  }

  /* Mobile search dropdown positioning */
  .hg-mobile-search-strip .hg-search-dropdown {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 8px !important;
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
  }
}

/* --- NOTIFICATION BELL & DROPDOWN --- */
.hg-notif-container {
  position: relative;
  display: flex;
  align-items: center;
}

.hg-notif-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--hg-text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  outline: none;
}

.hg-notif-btn:hover, .hg-notif-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.4);
  transform: scale(1.05);
}

.hg-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Notification Dropdown Panel */
.hg-notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 360px;
  max-width: 90vw;
  background: rgba(15, 20, 32, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.6);
  z-index: 1001;
  overflow: hidden;
  animation: notifSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notifSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hg-notif-header {
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hg-notif-header-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hg-notif-refresh-btn {
  background: transparent;
  border: none;
  color: var(--hg-text-secondary);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}
.hg-notif-refresh-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

.hg-notif-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
}

.hg-notif-item {
  padding: 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.5rem;
  transition: all 0.2s;
}
.hg-notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.hg-notif-item.has-unread-reply {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.08);
}

.hg-notif-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--hg-text-secondary);
  margin-bottom: 0.35rem;
}

.hg-notif-user-msg {
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.4;
  margin: 0 0 0.5rem 0;
  word-break: break-word;
}

.hg-notif-admin-reply {
  background: rgba(99, 102, 241, 0.12);
  border-left: 3px solid #6366f1;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #c7d2fe;
  line-height: 1.45;
  margin-top: 0.4rem;
}

.hg-notif-admin-meta {
  font-size: 0.72rem;
  color: #818cf8;
  font-weight: 600;
  margin-bottom: 2px;
}

.hg-notif-pending-status {
  font-size: 0.74rem;
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hg-notif-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--hg-text-secondary);
  font-size: 0.88rem;
}

.hg-notif-footer {
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.hg-notif-footer a {
  color: #818cf8;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.hg-notif-footer a:hover { color: #a5b4fc; }

/* --- GLOBAL FLOATING CHAT BUTTON (Permanently Removed from All Pages) --- */
.hg-floating-chat-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Hide on chat page if any remaining legacy elements exist */
body.is-chat-page .hg-floating-chat-btn,
.is-chat-page .hg-bottom-bar,
.is-chat-page .hg-global-footer {
  display: none !important;
}

/* --- MOBILE BOTTOM PROFILE SHEET (<= 1024px) --- */
.hg-bottom-profile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hg-bottom-profile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.hg-bottom-profile-sheet {
  background: #11141f;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px 20px 0 0;
  padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  box-sizing: border-box;
}

.hg-bottom-profile-overlay.active .hg-bottom-profile-sheet {
  transform: translateY(0);
}

.hg-bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  margin: 0 auto 1rem;
}

.hg-bottom-profile-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}

.hg-bottom-profile-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.hg-bottom-profile-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hg-bottom-profile-meta {
  flex: 1;
  min-width: 0;
}

.hg-bottom-profile-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hg-bottom-profile-email {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hg-bottom-sheet-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}

.hg-bottom-sheet-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.hg-bottom-profile-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hg-bottom-sheet-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 12px;
  transition: background 0.15s ease, color 0.15s ease;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.hg-bottom-sheet-link:hover, .hg-bottom-sheet-link:active {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.hg-sheet-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.hg-bottom-sheet-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.4rem 0;
}

.hg-bottom-sheet-logout {
  color: #ef4444;
}

.hg-bottom-sheet-logout:hover, .hg-bottom-sheet-logout:active {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}


