/* 登录/注册弹窗与用户入口样式 */

/* 顶部导航栏用户区块 */
.nav-user-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-user-wrapper:hover {
  background: rgba(135, 45, 45, 0.06);
}

.nav-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #872d2d, #d9a748);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f3ecd8;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid rgba(217, 167, 72, 0.5);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.nav-user-wrapper:hover .nav-user-avatar {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(217, 167, 72, 0.4);
}

.nav-user-name {
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  font-weight: 500;
  color: #33302e;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 用户下拉菜单 */
.user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #f9f5ea;
  border: 1px solid rgba(217, 167, 72, 0.4);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(51, 48, 46, 0.15);
  padding: 8px 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.25s ease;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  color: #33302e;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.user-dropdown-item:hover {
  background: rgba(135, 45, 45, 0.06);
  color: #872d2d;
}

.user-dropdown-item i {
  width: 18px;
  text-align: center;
  color: #d9a748;
}

.user-dropdown-divider {
  height: 1px;
  margin: 6px 12px;
  background: rgba(217, 167, 72, 0.25);
}

/* 弹窗遮罩 */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(51, 48, 46, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-modal-overlay.show {
  display: flex;
  opacity: 1;
}

/* 弹窗卡片 */
.auth-modal-card {
  background: #f9f5ea;
  border-radius: 12px;
  border: 1px solid rgba(217, 167, 72, 0.35);
  width: 420px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(51, 48, 46, 0.2);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.auth-modal-overlay.show .auth-modal-card {
  transform: scale(1);
}

.auth-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #872d2d, #d9a748, #872d2d);
  border-radius: 12px 12px 0 0;
}

/* 弹窗头部 */
.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.auth-modal-tabs {
  display: flex;
  gap: 20px;
}

.auth-modal-tab {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 600;
  color: #66615d;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 4px 2px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.auth-modal-tab.active {
  color: #872d2d;
  border-bottom-color: #872d2d;
}

.auth-modal-tab:hover {
  color: #5a1818;
}

.auth-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(51, 48, 46, 0.08);
  color: #66615d;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.auth-modal-close:hover {
  background: rgba(135, 45, 45, 0.12);
  color: #872d2d;
  transform: rotate(90deg);
}

/* 弹窗内容 */
.auth-modal-body {
  padding: 20px 24px 24px;
}

.auth-form-group {
  margin-bottom: 16px;
}

.auth-form-label {
  display: block;
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  font-weight: 500;
  color: #66615d;
  margin-bottom: 6px;
}

.auth-form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  color: #33302e;
  background: #f3ecd8;
  border: 1px solid rgba(217, 167, 72, 0.3);
  border-radius: 8px;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.auth-form-input:focus {
  border-color: #d9a748;
  box-shadow: 0 0 0 3px rgba(217, 167, 72, 0.15);
}

.auth-form-input::placeholder {
  color: #999;
}

/* 提交按钮 */
.auth-submit-btn {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  font-weight: 600;
  color: #f3ecd8;
  background: linear-gradient(135deg, #872d2d, #5a1818);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(135, 45, 45, 0.3);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 提示信息 */
.auth-message {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  text-align: center;
  display: none;
}

.auth-message.show {
  display: block;
}

.auth-message.error {
  background: rgba(180, 66, 48, 0.08);
  color: #b44230;
  border: 1px solid rgba(180, 66, 48, 0.15);
}

.auth-message.success {
  background: rgba(104, 142, 38, 0.08);
  color: #688e26;
  border: 1px solid rgba(104, 142, 38, 0.15);
}

/* 移动端适配 */
@media (max-width: 480px) {
  .auth-modal-card {
    width: 90vw;
    max-height: 85vh;
  }
  .auth-modal-body {
    padding: 16px 18px 20px;
  }
  .nav-user-section {
    padding-left: 8px;
  }
}
