:root {
  --sidebar-width: 320px;
  --sidebar-collapsed-width: 92px;
  --sidebar-transition: 0.25s ease;
  --surface-2: rgba(8, 10, 15, 0.9);
  --top-bar-height: 56px;
}

body.has-sidebar {
  display: flex !important;
  min-height: 100vh !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
}

/* When both sidebar and top bar exist, sidebar starts below header */
body.has-sidebar.has-top-status-bar {
  padding-top: var(--top-bar-height) !important;
}

body.has-sidebar .sidebar,
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface-2);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 50;
  transition: width var(--sidebar-transition);
  flex-shrink: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

/* When top bar exists, sidebar height adjusts - DESKTOP ONLY */
@media (min-width: 769px) {
  body.has-top-status-bar .sidebar {
    height: calc(100vh - var(--top-bar-height)) !important;
    position: fixed !important;
    top: var(--top-bar-height) !important;
    left: 0 !important;
  }
}

@media (min-width: 1440px) {
  body.has-sidebar {
    display: flex !important;
    flex-direction: row !important;
  }
  
  body.has-sidebar .sidebar,
  .sidebar {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    flex: 0 0 var(--sidebar-width) !important;
    height: 100vh !important;
  }
  
  /* Override for when top bar exists */
  body.has-sidebar.has-top-status-bar .sidebar {
    position: fixed !important;
    top: var(--top-bar-height) !important;
    height: calc(100vh - var(--top-bar-height)) !important;
  }
  
  body.has-sidebar .content {
    flex: 1 !important;
    min-width: 0 !important;
    margin-left: 0 !important;
  }
  
  body.has-sidebar.has-top-status-bar .content {
    margin-left: var(--sidebar-width) !important;
  }
  
  body.sidebar-collapsed .sidebar {
    flex: 0 0 var(--sidebar-collapsed-width) !important;
  }
  
  body.sidebar-collapsed.has-top-status-bar .content {
    margin-left: var(--sidebar-collapsed-width) !important;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 1.5rem 2rem;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(247, 160, 15, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: rgba(247, 160, 15, 0.08);
  box-shadow: 0 0 20px rgba(247, 160, 15, 0.35);
  flex-shrink: 0;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem;
  color: var(--tl-primary);
  text-shadow: 0 0 14px hsla(38, 95%, 55%, 0.5);
  letter-spacing: 0.2rem;
  font-weight: 600;
  transition: opacity var(--sidebar-transition);
  white-space: nowrap;
  text-transform: uppercase;
}

/* Beta version badge */
.beta-badge {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
  margin-left: 0.3rem;
}

.sidebar-toggle {
  position: absolute;
  top: 1.25rem;
  right: -0.85rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 6, 9, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 3;
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--sidebar-transition);
}

.sidebar-toggle:hover {
  background: rgba(247, 160, 15, 0.2);
  color: var(--tl-primary);
}

.sidebar-status {
  padding: 0 1.25rem 1.1rem;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.5rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.2,.8,.2,1),
              background 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease;
  text-align: left;
  font-weight: 400;
  text-decoration: none;
  border-radius: 0 8px 8px 0;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
  opacity: 0.6;
  flex-shrink: 0;
  transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-label {
  transition: opacity var(--sidebar-transition);
  white-space: nowrap;
}

.nav-coming-soon {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.55rem;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-left: 0.4rem;
}

.nav-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  transform: translateX(4px);
}

.nav-btn:hover:not(.active) svg {
  opacity: 0.85;
  transform: scale(1.05);
}

.nav-btn:active:not(.active) {
  transform: translateX(2px) scale(0.99);
}

.nav-btn.active {
  background: linear-gradient(90deg, rgba(247, 160, 15, 0.25) 0%, rgba(247, 160, 15, 0.08) 60%, transparent 100%);
  color: rgba(255, 255, 255, 0.98);
  border-left-color: var(--tl-primary);
}

.nav-btn.active svg {
  opacity: 1;
  color: var(--tl-primary);
}

/* =====================================================
   NAV RADIO INDICATOR
   Orange glowing radio button for active nav items
   ===================================================== */
