/* 导航栏样式 */

.header {
  position: fixed;
  width: 100%;
  height: 77px;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(12, 15, 20, 0.2), rgba(0, 0, 0, 0.15) 100%);
  transition: all 0.5s ease;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  /* padding: 0 20px; */
  height: 100%;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  height: 100%;
}

.logo {
  height: 40px;
  filter: brightness(1.2);
}

.header-nav {
  display: flex;
  gap: 30px;
}

.header-nav-item {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  transition: color 0.3s;
  font-size: 18px;
  cursor: pointer;
}

.header-nav-item.active {
  color: #ddb05d;
  filter: brightness(1.2);
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
  margin-right: 15px;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
}
.nav-login {
  position: fixed;
  top: 18px;
  right: 24px;
  cursor: pointer;
  z-index: 1001;
}

.login-btn {
  background: #ddb05d;
  color: white;
  text-decoration: none;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(216, 164, 69, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(216, 164, 69, 0.4);
  background: linear-gradient(135deg, #ddb05d, #0a1f13);
}

/* 登录弹窗样式 */
.login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.login-modal.active {
  display: flex;
}

.login-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 420px;
  overflow: hidden;
  animation: modalFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(216, 164, 69, 0.2);
}

.login-modal-header {
  background: linear-gradient(135deg, #ddb05d, #0a1f13);
  color: white;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.login-modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  z-index: 1;
}

.login-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.login-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.login-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
  transform-origin: center;
}

.login-modal-body {
  padding: 2rem 1.5rem;
}

.login-form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.login-form-group label {
  display: block;
  margin-bottom: 0.6rem;
  color: #333;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.login-form-group input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f9f9f9;
}

.login-form-group input:focus {
  outline: none;
  border-color: #ddb05d;
  box-shadow: 0 0 0 4px rgba(216, 164, 69, 0.1);
  background: white;
}

.login-form-group input::placeholder {
  color: #999;
  font-size: 0.9rem;
}

.login-form-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #ddb05d, #0a1f13);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(216, 164, 69, 0.4);
  margin-top: 1rem;
}

.login-form-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(216, 164, 69, 0.5);
  background: linear-gradient(135deg, #0a1f13, #ddb05d);
}

.login-form-submit:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(216, 164, 69, 0.4);
}

/* 用户信息样式 */
.user-profile {
  position: fixed;
  top: 24px;
  right: 24px;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
}

.user-profile-name {
  color: white;
  text-decoration: none;
  padding: 0 1rem 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
}

.user-icon {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  object-fit: cover;
}

.user-profile-name:hover {
  color: #ddb05d;
  border-bottom: 2px solid #ddb05d;
  transform: translateY(-1px);
}


/* 用户下拉菜单 */
.user-profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  margin-top: 0.5rem;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1002;
}

.user-profile:hover .user-profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-profile-dropdown-item {
  display: block;
  padding: 0.8rem 1rem;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0.2rem;
}

.user-profile-dropdown-item:hover {
  background: #f5f5f5;
  color: #ddb05d;
}

.user-profile-dropdown-item.logout {
  color: #dc3545;
}

.user-profile-dropdown-item.logout:hover {
  background: #f8d7da;
  color: #dc3545;
}

/* 菜单按钮动画 */
.menu-toggle.active span:nth-child(1) {
  transform:  translate(0, 3px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform:  translate(0, -3px);
}

/* 移动端导航菜单 */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  height: 100vh;
  background: rgba(10, 31, 19, 0.95);
  z-index: 1000;
  transition: right 0.3s ease;
  padding-top: 80px;
}

/* 移动端导航遮罩 */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  display: block;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-item {
  display: block;
  padding: 15px 20px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.mobile-nav-item:hover {
  background: rgba(216, 164, 69, 0.2);
  padding-left: 25px;
}

.mobile-nav-item.active {
  color: #ddb05d;
  background: rgba(216, 164, 69, 0.1);
}

@media (max-width: 768px) {
  .header {
    height: auto;
  }
  .header-container{
    padding: 0 20px !important;
  }
  
  .header-content {
    padding: 10px 0 ;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }
  
  .logo {
    height: 26px;
  }
  
  .header-nav {
    gap: 15px;
    flex: 1;
    justify-content: center;
  }
  
  .header-nav-item {
    font-size: 10px;
  }
  
  .nav-login{
    top: 10px;
    right: 10px;;
  }

  /* 移动端登录弹窗样式 */
  .login-modal-content {
    width: 95%;
    max-width: 320px;
  }
  
  .login-modal-header {
    padding: 1rem 1.2rem;
  }
  
  .login-modal-header h3 {
    font-size: 1.1rem;
  }
  
  .login-modal-body {
    padding: 1.5rem 1.2rem;
  }
  
  .login-form-group {
    margin-bottom: 1.2rem;
  }
  
  .login-form-group input {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
  
  .login-form-submit {
    padding: 0.9rem;
    font-size: 1rem;
    margin-top: 0.8rem;
  }
  
  /* 移动端登录按钮 */
  .login-btn {
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
  }
  
  /* 移动端用户信息 */
  .user-profile {
    top: 15px;
    right: 10px;
  }
  
  .user-profile-name {
    padding: 0 0.8rem 0.4rem;
    font-size: 0.9rem;
  }
  
  .user-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.4rem;
  }
  
  .user-profile-dropdown {
    min-width: 130px;
    margin-top: 0.4rem;
  }
  
  .user-profile-dropdown-item {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }

  
}

@media (max-width: 480px) {
  .header-nav {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
}
