/* Base background grid */
body {
    background-color: #020408;
    background-image:
      linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
      Consolas, "Liberation Mono", "Courier New", monospace;
  }
  
  /* Scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: #020408;
  }
  ::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
  }
  /* Updated scrollbar hover color for consistency with neon accent */
  ::-webkit-scrollbar-thumb:hover {
    background: #00f0ff; /* neural-accent color */
  }
  
  /* Neon text effect */
  .neon-text {
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  }
  
  /* Neon border focus/hover */
  .neon-border:focus-within,
  .neon-border:hover {
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    border-color: #00f0ff;
  }
  
  /* Optional: page fade-in animation */
  @keyframes fade-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .animate-fade-in {
    animation: fade-in 0.4s ease-out;
  }
  
  /* ---------------- LOADING SCREEN OVERLAY (Adjusted for mobile) ---------------- */
  
  .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #020408;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  /* Hidden state (JS toggles this class) */
  .loading-overlay.hidden {
    display: none;
    opacity: 0;
  }
  
  /* Centered content */
  .loading-content {
    text-align: center;
    padding: 2rem;
    color: white;
  }
  
  /* Main loading text */
  .loading-text {
    font-size: 1.4rem; /* Default for larger screens */
    font-weight: 700;
    color: #00f0ff;
    text-shadow: 0 0 5px rgba(0, 87, 255, 0.5);
    margin-top: 20px;
    letter-spacing: 2px;
  }
  
  /* Subtext */
  .loading-subtext {
    font-size: 0.9rem; /* Default for larger screens */
    color: #888;
    margin-top: 5px;
  }
  
  /* Spinner */
  .spinner {
    width: 50px; /* Default size */
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #00f0ff;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px #00f0ff;
  }
  
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  /* --------------- Mobile Responsive Tweaks for Loading Screen --------------- */
  
  @media (max-width: 640px) {
    /* For screens smaller than Tailwind's 'sm' breakpoint (640px) */
    .loading-text {
      font-size: 1.2rem; /* Smaller font for main text */
      letter-spacing: 1px; /* Tighter letter-spacing */
    }
  
    .loading-subtext {
      font-size: 0.8rem; /* Smaller font for subtext */
    }
  
    .spinner {
      width: 40px; /* Smaller spinner */
      height: 40px;
      border-width: 4px; /* Thinner border */
    }
  }
  
  /* Very small screens (e.g., iPhone SE) */
  @media (max-width: 360px) {
    .loading-text {
      font-size: 1.1rem;
    }
  }