.nav-radio {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: hsla(0,0%,100%,.1) 0 1px 1px, inset hsla(0,0%,0%,.5) 0 0 0 1px;
  background-color: hsla(0,0%,0%,.3);
  background-image: radial-gradient(
    hsla(30, 100%, 60%, 1) 0%,
    hsla(30, 100%, 50%, 1) 15%,
    hsla(30, 100%, 40%, .3) 28%,
    hsla(30, 100%, 20%, 0) 70%
  );
  background-repeat: no-repeat;
  background-position: 0 16px;
  transition: background-position .15s cubic-bezier(.8, 0, 1, 1),
    transform .25s cubic-bezier(.8, 0, 1, 1),
    box-shadow .2s ease;
}

.nav-radio.checked {
  background-position: 0 0;
  box-shadow: hsla(0,0%,100%,.15) 0 1px 1px, 
    inset hsla(0,0%,0%,.5) 0 0 0 1px,
    0 0 8px hsla(30, 100%, 50%, 0.5);
  transition: background-position .2s .15s cubic-bezier(0, 0, .2, 1),
    transform .25s cubic-bezier(0, 0, .2, 1),
    box-shadow .2s ease;
}

.nav-radio:active,
.nav-btn:active .nav-radio {
  transform: scale(1.2);
  transition: transform .1s cubic-bezier(0, 0, .2, 1);
}

/* Hide radio when sidebar collapsed */
body.sidebar-collapsed .nav-radio {
  display: none;
}

