.layout-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(180, 228, 255, 0.08);
  height: 72px;
  background: rgb(13, 13, 13);
  box-sizing: border-box;
  backdrop-filter: var(--sys-glass-blur-heavy);
  -webkit-backdrop-filter: var(--sys-glass-blur-heavy);
}

.layout-header-glass-blur {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(180, 228, 255, 0.03) 0%, rgba(255, 214, 236, 0.02) 100%);
  pointer-events: none;
}

.layout-header-container {
  width: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  box-sizing: border-box;
}

.layout-header-logo-link {
  text-decoration: none;
  height: 40px;
  display: flex;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  height: 40px;
  padding: 0.25rem;
}

.logo-glow {
  position: absolute;
  inset: -4px;
  background: radial-gradient(circle at center, rgba(180, 228, 255, 0.15) 30%, transparent 100%);
  border-radius: 9999px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.logo-wrapper:hover .logo-glow {
  opacity: 1;
}

.logo-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 600;
  background: var(--sys-text-gradient-ping-blue);
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
  letter-spacing: -0.01em;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-dot {
  color: rgb(180, 228, 255);
  margin-left: 1px;
}

.layout-header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.layout-header--nav-desktop {
  margin-left: 1rem;
}

.layout-header-nav-group {
  display: flex;
  gap: 0.25rem;
  background: rgba(180, 228, 255, 0.03);
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(180, 228, 255, 0.08);
}

.layout-header-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 0.875rem;
}

.layout-header-nav-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.layout-header-nav-item:hover {
  color: #fff;
  background: rgba(180, 228, 255, 0.05);
}

.layout-header-nav-item:hover svg {
  opacity: 1;
}

.layout-header-nav-active {
  color: rgb(180, 228, 255) !important;
  background: rgba(180, 228, 255, 0.1);
}

.layout-header-nav-active svg {
  opacity: 1;
  color: rgb(180, 228, 255);
}

.mobile-menu-toggle {
  display: none;
  background: rgba(180, 228, 255, 0.05);
  border: 1px solid rgba(180, 228, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-menu-toggle svg {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.mobile-menu-toggle:hover {
  background: rgba(180, 228, 255, 0.1);
}

.mobile-menu-toggle:hover svg {
  opacity: 1;
}

.layout-header-nav-mobile {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: rgba(13,13,13,0.95);
  z-index: 100;
  transform: translateY(-10px);
  transition: transform 0.3s ease;
  padding: 1rem;
}

.layout-header-nav-mobile.active {
  display: flex;
  transform: translateY(0);
}

.layout-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.layout-header-login-wrapper {
  display: flex;
  align-items: center;
}

.layout-header-login-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.2);
  border-radius: 0.5rem;
  color: #fff;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.875rem;
}

.layout-header-login-button:hover {
  background: rgba(88, 101, 242, 0.15);
  transform: translateY(-1px);
}

.discord-icon {
  width: 30px;
  height: 30px;
  overflow: visible;
  transform: scale(0.7);
}

.layout-header-hamburger-glass {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem;
  background: rgba(13, 13, 13, 0.8);
}

@media (max-width: 1024px) {
  .layout-header--nav-desktop {
    display: none;
  }
}

@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .layout-header-container {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 768px) {
  .layout-header-nav-mobile {
    height: calc(100vh - 72px);
    overflow-y: auto;
    border-top: 1px solid rgba(180, 228, 255, 0.08);
  }
}

@media (max-width: 768px) {
  .logo-text {
    display: none;
  }
}

/* --- User Profile --- */

.user-dropdown {
  position: relative;
}

.dropdown-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.dropdown-button:hover {
  background: rgba(180, 228, 255, 0.05);
}

.user-avatar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
}

.avatar-container {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.avatar-container img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar {
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 50%;
}

.status-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #43b581;
  border: 2px solid rgb(13, 13, 13);
}

.user-info {
  display: flex;
  flex-direction: column;
  margin-top: -6px;
  justify-content: center;
}

.username {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  padding-top: 0;
  margin-top: 0;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 300px;
  background: var(--sys-main-backround-dark-var1);
  border: 1px solid rgba(180, 228, 255, 0.08);
  border-radius: 0.75rem;
  overflow: hidden;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dropdown-menu.show {
  display: block;
  animation: dropdownFadeIn 0.2s ease;
}

.dropdown-header {
  position: relative;
  height: 120px;
}

.header-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(45deg, rgba(180, 228, 255, 0.1), rgba(255, 214, 236, 0.1));
  background-size: cover;
  background-position: center;
}

.header-avatar {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  width: 72px;
  height: 72px;
  padding: 4px;
  background: rgb(22, 22, 22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-avatar .avatar-container {
  width: 100%;
  height: 100%;
}

.dropdown-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid rgb(22, 22, 22);
  object-fit: cover;
}

.dropdown-user-info {
  position: absolute;
  left: 5.5rem;
  bottom: 1.25rem;
}

.dropdown-username {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.dropdown-section {
  padding: 0.75rem;
}

.section-header {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.dropdown-item:hover {
  background: rgba(180, 228, 255, 0.05);
  color: #fff;
}

.dropdown-icon {
  width: 18px;
  height: 18px;
  opacity: 0.8;
  flex-shrink: 0;
  stroke: currentColor;
}

.dropdown-item:hover .dropdown-icon {
  opacity: 1;
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-description {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-divider {
  margin: 0.5rem 0.75rem;
  border-top: 1px solid rgba(180, 228, 255, 0.08);
}

.text-danger {
  color: rgb(237, 66, 69) !important;
  opacity: 0.9;
}

.text-danger:hover {
  background: rgba(237, 66, 69, 0.1) !important;
  opacity: 1;
}

.text-danger .dropdown-icon {
  color: rgb(237, 66, 69);
  opacity: 0.9;
}

.text-danger:hover .dropdown-icon {
  opacity: 1;
}

.text-danger .item-description {
  color: rgba(237, 66, 69, 0.5);
}

.discord-icon {
  width: 18px;
  height: 14px;
  margin-right: 0.5rem;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

