.header {
  height: 80px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--panel-glass);
  backdrop-filter: blur(20px);
  transition: background 0.3s ease;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;

  @media (max-width: 600px) {
    flex-direction: column;
    gap: 1rem;
    
    .logo { margin-bottom: 0.5rem; }
    .nav { width: 100%; justify-content: center; gap: 16px; } // Reduced gap for small screens
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

.accent-gold {
  color: var(--accent-gold);
}

.badge {
  background: var(--panel-color);
  color: var(--accent-green);
  font-size: 0.7rem;
  padding: 4px 8px;
  border: 1px solid var(--accent-green);
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 32px;

  // On mobile, nav links are replaced by the bottom tab bar
  @media (max-width: 767px) {
    .nav-link { display: none; }
  }
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;

  @media (max-width: 600px) {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }
  
  &.active {
    color: var(--text-primary);
    
    &::after {
      content: '';
      position: absolute;
      bottom: -32px;
      left: 0;
      width: 100%;
      height: 2px;
      background: var(--accent-green);

      @media (max-width: 600px) {
        bottom: -10px; // Adjust active indicator for stacked layout
      }
    }
  }
  
  &:hover {
    color: var(--text-primary);
  }
}

.theme-toggle {
  background: var(--panel-color);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  color: var(--text-primary);
  
  &:hover {
    transform: scale(1.1) rotate(10deg);
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
  }
}
