/* ================================================================
   MODERN GAMING HEADER - SIFIRDAN TASARIM
   Premium Gaming Web Sitesi için Profesyonel Header
   ================================================================ */

/* ===== HEADER BASE ===== */
.gaming-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(5, 16, 26, 0.98) 0%, rgba(5, 16, 26, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 255, 204, 0.15);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrolled State */
.gaming-header.is-scrolled {
  height: 70px;
  background: rgba(5, 16, 26, 0.99);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 255, 204, 0.1);
  border-bottom-color: rgba(0, 255, 204, 0.25);
}

/* Hidden State (scroll down) */
.gaming-header.is-hidden {
  transform: translateY(-100%);
}

/* Header Glow Line */
.gaming-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 255, 204, 0.3) 20%,
    rgba(0, 255, 204, 0.6) 50%,
    rgba(0, 255, 204, 0.3) 80%,
    transparent 100%);
  opacity: 0.8;
  animation: headerGlowPulse 4s ease-in-out infinite;
}

@keyframes headerGlowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ===== HEADER WRAPPER ===== */
.header-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

/* ===== LOGO SECTION ===== */
.header-brand {
  flex-shrink: 0;
  position: relative;
}

.brand-link {
  display: block;
  text-decoration: none;
}

.brand-logo-container {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 0;
}

.brand-logo-img {
  height: 85px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  filter: 
    drop-shadow(0 0 20px rgba(0, 255, 204, 0.4))
    drop-shadow(0 4px 16px rgba(0, 0, 0, 0.9))
    brightness(1.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.gaming-header.is-scrolled .brand-logo-img {
  height: 70px;
}

.brand-glow {
  position: absolute;
  inset: -15px;
  background: radial-gradient(ellipse at center, rgba(0, 255, 204, 0.25) 0%, transparent 70%);
  opacity: 0.7;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
  filter: blur(15px);
}

.brand-link:hover .brand-logo-img {
  filter: 
    drop-shadow(0 0 30px rgba(0, 255, 204, 0.6))
    drop-shadow(0 6px 24px rgba(0, 0, 0, 1))
    brightness(1.15);
  transform: scale(1.05);
}

.brand-link:hover .brand-glow {
  opacity: 1;
}

/* ===== NAVIGATION MENU ===== */
.header-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu-item {
  position: relative;
}

.nav-menu-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Nav Link Icon */
.nav-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: rgba(0, 255, 204, 0.6);
  transition: all 0.3s ease;
}

.nav-link-text {
  position: relative;
  z-index: 2;
}

/* Nav Link Background Effect */
.nav-menu-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 255, 204, 0.08) 0%, rgba(0, 255, 204, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

/* Nav Link Indicator */
.nav-link-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.6);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
}

/* Hover State */
.nav-menu-link:hover {
  color: rgba(255, 255, 255, 1);
  background: rgba(0, 255, 204, 0.05);
}

.nav-menu-link:hover::before {
  opacity: 1;
}

.nav-menu-link:hover .nav-link-icon {
  color: var(--accent-cyan);
  transform: scale(1.1);
}

.nav-menu-link:hover .nav-link-indicator {
  transform: translateX(-50%) scaleX(1);
}

/* Active State */
.nav-menu-link.is-active {
  color: var(--accent-cyan);
  background: rgba(0, 255, 204, 0.08);
}

.nav-menu-link.is-active::before {
  opacity: 1;
}

.nav-menu-link.is-active .nav-link-icon {
  color: var(--accent-cyan);
}

.nav-menu-link.is-active .nav-link-indicator {
  transform: translateX(-50%) scaleX(1);
}

/* ===== HEADER RIGHT SECTION ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

/* ===== SERVER STATUS ===== */
.server-status {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, rgba(0, 255, 204, 0.08) 0%, rgba(0, 255, 204, 0.03) 100%);
  border: 1px solid rgba(0, 255, 204, 0.2);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.server-status::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.5), transparent);
}

.server-status-pulse {
  width: 10px;
  height: 10px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0, 255, 204, 0.8);
  animation: statusPulse 2s ease-in-out infinite;
  position: relative;
}

.server-status-pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  opacity: 0;
  animation: statusRipple 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.9);
  }
}

@keyframes statusRipple {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.server-status-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== AUTH BUTTONS ===== */
.header-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.header-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

/* Secondary Button (Login) */
.header-btn-secondary {
  background: transparent;
  border: 1.5px solid rgba(0, 255, 204, 0.3);
  color: rgba(255, 255, 255, 0.9);
}

.header-btn-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 255, 204, 0.1) 0%, rgba(0, 255, 204, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.header-btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
}

.header-btn-secondary:hover::before {
  opacity: 1;
}

.header-btn-secondary:hover svg {
  transform: translateX(3px);
}

/* Primary Button (Register) */
.header-btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, rgba(0, 204, 170, 1) 100%);
  border: 1.5px solid var(--accent-cyan);
  color: var(--bg-primary);
  box-shadow: 0 4px 20px rgba(0, 255, 204, 0.3);
}

.header-btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.header-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(0, 255, 204, 0.5);
}

.header-btn-primary:hover::before {
  opacity: 1;
}

.header-btn-primary:hover svg {
  transform: scale(1.1);
}

