html {
    scroll-behavior: smooth;
}
/* ...existing code... */

body {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(.4,0,.2,1);
}

body.page-fade-in {
    opacity: 1;
}

/* ===== Spinner & Notification (Shared) ===== */
.toast {
    position: fixed;
    top: -100px; /* Start above viewport */
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    transition: top 0.3s ease-in-out;
    z-index: 10001;
    min-width: 280px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
    top: 30px; /* Slide down to this position */
}

.toast-success {
    background-color: #27ae60;
    color: #fff;
}

.toast-error {
    background-color: #e74c3c;
    color: #fff;
}

.toast-warning {
    background-color: #f39c12;
    color: #fff;
}

.toast-info {
    background-color: #3498db;
    color: #fff;
}

@media (min-width: 768px) {
    .toast {
        width: auto;
    }
}
 

/* ===== Spinner & Notification (Shared) ===== */
      /* Center the loader on the screen */
    .loader-container {
      display: none; /* Hidden by default */
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.7); /* Semi-transparent dark overlay */
      z-index: 10000;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    /* Trading chart container */
    .trading-loader {
      width: 100px;
      height: 75px;
      position: relative;
      display: flex;
      align-items: flex-end;
      gap: 4px;
      background: #171717; /* Dark background to mimic trading chart */
      padding: 10px;
      border-radius: 8px;
    }

    /* Price bars */
    .bar {
      width: 10px;
      background: linear-gradient(0deg, #00ff80, #00cc66); /* Green gradient for bullish trend */
      border-radius: 2px;
      animation: trade 1.2s ease-in-out infinite;
      transform-origin: bottom;
    }

    /* Individual bar animations with slight delays for wave effect */
    .bar:nth-child(1) { animation-delay: 0s; }
    .bar:nth-child(2) { animation-delay: 0.1s; }
    .bar:nth-child(3) { animation-delay: 0.2s; }
    .bar:nth-child(4) { animation-delay: 0.3s; }
    .bar:nth-child(5) { animation-delay: 0.4s; }
    .bar:nth-child(6) { animation-delay: 0.5s; }
    .bar:nth-child(7) { animation-delay: 0.6s; }

    

    /* Animation to simulate price movement */
    @keyframes trade {
      0%, 100% { height: 20px; }
      50% { height: 60px; }
    }

    /* Loading text */
    .loader-text {
      margin-top: 15px;
      color: #00ff80; /* Bright green to match trading theme */
      font-family: 'Arial', sans-serif;
      font-size: 16px;
      font-weight: bold;
      text-align: center;
      text-shadow: 0 0 5px rgba(0, 255, 128, 0.5);
    }

.tl-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color var(--transition);
  margin-top: -19px;
  font-weight: 700;
}

@media (min-width: 900px) {
  .tl-back-btn {
    display: none !important;
  }
}

.tl-back-btn:hover {
  color: var(--primary-hover);
}

/* ===== Auth Page Navigation ===== */
.auth-nav {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.auth-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  min-width: fit-content;
  flex-shrink: 0;
}

.auth-logo img {
  max-width: 150px;
  height: auto;
}

.auth-nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.auth-nav-link {
  text-decoration: none;
  color: var(--text-primary, #333);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

/* Light theme text */
html[data-theme="light"] .auth-nav-link {
  color: #1a1a1a;
}

html[data-theme="light"] .auth-nav-link:hover {
  color: #0066cc;
  background-color: rgba(0, 102, 204, 0.1);
}

/* Dark theme text */
html[data-theme="dark"] .auth-nav-link {
  color: #e0e0e0;
}

html[data-theme="dark"] .auth-nav-link:hover {
  color: #4da3ff;
  background-color: rgba(77, 163, 255, 0.1);
}

@media (max-width: 768px) {
  .auth-nav-container {
    padding: 0 0.75rem;
    gap: 1rem;
  }

  .auth-logo img {
    max-width: 120px;
  }

  .auth-nav-links {
    gap: 1rem;
  }

  .auth-nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .auth-nav {
    padding: 0.75rem 0;
  }

  .auth-nav-container {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .auth-logo img {
    max-width: 100px;
  }

  .auth-nav-links {
    gap: 0.75rem;
  }

  .auth-nav-link {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
  }
}