/* Unified Header Styles - Consistent across all pages */

.app-header-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 20px;
}

.unified-header {
  max-width: 1400px;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

/* Logo Section */
.header-logo-section {
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-link:hover {
  transform: scale(1.05);
}

.header-logo {
  height: 40px;
  width: auto;
}

/* Tagline (center - only on main page) */
.header-tagline {
  flex: 1;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.5px;
  margin: 0 20px;
  display: none;
}

@media (min-width: 768px) {
  .header-tagline {
    display: block;
  }
}

/* Right Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Auth Button Container */
.auth-button-container {
  display: flex;
  align-items: center;
}

.auth-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
}

.auth-icon-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  transform: translateY(-2px);
}

.auth-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* Account Menu (for logged in users on dashboard) */
.account-menu {
  position: relative;
}

.account-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.account-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(168, 85, 247, 0.5);
}

.account-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.account-email {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.account-dropdown {
  position: absolute;
  top: 110%;
  right: -40px;
  margin-top: 8px;
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  min-width: 120px;
  overflow: hidden;
}

.account-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(168, 85, 247, 0.1);
}

.dropdown-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

/* Language Switcher */
.language-switcher {
  position: relative;
}

.language-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(168, 85, 247, 0.5);
}

.lang-icon {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.current-lang {
  display: flex;
  align-items: center;
  gap: 4px;
}

.current-lang img {
  width: 20px;
  height: 20px;
  border-radius: 2px;
}

.current-lang span {
  font-weight: 500;
  font-size: 13px;
}

.dropdown-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  opacity: 0.5;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  overflow: hidden;
  min-width: 140px;
}

.language-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-dropdown.show ~ .language-trigger .dropdown-arrow {
  transform: rotate(180deg);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
}

.lang-option:hover {
  background: rgba(168, 85, 247, 0.1);
}

.lang-option img {
  width: 20px;
  height: 20px;
  border-radius: 2px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .app-header-container {
    padding: 0 10px;
  }

  .unified-header {
    height: 60px;
    padding: 0;
  }

  .header-logo {
    height: 32px;
  }

  .header-controls {
    gap: 8px;
  }

  .auth-icon-btn {
    width: 36px;
    height: 36px;
  }

  .language-trigger {
    padding: 6px 10px;
  }

  .lang-icon {
    width: 16px;
    height: 16px;
  }

  .current-lang span {
    /* Show only flag on mobile */
    display: none;
  }

  .account-email {
    display: none;
  }

  .account-menu-btn {
    padding: 8px;
    border-radius: 50%;
  }
}

/* Body padding to account for fixed header */
body {
  padding-top: 70px;
}

@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }
}