header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #1f1f1f;
  height: 100px;
  line-height: 1;
  will-change: transform;
  transform: translateZ(0);
  isolation: isolate;
  contain: layout style;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: ltr;
  position: relative;
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: white;
  text-decoration: none;
  order: 1;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.03em;
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.logo:active,
.logo:focus {
  outline: none;
  color: white;
}

.nav-center {
  display: flex;
  gap: 2rem;
  order: 2;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-center a {
  color: #6b7280;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s;
  position: relative;
}

.nav-center a:hover {
  color: white;
}

.nav-center a.active {
  color: white;
}

.header-download-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  background: transparent;
  border: 2px solid transparent;
  background-image: linear-gradient(#000000, #000000), 
                    linear-gradient(135deg, #9333ea, #db2777);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: all 0.3s;
  order: 3;
  white-space: nowrap;
}

.header-download-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.header-download-btn:hover {
  background-image: linear-gradient(135deg, #9333ea, #db2777);
  background-origin: padding-box;
  background-clip: padding-box;
  box-shadow: 0 10px 30px rgba(147, 51, 234, 0.5);
}

/* صفحة التحميل فقط - الزر معبأ */
.header-download-btn.active {
  background-image: linear-gradient(135deg, #9333ea, #db2777);
  background-origin: padding-box;
  background-clip: padding-box;
}

.header-download-btn.active:hover {
  opacity: 0.85;
  box-shadow: 0 10px 30px rgba(147, 51, 234, 0.5);
}

@media (max-width: 768px) {
  header {
    height: auto;
  }

  .header-container {
    flex-direction: column;
    height: auto;
    padding: 1.5rem 2rem;
    gap: 1rem;
  }

  .logo {
    order: 1;
  }

  .nav-center {
    position: static;
    transform: none;
    order: 2;
  }

  .header-download-btn {
    order: 3;
  }
}
