/* FORCE NAV VISIBLE - No hamburger, always show nav buttons */
/* CRITICAL: Navigation must ALWAYS be visible on ALL devices */

/* ==================== KILL ALL PARTICLES - CRITICAL FIX ==================== */
.space-stars,
.space-nebula,
.space-nebula-deep,
.deep-particles,
.deep-particle,
.twinkle-star,
.particle,
.cursor-glow,
.cursor-glow-inner,
.living-effects-container,
.global-hdr-overlay,
[class*="nebula"],
[class*="particle"]:not(.game-particle),
[class*="twinkle"],
[class*="deep-"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -9999 !important;
}

/* ==================== TICKER OVERFLOW PREVENTION ==================== */
html {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding-top: 75px !important; /* Space for fixed nav + ticker */
}

/* CRITICAL: Contain ticker completely */
#live-ticker,
.live-ticker-bar {
  overflow: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative !important;
  contain: content !important;
  isolation: isolate !important;
}

.live-ticker-inner,
.live-ticker-row {
  overflow: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  position: relative !important;
  contain: inline-size !important;
}

/* Ticker scroll must stay within bounds */
.ticker-scroll,
.ticker-scroll-content {
  max-width: 100% !important;
  overflow: visible !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  will-change: transform !important;
}

.live-ticker-items,
.ticker-news-row,
.breaking-news-container {
  max-width: 100% !important;
  overflow: hidden !important;
}

.scroll-item,
.ticker-item,
.ticker-static,
.breaking-headline {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Hide hamburger button completely on ALL pages */
.nav-toggle, .hamburger, #nav-toggle, button.nav-toggle, button.hamburger,
.nav-mobile-toggle, .mobile-toggle, .menu-toggle, .toggle-btn,
[class*="hamburger"], [class*="nav-toggle"], [id*="nav-toggle"],
[class*="mobile-toggle"], [class*="menu-toggle"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
}

/* FORCE nav links visible on ALL screen sizes */
#nav-links, .nav-links, nav .nav-links, .nav-bar .nav-links,
#main-nav .nav-links, #main-nav #nav-links, .navbar .nav-links {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
}

/* FORCE each nav link visible */
#nav-links > a, .nav-links > a, .nav-links a, #nav-links a,
nav a.nav-link, .nav-bar a, .navbar a {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Override any .active class toggle attempts */
#nav-links.active, .nav-links.active,
#nav-links:not(.active), .nav-links:not(.active),
#nav-links.show, .nav-links.show,
#nav-links:not(.show), .nav-links:not(.show) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  transform: none !important;
  max-height: none !important;
}

/* ==================== MOBILE STYLES ==================== */
@media (max-width: 768px) {
  /* Nav bar as horizontal scrollable container */
  .nav-bar, #main-nav, nav.nav-bar, header nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 4px 6px !important;
    align-items: center !important;
    height: auto !important;
    min-height: 36px !important;
    max-height: 44px !important;
  }

  /* Hide scrollbar on mobile */
  .nav-bar::-webkit-scrollbar, #main-nav::-webkit-scrollbar,
  nav::-webkit-scrollbar, .navbar::-webkit-scrollbar,
  .nav-content::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
  }

  /* Nav content wrapper also scrollable */
  .nav-content {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 0 4px !important;
  }

  /* FORCE nav links container visible and horizontal */
  #nav-links, .nav-links, nav .nav-links, #main-nav .nav-links,
  .navbar .nav-links, header .nav-links {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
  }

  /* Override any :not(.active) or hidden state rules */
  #nav-links:not(.active), .nav-links:not(.active),
  #nav-links:not(.show), .nav-links:not(.show),
  #nav-links[style*="display: none"], .nav-links[style*="display: none"],
  #nav-links[hidden], .nav-links[hidden] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* FORCE each link visible and compact */
  #nav-links a, .nav-links a, nav .nav-links a,
  #main-nav a:not(.nav-logo), .navbar a:not(.nav-logo) {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 10px !important;
    min-height: 32px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    background: rgba(0, 200, 255, 0.15) !important;
    border: 1px solid rgba(0, 200, 255, 0.3) !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Active/hover states for touch */
  #nav-links a:active, .nav-links a:active {
    background: rgba(0, 200, 255, 0.4) !important;
    transform: scale(0.98) !important;
  }

  /* Hide icons on mobile to save space */
  #nav-links .nav-icon, .nav-links .nav-icon,
  #nav-links svg, .nav-links svg,
  .nav-links span.icon, #nav-links span.icon {
    display: none !important;
  }

  /* Hide global clocks on mobile */
  .global-clocks, #global-clocks, .live-ticker-container {
    display: none !important;
  }

  /* Compact logo on mobile */
  .nav-logo, .nav-bar a[href="/"], #main-nav > a:first-child,
  .nav-content > a:first-child {
    font-size: 11px !important;
    padding: 4px 8px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* Hide logo text on very small screens */
  @media (max-width: 400px) {
    .logo-text {
      display: none !important;
    }
    .nav-logo, .nav-bar a[href="/"] {
      padding: 4px 6px !important;
    }
  }
}

/* ==================== EXTRA SMALL MOBILE ==================== */
@media (max-width: 480px) {
  #nav-links a, .nav-links a {
    padding: 5px 8px !important;
    font-size: 10px !important;
    min-height: 28px !important;
  }

  .nav-bar, #main-nav {
    padding: 3px 4px !important;
    min-height: 32px !important;
  }
}
