/* 基础样式 */
.header-component {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #1E90FF;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0 20px;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

/* LOGO样式 */
.logo-container {
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  transition: opacity 0.2s ease;
}

.logo-img:hover {
  opacity: 0.9;
}

/* 导航样式 */
.main-nav {
  flex-grow: 1;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: block;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 搜索框样式 */
.search-container {
  flex-grow: 1;
  max-width: 400px;
  margin: 0 20px;
}

.search-form {
  position: relative;
  display: flex;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 10px 15px;
  padding-right: 40px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  background-color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.search-input:focus {
  box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.3);
}

.search-button {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon {
  color: #666;
}

/* 用户区域样式 */
.user-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.auth-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: #FFA500;
}

.auth-divider {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.user-menu {
  display: flex;
  align-items: center;
  position: relative;
}

.user-avatar {
  cursor: pointer;
}

.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid white;
  transition: all 0.2s ease;
}

.avatar-img:hover {
  transform: scale(1.05);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  min-width: 160px;
  display: none;
  z-index: 100;
}

.user-menu:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
  color: #1E90FF;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 0;
  }
  
  .logo-container {
    order: 1;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }
  
  .main-nav {
    order: 3;
    width: 100%;
    margin-top: 10px;
  }
  
  .nav-list {
    justify-content: center;
  }
  
  .search-container {
    order: 2;
    max-width: 100%;
    margin: 10px 0;
  }
  
  .user-container {
    order: 4;
    margin: 10px auto;
  }
}