/* Modernized & Sanitized Nav Styles */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(17, 17, 17, 0.9);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: 80px;
    display: flex;
    align-items: center;
}
  
.nav-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}
  
.nav-brand {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 900;
  text-decoration: none;
  background: linear-gradient(to right, #7f5af0, #2cb67d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}
  
.nav-brand:hover {
  filter: brightness(1.2);
  transform: scale(1.05);
}
  
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
  
.nav-link {
  color: #94a1b2;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
}
  
.nav-link:hover, .nav-link.active {
  color: #7f5af0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7f5af0;
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-menu {
  display: none;
  color: #ffffff;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* User Section */
.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(127, 90, 240, 0.5);
  transition: all 0.3s ease;
}

.user-avatar:hover {
    border-color: #7f5af0;
    transform: rotate(5deg) scale(1.1);
}

.username {
    font-weight: 700;
    color: #ffffff;
}

/* Language Selector */
.language-selector {
  position: relative;
}

.language-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.language-button:hover {
    background: rgba(127, 90, 240, 0.1);
    border-color: rgba(127, 90, 240, 0.3);
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #16161a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.5rem;
  min-width: 150px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  z-index: 1001;
}

.language-menu button {
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: #94a1b2;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.language-menu button:hover {
  background: rgba(127, 90, 240, 0.1);
  color: white;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(17, 17, 17, 0.98);
        padding: 2rem;
        gap: 2rem;
        z-index: 999;
        overflow-y: auto;
    }

    .mobile-menu {
        display: block;
    }

    .nav-user {
        display: none; /* Hide on mobile to show in mobile-menu */
    }

    .mobile-user-avatar {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        margin-bottom: 1rem;
    }

    .nav-links .mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding-top: 2rem;
        border-top: 1px solid rgba(255,255,255,0.05);
    }
}