/* ===== USER PROFILE MENU ===== */
.user-profile-menu {
  position: relative;
}

.user-profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  background: linear-gradient(135deg, rgba(0, 255, 204, 0.08) 0%, rgba(0, 255, 204, 0.03) 100%);
  border: 1.5px solid rgba(0, 255, 204, 0.2);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile-trigger:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 255, 204, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
}

.user-profile-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(0, 255, 204, 0.3);
}

.user-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-online-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: var(--accent-green);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 210, 106, 0.6);
}

.user-profile-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-profile-chevron {
  color: var(--accent-cyan);
  transition: transform 0.3s ease;
}

.user-profile-menu.is-active .user-profile-chevron {
  transform: rotate(180deg);
}

/* ===== USER DROPDOWN ===== */
.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  min-width: 280px;
  background: rgba(10, 25, 47, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 204, 0.2);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 255, 204, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  overflow: hidden;
}

.user-profile-menu.is-active .user-profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown Glow */
.user-profile-dropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0.6;
}

/* Dropdown Header */
.dropdown-header {
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(0, 255, 204, 0.08) 0%, rgba(0, 255, 204, 0.03) 100%);
  border-bottom: 1px solid rgba(0, 255, 204, 0.15);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dropdown-header-avatar {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
  flex-shrink: 0;
}

.dropdown-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-header-info {
  flex: 1;
  min-width: 0;
}

.dropdown-header-name {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-header-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 210, 106, 0.6);
  animation: statusPulse 2s ease-in-out infinite;
}

/* Dropdown Section */
.dropdown-section {
  padding: 0.5rem 0;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.dropdown-link svg {
  width: 18px;
  height: 18px;
  color: rgba(0, 255, 204, 0.5);
  transition: all 0.2s ease;
}

.dropdown-link:hover {
  background: rgba(0, 255, 204, 0.08);
  color: rgba(255, 255, 255, 0.95);
  border-left-color: var(--accent-cyan);
}

.dropdown-link:hover svg {
  color: var(--accent-cyan);
  transform: translateX(3px);
}

.dropdown-link-danger {
  color: rgba(255, 71, 87, 0.9);
}

.dropdown-link-danger svg {
  color: rgba(255, 71, 87, 0.7);
}

.dropdown-link-danger:hover {
  background: rgba(255, 71, 87, 0.1);
  color: var(--accent-red);
  border-left-color: var(--accent-red);
}

.dropdown-link-danger:hover svg {
  color: var(--accent-red);
}

/* Dropdown Divider */
.dropdown-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.15), transparent);
  margin: 0.5rem 0;
}

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: rgba(0, 255, 204, 0.08);
  border: 1.5px solid rgba(0, 255, 204, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.mobile-menu-toggle:hover {
  background: rgba(0, 255, 204, 0.15);
  border-color: var(--accent-cyan);
}

.menu-toggle-line {
  width: 22px;
  height: 2.5px;
  background: var(--accent-cyan);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 2.5px 0;
}

.mobile-menu-toggle.is-active .menu-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-active .menu-toggle-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.is-active .menu-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== MOBILE NAV BACKDROP ===== */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 999;
}

.mobile-nav-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .header-wrapper {
    gap: 2rem;
  }
  
  .nav-menu {
    gap: 0.25rem;
  }
  
  .nav-menu-link {
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 1024px) {
  .gaming-header {
    height: 70px;
  }
  
  .header-wrapper {
    padding: 0 1.5rem;
    gap: 1rem;
  }
  
  .brand-logo-img {
    height: 65px;
  }
  
  /* Hide Desktop Navigation */
  .header-navigation {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 16, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem 0;
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
  }
  
  .header-navigation.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  
  .nav-menu-item {
    width: 100%;
  }
  
  .nav-menu-link {
    width: 100%;
    padding: 1.25rem 2rem;
    justify-content: flex-start;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 255, 204, 0.1);
  }
  
  .nav-link-indicator {
    display: none;
  }
  
  .nav-menu-link.is-active {
    border-left: 4px solid var(--accent-cyan);
    padding-left: calc(2rem - 4px);
  }
  
  /* Hide Server Status on Mobile */
  .server-status {
    display: none;
  }
  
  /* Show Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .gaming-header {
    height: 64px;
  }
  
  .header-wrapper {
    padding: 0 1rem;
  }
  
  .brand-logo-img {
    height: 56px;
  }
  
  .header-navigation {
    top: 64px;
  }
  
  .header-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.75rem;
  }
  
  .header-btn svg {
    width: 16px;
    height: 16px;
  }
  
  .user-profile-name {
    display: none;
  }
  
  .user-profile-trigger {
    padding: 0.5rem;
  }
}

@media (max-width: 640px) {
  .header-auth .header-btn {
    display: none;
  }
  
  .brand-logo-img {
    height: 48px;
    max-width: 200px;
  }
}

/* ===== MAIN CONTENT SPACING ===== */
#main-content {
  margin-top: 80px;
}

.gaming-header.is-scrolled ~ #main-content {
  margin-top: 70px;
}

@media (max-width: 1024px) {
  #main-content {
    margin-top: 70px;
  }
}

@media (max-width: 768px) {
  #main-content {
    margin-top: 64px;
  }
}
