/* 会员认证公共样式（登录/注册/个人信息弹窗） */

/* 用户信息区域 */
.user-profile {
  position: relative;
  cursor: pointer;
}
.user-profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.user-profile-trigger:hover {
  background: rgba(0,0,0,0.04);
}
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1677ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 头像上传组件 */
.avatar-upload-group {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 32px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 2px dashed #d9d9d9;
  transition: border-color 0.3s;
}
.avatar-preview:hover {
  border-color: #1677ff;
}
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-preview .avatar-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}
.avatar-preview:hover .avatar-upload-overlay {
  opacity: 1;
}
.avatar-preview .avatar-upload-overlay i {
  font-size: 18px;
  margin-bottom: 4px;
}
.user-info-text {
  line-height: 1.3;
}
.user-nickname {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}
.user-points {
  font-size: 12px;
  color: #999;
}
/* 下拉菜单 */
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  min-width: 160px;
  padding: 6px 0;
  z-index: 100;
}
.user-dropdown.show { display: block; }
.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 18px;
  font-size: 14px;
  color: #444;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.user-dropdown a:hover,
.user-dropdown button:hover {
  background: #f0f5ff;
  color: #1677ff;
}
/* 登录/注册弹窗 */
.auth-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.auth-modal-overlay.active { display: flex; }
.auth-modal {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 400px;
  max-width: 90%;
  position: relative;
}
.auth-modal .form-group { margin-bottom: 20px; }
.auth-modal input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  font-size: 15px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}
.auth-modal input:focus {
  border-color: #1677ff;
}
.auth-modal input::placeholder {
  color: #bbb;
}
.sms-code-row {
  display: flex;
  gap: 12px;
}
.sms-code-row input {
  flex: 1;
}
.btn-sms-code {
  padding: 14px 20px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-sms-code:hover:not(:disabled) {
  background: #e8e8e8;
}
.btn-sms-code:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.auth-btn-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.btn-primary {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover {
  opacity: 0.9;
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-secondary {
  flex: 1;
  padding: 14px;
  background: #fff;
  color: #666;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  border-color: #999;
  color: #333;
}
.auth-modal .auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #999;
}
.auth-modal .auth-footer a {
  color: #1677ff;
  text-decoration: none;
}
.auth-modal .auth-footer a:hover {
  text-decoration: underline;
}
.auth-modal .auth-error {
  color: #ff4d4f;
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
  text-align: center;
}
.auth-modal .btn-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}
.auth-modal .btn-close:hover {
  color: #666;
}
