.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.logo {
  font-size: 1.8rem;
  color: #FF6B6B;
  margin: 0;
  font-weight: bold;
}

.main-nav {
  flex: 1;
  margin: 0 2rem;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  gap: 2rem;
}

.nav-item {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.nav-item:hover {
  background: #FFE8E8;
  color: #FF6B6B;
}

.nav-item.active {
  background: #FF6B6B;
  color: white;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-container {
  position: relative;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 2px solid #FFE8E8;
}

.avatar-container:hover {
  background: #FFE8E8;
  transform: translateY(-2px);
}

.avatar-wrapper {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.default-avatar {
  font-size: 20px;
  color: #FF6B6B;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: -10px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.avatar-container:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 添加小三角形 */
.user-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.04);
}

.dropdown-item {
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dropdown-item i {
  font-size: 16px;
  color: #666;
}

.dropdown-item:hover {
  background: #FFE8E8;
  color: #FF6B6B;
}

.dropdown-item:hover i {
  color: #FF6B6B;
}

.user-info {
  padding: 12px 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 8px;
}

.user-name {
  font-weight: 500;
  color: #333;
  margin: 0;
  font-size: 15px;
}

.user-email {
  font-size: 13px;
  color: #666;
  margin: 4px 0 0 0;
}

.dropdown-divider {
  height: 1px;
  background: #eee;
  margin: 8px 0;
}

/* 登录模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  position: relative;
}

.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-button:hover {
  color: #FF6B6B;
}

.modal h2 {
  color: #333;
  margin-bottom: 1.5rem;
  text-align: center;
}

.modal .form-group {
  margin-bottom: 1rem;
}

.modal input {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #eee;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.modal input:focus {
  border-color: #FF6B6B;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
  outline: none;
}

.modal .login-button {
  width: 100%;
  margin-top: 1rem;
  background: linear-gradient(45deg, #FF6B6B, #FF8E8E);
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal .login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.modal-links {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.modal-links a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.modal-links a:hover {
  color: #FF6B6B;
}

.modal-links .separator {
  margin: 0 0.5rem;
  color: #ddd;
}

/* 调整主内容区域的上边距，为固定导航栏留出空间 */
.content-container {
  margin-top: 80px;
  padding: 1rem;
}