.logout {
  margin: auto 1.5rem 1rem;
  border-radius: 14px;
  padding-block: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.logout svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.logout-text {
  transition: opacity var(--sidebar-transition);
  white-space: nowrap;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .logo {
  justify-content: center;
  margin: 0 0 1.5rem;
}

body.sidebar-collapsed .logo-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

body.sidebar-collapsed .sidebar-status {
  display: none;
}

body.sidebar-collapsed .nav-btn {
  justify-content: center;
  padding-inline: 0.75rem;
}

body.sidebar-collapsed .nav-btn svg {
  opacity: 0.9;
}

body.sidebar-collapsed .nav-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

body.sidebar-collapsed .nav-coming-soon {
  display: none;
}

body.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

body.sidebar-collapsed .logout.btn-destructive {
  justify-content: center;
  align-items: center;
  margin: auto 0.75rem 1rem;
  padding: 0.5rem !important;
  padding-block: 0.5rem !important;
  padding-inline: 0.5rem !important;
  gap: 0 !important;
  min-width: 0;
  width: auto;
  max-width: calc(var(--sidebar-collapsed-width) - 1.5rem);
  display: flex;
}

body.sidebar-collapsed .logout-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

body.sidebar-collapsed .logout svg {
  width: 16px;
  height: 16px;
  margin: 0;
  display: block;
}

@media (max-width: 1024px) {
  body.sidebar-collapsed .nav-menu {
    display: none !important;
  }

  body.sidebar-collapsed .logout {
    display: none !important;
  }
}


@media (max-width: 1024px) and (min-width: 769px) {
  body.has-sidebar {
    flex-direction: column !important;
  }

  body.has-sidebar .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 5;
    height: auto;
    min-height: 60px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  body.has-sidebar .sidebar::-webkit-scrollbar {
    display: none;
  }

  body.has-sidebar .logo {
    margin: 0 0.75rem 0 0;
    flex-shrink: 0;
  }

  body.has-sidebar .sidebar-toggle {
    position: static;
    right: auto;
    top: auto;
    flex-shrink: 0;
  }

  body.has-sidebar .nav-menu {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
    padding: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  
  body.has-sidebar .nav-menu::-webkit-scrollbar {
    display: none;
  }

  body.has-sidebar .nav-btn {
    flex: 0 0 auto;
    max-width: none;
    border-left: none !important;
    border-bottom: 2px solid transparent;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    min-width: auto;
    padding: 0.5rem 0.75rem !important;
    height: 38px;
    display: flex !important;
    margin: 0 !important;
    gap: 0.5rem;
    box-sizing: border-box;
    font-size: 0.8rem;
    line-height: 1;
    vertical-align: baseline;
    flex-shrink: 0;
    border-top: none;
    border-right: none;
    white-space: nowrap;
  }

  body.has-sidebar .nav-btn svg {
    margin: 0;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: block;
  }

  body.has-sidebar .nav-label {
    margin: 0;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    vertical-align: middle;
    font-size: 0.8rem;
  }

  body.has-sidebar .nav-coming-soon {
    margin: 0;
    margin-left: 0.25rem;
    vertical-align: middle;
    line-height: 1;
    padding: 0.05rem 0.35rem;
    font-size: 0.5rem;
    letter-spacing: 0.15rem;
  }

  body.has-sidebar .nav-btn.active {
    border-left: none;
    border-bottom-color: var(--tl-primary);
    box-shadow: 0 0 0 1px rgba(247, 160, 15, 0.35);
  }

  body.has-sidebar.sidebar-collapsed .nav-btn {
    padding-inline: 0.75rem;
  }

  body.has-sidebar.sidebar-collapsed .nav-menu {
    display: none !important;
  }

  body.has-sidebar.sidebar-collapsed .logout {
    display: none !important;
  }

  body.has-sidebar .sidebar-status {
    display: none;
  }

  body.has-sidebar .logout {
    margin: 0 0 0 auto;
    height: 38px;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  body.has-sidebar .content {
    width: 100%;
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 0 !important;
  }
}

@media (max-width: 768px) {
  /* Mobile layout handled by mobile-global.css hamburger menu system */
  /* Only minimal overrides here - DO NOT conflict with mobile-global.css */
  
  body.has-sidebar {
    flex-direction: column !important;
  }

  /* Sidebar becomes top bar - controlled by mobile-global.css */
  body.has-sidebar .sidebar {
    /* Let mobile-global.css handle positioning */
  }

  body.has-sidebar .logo {
    /* Controlled by mobile-global.css */
  }

  body.has-sidebar .sidebar-toggle {
    display: none !important; /* We use hamburger button instead */
  }

  body.has-sidebar .sidebar-status {
    display: none;
  }

  /* Nav menu is now a slide-in panel - controlled by mobile-global.css */
  /* DO NOT override flex-direction, overflow, position here */

  body.has-sidebar .nav-coming-soon {
    /* Let mobile-global.css handle visibility */
  }

  body.has-sidebar.sidebar-collapsed .sidebar {
    padding: 0.35rem;
  }

  body.has-sidebar.sidebar-collapsed .nav-menu {
    display: flex !important;
  }

  body.has-sidebar.sidebar-collapsed .logout {
    display: none !important;
  }
  
  body.has-sidebar.sidebar-collapsed .logo {
    display: none;
  }

  /* Special buttons - mobile-global.css uses display:contents for proper flow */
  body.has-sidebar .sidebar-special-buttons {
    /* Let mobile-global.css control this with display: contents */
  }
  
  body.has-sidebar .nav-btn-special {
    /* Let mobile-global.css control this */
  }

  /* Logout handled by mobile-global.css */
  body.has-sidebar .logout-btn-minimal {
    /* Let mobile-global.css control this */
  }

  body.has-sidebar .content {
    width: 100%;
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: var(--mobile-header-height, 60px) !important;
  }
  
  /* When both sidebar and top bar exist on mobile */
  body.has-sidebar.has-top-status-bar .content,
  body.has-sidebar.has-top-status-bar main.content {
    /* Header at top (60px) + small gap */
    padding-top: calc(var(--mobile-header-height, 60px) + 0.5rem) !important;
    /* Use CSS variable for consistent bottom padding */
    padding-bottom: calc(var(--mobile-bottom-total, calc(52px + 44px + env(safe-area-inset-bottom, 0px))) + 1rem) !important;
    margin-left: 0 !important;
  }
}

@media (min-width: 1025px) {
  body.sidebar-collapsed .nav-menu {
    display: flex !important;
  }

  body.sidebar-collapsed .logout {
    display: flex !important;
  }

  body.has-sidebar.sidebar-collapsed .nav-menu {
    display: flex !important;
  }

  body.has-sidebar.sidebar-collapsed .logout {
    display: flex !important;
  }
}

/* Compact sidebar for screens between 1025-1280px to fit all nav items */
@media (min-width: 1025px) and (max-width: 1280px) {
  .sidebar {
    --sidebar-width: 200px;
    width: var(--sidebar-width);
  }
  
  .nav-btn {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    gap: 0.6rem;
  }
  
  .nav-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .nav-coming-soon {
    font-size: 0.5rem;
    padding: 0.08rem 0.4rem;
    letter-spacing: 0.15rem;
  }
  
  .sidebar-status {
    padding: 0 1rem 0.9rem;
  }
  
  .logo {
    padding: 1.1rem 1rem;
  }
  
  .logo-mark {
    width: 32px;
    height: 32px;
  }
  
  .logo-text {
    font-size: 0.5rem;
  }
  
  .logout.btn-destructive {
    margin: auto 1rem 0.75rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

/* Special Action Buttons - Get TLRPG & Get VIP */
.sidebar-special-buttons {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Style the special nav buttons to match other nav items */
.nav-btn-special {
  position: relative;
}

.nav-btn-special.btn-get-tlrpg svg {
  color: #10b981;
}

.nav-btn-special.btn-get-vip svg {
  color: #eab308;
}

.nav-btn-special.btn-referrals svg {
  color: rgba(255, 255, 255, 0.7);
}

.nav-btn-special.btn-get-tlrpg:hover svg,
.nav-btn-special.btn-get-tlrpg.active svg {
  color: #34d399;
}

.nav-btn-special.btn-get-vip:hover svg,
.nav-btn-special.btn-get-vip.active svg {
  color: #facc15;
}

.nav-btn-special.btn-referrals:hover svg,
.nav-btn-special.btn-referrals.active svg {
  color: rgba(255, 255, 255, 0.9);
}

.nav-btn-special.btn-referrals {
  background: transparent;
  border: none;
}

.nav-btn-special.btn-referrals:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Glowing animation for attention */
@keyframes navButtonGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 40px rgba(255, 255, 255, 0.2);
  }
}

@keyframes navButtonGlowGreen {
  0%, 100% {
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6), 0 0 30px rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.8);
  }
}

@keyframes navButtonGlowGold {
  0%, 100% {
    box-shadow: 0 0 5px rgba(234, 179, 8, 0.2);
    border-color: rgba(234, 179, 8, 0.3);
  }
  50% {
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.6), 0 0 30px rgba(234, 179, 8, 0.3);
    border-color: rgba(234, 179, 8, 0.8);
  }
}

.nav-btn-special.btn-get-tlrpg.nav-btn-glow {
  animation: navButtonGlowGreen 1.5s ease-in-out infinite;
  background: rgba(16, 185, 129, 0.1);
}

.nav-btn-special.btn-get-tlrpg.nav-btn-glow svg {
  color: #34d399;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.6));
}

.nav-btn-special.btn-get-vip.nav-btn-glow {
  animation: navButtonGlowGold 1.5s ease-in-out infinite;
  background: rgba(234, 179, 8, 0.1);
}

.nav-btn-special.btn-get-vip.nav-btn-glow svg {
  color: #facc15;
  filter: drop-shadow(0 0 4px rgba(234, 179, 8, 0.6));
}

/* Minimal logout button - outline style */
.logout-btn-minimal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 1.5rem 1.5rem;
  padding: 0.65rem 1rem;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 10px;
  color: rgba(239, 68, 68, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn-minimal svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.logout-btn-minimal:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
}

.logout-btn-minimal:hover svg {
  opacity: 1;
}

body.sidebar-collapsed .sidebar-special-buttons {
  padding: 0;
  border-top: none;
}

body.sidebar-collapsed .logout-btn-minimal {
  margin: 0.75rem;
  padding: 0.5rem;
  justify-content: center;
}

body.sidebar-collapsed .logout-btn-minimal .logout-text {
  display: none;
}

/* Online Count Indicator */
.sidebar-online-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0.75rem 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-online 2s infinite;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

@keyframes pulse-online {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.online-text {
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.sidebar-collapsed .sidebar-online-count {
  padding: 0.5rem;
  margin: 0.5rem 0.5rem 1rem;
}

body.sidebar-collapsed .sidebar-online-count .online-text {
  display: none;
}

/* Mobile responsive for special buttons */
@media (max-width: 1024px) {
  .sidebar-special-buttons {
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  
  .logout-btn-minimal {
    margin: 0 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
  }
  
  
  .logout-btn-minimal svg {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 768px) {
  /* Let mobile-global.css handle the logout button styling */
  .logout-btn-minimal .logout-text {
    /* Controlled by mobile-global.css */
  }
  
  .logout-btn-minimal {
    /* Controlled by mobile-global.css */
  }
  
  /* Don't override special buttons on mobile - mobile-global.css handles this */
  .sidebar-special-buttons {
    /* Controlled by mobile-global.css for hamburger menu */
  }
}

/* =====================================================
   GLOBAL MODAL CENTERING FIX
   Ensures modals are centered on the full viewport,
   not offset by sidebar
   ===================================================== */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  margin: 0 !important;
  padding: 1rem !important;
  box-sizing: border-box !important;
}

.modal-overlay .modal,
.modal-overlay > div:not(.modal) {
  margin: 0 auto !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

/* =====================================================
   GLOBAL LOADING OVERLAY
   Full-screen loading overlay with glow spinner
   ===================================================== */
.global-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  gap: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.global-loading-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.global-loading-overlay .glow-loader {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(45deg, transparent, transparent 40%, #e5f403);
  animation: glow-spin 2s linear infinite;
}

@keyframes glow-spin {
  0% {
    transform: rotate(0deg);
    filter: hue-rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
    filter: hue-rotate(360deg);
  }
}

.global-loading-overlay .glow-loader::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  background: #212121;
  border-radius: 50%;
  z-index: 1000;
}

.global-loading-overlay .glow-loader::after {
  content: "";
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  background: linear-gradient(45deg, transparent, transparent 40%, #e5f403);
  border-radius: 50%;
  z-index: 1;
  filter: blur(30px);
}

.global-loading-overlay .loading-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =====================================================
   NOTIFICATION BELL ANIMATION
   Pulsing green dot with ring animation
   ===================================================== */
.notification-indicator {
  position: absolute;
  bottom: 5px;
  left: 5px;
  width: 8px;
  height: 8px;
  background-color: rgb(0, 255, 0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-indicator::before {
  content: "";
  position: absolute;
  width: 1px;
  height: 1px;
  background-color: rgb(0, 255, 0);
  border-radius: 50%;
  animation: notification-pulse 1s infinite;
}

@keyframes notification-pulse {
  0% {
    background-color: rgb(0, 255, 0);
    width: 1px;
    height: 1px;
  }
  100% {
    background-color: rgba(0, 255, 0, 0);
    width: 30px;
    height: 30px;
  }
}

/* Bell shake animation when notification is present */
@keyframes bell-ring {
  0%, 100% { transform: rotate(0); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
  20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.has-notification .bell-icon {
  animation: bell-ring 0.5s ease-in-out;
  animation-iteration-count: 3;
}

/* =====================================================
   SERVER UPDATE OVERLAY
   Orange rings animation for server updates
   ===================================================== */
.update-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.update-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.update-overlay .rings-loader {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.update-overlay .ring {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 2px solid transparent;
  border-radius: 50%;
  border-bottom: 6px solid var(--ring-color, #f97316);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

.update-overlay .ring:nth-child(1) {
  --ring-color: #f97316;
  animation: ring-rotate1 1s ease-in-out infinite;
}

.update-overlay .ring:nth-child(2) {
  --ring-color: #fb923c;
  animation: ring-rotate2 1s ease-in-out infinite;
}

.update-overlay .ring:nth-child(3) {
  --ring-color: #fdba74;
  animation: ring-rotate3 1s ease-in-out infinite;
}

.update-overlay .ring:nth-child(4) {
  --ring-color: #f97316;
  width: 250px;
  height: 250px;
  border-width: 2px;
  border-bottom-width: 10px;
  animation: ring-rotate4 1s ease-in-out infinite;
}

.update-overlay .ring:nth-child(5) {
  --ring-color: #fb923c;
  width: 250px;
  height: 250px;
  border-width: 2px;
  border-bottom-width: 10px;
  animation: ring-rotate5 1s ease-in-out infinite;
}

.update-overlay .ring:nth-child(6) {
  --ring-color: #fdba74;
  width: 250px;
  height: 250px;
  border-width: 2px;
  border-bottom-width: 10px;
  animation: ring-rotate6 1s ease-in-out infinite;
}

@keyframes ring-rotate1 {
  from { transform: rotateX(50deg) rotateZ(110deg); }
  to { transform: rotateX(50deg) rotateZ(470deg); }
}

@keyframes ring-rotate2 {
  from { transform: rotateX(20deg) rotateY(50deg) rotateZ(20deg); }
  to { transform: rotateX(20deg) rotateY(50deg) rotateZ(380deg); }
}

@keyframes ring-rotate3 {
  from { transform: rotateX(40deg) rotateY(130deg) rotateZ(450deg); }
  to { transform: rotateX(40deg) rotateY(130deg) rotateZ(90deg); }
}

@keyframes ring-rotate4 {
  from { transform: rotateX(50deg) rotateZ(470deg); }
  to { transform: rotateX(50deg) rotateZ(110deg); }
}

@keyframes ring-rotate5 {
  from { transform: rotateX(20deg) rotateY(50deg) rotateZ(380deg); }
  to { transform: rotateX(20deg) rotateY(50deg) rotateZ(20deg); }
}

@keyframes ring-rotate6 {
  from { transform: rotateX(40deg) rotateY(130deg) rotateZ(90deg); }
  to { transform: rotateX(40deg) rotateY(130deg) rotateZ(450deg); }
}

.update-overlay .nucleus {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, #f97316, #ea580c);
  border-radius: 50%;
  box-shadow: 0px 0 20px #f97316, 0 0 40px #fb923c;
  animation: nucleus-pulse 1s ease-in-out infinite;
}

@keyframes nucleus-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px #f97316, 0 0 40px #fb923c;
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 30px #f97316, 0 0 60px #fb923c;
  }
}

.update-overlay .update-text {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
}

.update-overlay .update-subtext {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ============================================================================
   PAGE LOADER - Animated loading state for all pages
   ============================================================================ */

.page-loader-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  width: 100%;
}

.loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  user-select: none;
  gap: 10px;
}

.loader {
  width: 20px;
  height: 20px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: transparent;
  animation: loader-rotate 1.5s linear infinite;
  z-index: 0;
}

@keyframes loader-rotate {
  0% {
    transform: rotate(90deg);
    box-shadow:
      0 1px 1px 0 #fff inset,
      0 3px 5px 0 #ff5f9f inset,
      0 4px 4px 0 #0693ff inset;
  }
  50% {
    transform: rotate(270deg);
    background: #7c0911;
    box-shadow:
      0 1px 1px 0 #fff inset,
      0 3px 5px 0 #d60a47 inset,
      0 4px 4px 0 #fbef19 inset;
  }
  100% {
    transform: rotate(450deg);
    box-shadow:
      0 1px 1px 0 #fff inset,
      0 3px 5px 0 #ff5f9f inset,
      0 4px 4px 0 #28a9ff inset;
  }
}

.letter-wrapper {
  display: flex;
  gap: 1px;
}

.loader-letter {
  display: inline-block;
  opacity: 0.4;
  transform: translateY(0);
  animation: loader-letter-anim 2s infinite;
  z-index: 1;
  border-radius: 50ch;
  border: none;
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
}

@keyframes loader-letter-anim {
  0%,
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  20% {
    opacity: 1;
    transform: scale(1.15);
  }
  40% {
    opacity: 0.7;
    transform: translateY(0);
  }
}
