/* شريط التنقل المشترك */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(30, 40, 60, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  padding: 5px 0;
  box-shadow: 0 2px 30px rgba(78, 140, 243, 0.3);
  border-bottom: 1px solid rgba(78, 140, 243, 0.2);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
  position: relative;
}

.nav-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-size: 1.3em;
  font-weight: bold;
  font-family: 'Orbitron', 'Cairo', sans-serif;
}

.brand-logo {
  width: 26px;
  height: 26px;
  background: linear-gradient(45deg, #4e8cf3, #7b2ff2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7em;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 4px 15px rgba(78, 140, 243, 0.4);
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.nav-item .nav-link {
  display: block;
  padding: 8px 12px;
  color: #cbd5e0;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.9em;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: #4e8cf3;
  background: rgba(78, 140, 243, 0.1);
  transform: translateY(-2px);
}

.nav-link.active {
  color: #4e8cf3;
  background: rgba(78, 140, 243, 0.15);
  box-shadow: 0 2px 10px rgba(78, 140, 243, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
}

/* إخفاء أزرار تسجيل الدخول فقط (ليس تسجيل الخروج) */
.nav-actions .login-btn[href="/start"] {
  display: none !important;
}

.nav-actions .login-btn[href="/dashboard"]:not([href="/logout"]) {
  display: none !important;
}

.login-btn {
  background: linear-gradient(45deg, #4e8cf3, #7b2ff2);
  color: #fff;
  padding: 8px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(78, 140, 243, 0.4);
  font-size: 0.9em;
}

.login-btn:hover {
  background: linear-gradient(45deg, #7b2ff2, #ff6b9d);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78, 140, 243, 0.6);
}

/* زر القائمة للجوال */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(45deg, #4e8cf3, #7b2ff2);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mobile-menu-btn span {
  width: 18px;
  height: 2px;
  background: #fff;
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-btn:hover {
  background: linear-gradient(45deg, #7b2ff2, #ff6b9d);
  transform: scale(1.05);
}

/* تصميم الجوال */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(30, 40, 60, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(78, 140, 243, 0.2);
    z-index: 999;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .login-btn {
    display: none;
  }
  
  .nav-item {
    width: 100%;
    text-align: center;
  }
  
  .nav-link {
    display: block;
    padding: 15px 20px;
    width: 100%;
    border-radius: 0;
    border-bottom: 1px solid rgba(78, 140, 243, 0.1);
    font-size: 1em;
    transition: all 0.3s ease;
  }
  
  .nav-link:hover, .nav-link.active {
    background: rgba(78, 140, 243, 0.3);
    color: #fff;
    border-left: 3px solid #4e8cf3;
  }
  
  .mobile-login-item {
    display: block;
    border-top: 2px solid rgba(78, 140, 243, 0.3);
    margin-top: 10px;
    padding-top: 10px;
  }
  
  .mobile-login-link {
    background: linear-gradient(45deg, #4e8cf3, #7b2ff2) !important;
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    margin: 10px 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(78, 140, 243, 0.4) !important;
    transition: all 0.3s ease !important;
  }
  
  .mobile-login-link:hover {
    background: linear-gradient(45deg, #7b2ff2, #ff6b9d) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(78, 140, 243, 0.6) !important;
    border-left: none !important;
  }
  
  .nav-brand {
    font-size: 1.1em;
  }
  
  .brand-logo {
    width: 40px;
    height: 40px;
  }
  
  .brand-logo img {
    width: 100%;
    height: 100%;
  }
  
  /* إصلاحات خاصة لـ iPhone */
  @media screen and (max-width: 414px) {
    .nav-container {
      padding: 0 10px;
    }
    
    .mobile-menu-btn {
      width: 35px;
      height: 35px;
    }
    
    .mobile-menu-btn span {
      width: 18px;
      height: 2px;
    }
    
    .nav-brand {
      font-size: 1em;
    }
    
    .brand-logo {
      width: 35px;
      height: 35px;
    }
  }
  
  /* إصلاحات خاصة لـ Safari على iOS */
  @supports (-webkit-touch-callout: none) {
    .navbar {
      -webkit-backdrop-filter: blur(20px);
    }
    
    .nav-menu {
      -webkit-backdrop-filter: blur(20px);
    }
  }
} 