:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #222;
  /* 移动端优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 禁用移动端文本选择高亮 */
  -webkit-tap-highlight-color: transparent;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background: #f8f9fa;
}

/* 注册/登录页面特殊布局 */
body:has(.register-wrapper) {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* 登录/注册/找回密码页面通用样式 */
.login-wrapper,
.register-wrapper,
.forgot-password-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container,
.forgot-password-container {
  width: 100%;
  max-width: 480px;
}

.login-card,
.forgot-password-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 40px;
  width: 100%;
  animation: fadeInUp 0.5s ease-out;
  box-sizing: border-box;
}

.login-header,
.forgot-password-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1,
.forgot-password-header h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: #333;
}

.login-header p,
.forgot-password-header p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.login-form,
.forgot-password-form {
  width: 100%;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 14px;
}

.remember-me {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #666;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  margin-bottom: 0;
  font-weight: normal;
}

.remember-me input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  min-height: 18px;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer !important;
  flex-shrink: 0;
  position: relative;
  z-index: 11;
  pointer-events: auto !important;
  -webkit-appearance: checkbox;
  -moz-appearance: checkbox;
  appearance: checkbox;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  border: none;
  background: transparent;
}

.remember-me input[type="checkbox"]:checked {
  accent-color: #667eea;
}

.remember-me span {
  cursor: pointer;
  pointer-events: none;
  position: relative;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
}

.forgot-password {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s;
}

.forgot-password:hover {
  color: #5568d3;
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
  min-height: 48px;
}

.btn-login:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-login:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.login-footer,
.forgot-password-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.login-footer a,
.forgot-password-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.login-footer a:hover,
.forgot-password-footer a:hover {
  text-decoration: underline;
}

.back-home {
  margin-top: 12px;
  font-size: 12px;
}

/* 验证码输入组 */
.code-input-group {
  display: flex;
  gap: 12px;
}

.code-input-group input {
  flex: 1;
}

.btn-send-code {
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  min-width: 120px;
  transition: background 0.3s;
}

.btn-send-code:hover:not(:disabled) {
  background: #5568d3;
}

.btn-send-code:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 图形验证码样式 */
.captcha-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.captcha-container canvas {
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f8f9fa;
}

.captcha-refresh {
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  color: #666;
  padding: 0;
  min-height: 40px;
}

.captcha-refresh:hover {
  background: #f0f0f0;
  border-color: #667eea;
  color: #667eea;
}

.captcha-refresh:active {
  transform: rotate(180deg);
}

#login-captcha-input,
#register-captcha-input,
#forgot-captcha-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
}

#login-captcha-input:focus,
#register-captcha-input:focus,
#forgot-captcha-input:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 注册页面样式 */
.register-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

.register-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  animation: fadeInUp 0.5s ease-out;
  box-sizing: border-box;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.register-card h1 {
  margin: 0 0 32px 0;
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  color: #333;
}

.register-form {
  width: 100%;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

/* 复选框标签样式 */
.form-group label.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  font-weight: normal;
  cursor: pointer;
}

.form-group label.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  margin-right: 8px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-appearance: checkbox !important;
  -moz-appearance: checkbox !important;
  appearance: checkbox !important;
  accent-color: #667eea;
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative;
  z-index: 10;
}

.form-group label.checkbox-label input[type="checkbox"]:checked {
  accent-color: #667eea;
}

.form-group label.checkbox-label input[type="checkbox"]:focus {
  outline: 2px solid rgba(102, 126, 234, 0.3);
  outline-offset: 2px;
}

.form-group label.checkbox-label span {
  user-select: none;
}

/* 记住我标签特殊样式，覆盖form-group label */
.form-options .remember-me {
  display: flex !important;
  margin-bottom: 0 !important;
  font-weight: normal !important;
}

/* 密码输入框包装器 */
.password-input-wrapper,
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper input,
.password-wrapper input {
  width: 100%;
  padding: 12px 50px 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.password-input-wrapper input:focus,
.password-wrapper input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.password-input-wrapper input:hover:not(:focus),
.password-wrapper input:hover:not(:focus) {
  border-color: #ccc;
  background: white;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
  color: #666;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.password-toggle:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.password-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.password-toggle .eye-icon {
  display: inline-block;
  user-select: none;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s;
}

.password-toggle:hover .eye-icon {
  transform: scale(1.1);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
  outline: none;
  background-color: white;
  cursor: pointer;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
}

/* 密码输入框容器 */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #888;
  transition: color 0.3s ease;
  user-select: none;
}

.password-toggle:hover {
  color: #667eea;
}

.eye-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #888;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.msg {
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
  display: none;
}

.msg.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.msg.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.register-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.register-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.register-footer a:hover {
  text-decoration: underline;
}

.admin-link {
  margin-top: 12px;
  font-size: 12px;
}

/* 通用卡片样式（用于其他页面） */
.card {
  background: #fff;
  padding: 24px;
  margin: 16px 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  min-width: 0;
}

.card h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

/* 通用输入和按钮样式 */
input, button, textarea {
  padding: 10px;
  margin: 6px 0;
  font-size: 14px;
}

input, textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 6px;
  /* 移动端优化 */
  font-size: 16px; /* 防止iOS自动缩放 */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* 移动端输入框优化 */
@media (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  textarea {
    font-size: 16px; /* 防止iOS自动缩放 */
  }
}

button {
  cursor: pointer;
  background: #0d6efd;
  color: #fff;
  border: none;
  border-radius: 6px;
  transition: background 0.3s ease;
  /* 移动端触摸优化 */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px; /* 移动端最小触摸区域 */
}

button:hover:not(:disabled) {
  background: #0b5ed7;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.row input,
.search-input {
  flex: 1 1 auto;
  min-width: 200px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  height: 38px;
}

.row button {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 10px 20px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* 搜索组合样式 */
.search-group {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1 1 auto;
  min-width: 200px;
  max-width: 100%;
}

.search-group .search-input {
  flex: 1 1 auto;
  border-radius: 6px 0 0 6px;
  border-right: none;
  margin: 0;
}

.search-group .search-input:focus {
  border-color: #667eea;
  border-right: none;
  z-index: 1;
}

.search-group button {
  border-radius: 0 6px 6px 0;
  border-left: 1px solid #667eea;
  margin: 0;
  flex-shrink: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  table-layout: auto;
  margin: 0;
}

th, td {
  border: 1px solid #e5e5e5;
  padding: 12px 8px;
  text-align: left;
  font-size: 13px;
  word-wrap: break-word;
  white-space: nowrap;
}

th {
  background: #f8f9fa;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* 表格列宽优化 - 用户管理表格 */
#user-table th:nth-child(1), #user-table td:nth-child(1) { min-width: 60px; max-width: 80px; } /* ID */
#user-table th:nth-child(2), #user-table td:nth-child(2) { min-width: 100px; max-width: 150px; } /* 用户名 */
#user-table th:nth-child(3), #user-table td:nth-child(3) { min-width: 150px; max-width: 200px; } /* 邮箱 */
#user-table th:nth-child(4), #user-table td:nth-child(4) { min-width: 120px; max-width: 150px; } /* 手机号 */
#user-table th:nth-child(5), #user-table td:nth-child(5) { min-width: 80px; max-width: 120px; } /* 角色 */

/* 用户行双击编辑样式 */
#user-table tbody tr.user-row {
  user-select: none; /* 防止双击时选中文本 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  transition: background-color 0.2s ease;
}

#user-table tbody tr.user-row:hover {
  background-color: #f0f4ff !important; /* 悬停时高亮显示 */
}

#user-table tbody tr.user-row:active {
  background-color: #e0e8ff !important; /* 点击时更深的颜色 */
}
#user-table th:nth-child(6), #user-table td:nth-child(6) { min-width: 80px; max-width: 120px; } /* 状态 */
#user-table th:nth-child(7), #user-table td:nth-child(7) { min-width: 150px; max-width: 200px; white-space: normal; } /* 注册时间 */
#user-table th:nth-child(8), #user-table td:nth-child(8) { min-width: 150px; max-width: 200px; white-space: normal; } /* 更新时间 */
#user-table th:nth-child(9), #user-table td:nth-child(9) { min-width: 120px; max-width: 180px; } /* 操作 */

/* 表格容器，支持横向滚动 */
.table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  position: relative;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

/* 桌面端不显示提示 */
.table-container::before {
  display: none;
}

/* 确保表格容器不会超出父容器 */
.card .table-container {
  margin-left: -24px;
  margin-right: -24px;
  width: calc(100% + 48px);
  border-left: none;
  border-right: none;
  border-radius: 0;
}

.card .table-container table {
  margin: 0;
}

/* 中等屏幕尺寸下调整表格容器 */
@media (min-width: 769px) and (max-width: 1200px) {
  .card .table-container {
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
  }
}

.table-container::-webkit-scrollbar {
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.table-container table {
  margin: 0;
  width: 100%;
}

/* 移动端通用优化 */
@media (max-width: 768px) {
  /* 确保所有可点击元素有足够的触摸区域 */
  a, button, .nav-link, .tab-btn, .page-btn, .filter-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* 优化滚动性能 */
  * {
    -webkit-overflow-scrolling: touch;
  }
  
  /* 防止移动端文本选择 */
  .nav-link, button, .tab-btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
  }
  
  /* 优化表格在小屏幕上的显示 */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* 确保模态框在移动端正确显示 */
  .modal {
    padding: 10px;
  }
  
  .modal-content {
    margin: auto;
  }
}

  /* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
  .register-card,
  .login-card,
  .forgot-password-card {
    padding: 24px;
    max-width: 100%;
    margin: 10px;
    border-radius: 12px;
  }
  
  .register-wrapper,
  .login-wrapper,
  .forgot-password-wrapper {
    padding: 10px;
    min-height: 100vh;
  }
  
  .login-header h1,
  .forgot-password-header h1 {
    font-size: 24px;
  }
  
  .code-input-group {
    flex-direction: column;
  }
  
  .btn-send-code {
    width: 100%;
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .forgot-password {
    align-self: flex-end;
  }
  
  /* 验证码移动端优化 */
  .captcha-group {
    gap: 10px;
  }
  
  .captcha-container {
    flex-wrap: wrap;
  }
  
  .captcha-container canvas {
    width: 130px;
    height: 33px;
  }
  
  .captcha-refresh {
    width: 36px;
    height: 36px;
    font-size: 18px;
    min-height: 36px;
  }
  
  #login-captcha-input,
  #register-captcha-input,
  #forgot-captcha-input {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .register-card h1 {
    font-size: 24px;
    margin-bottom: 24px;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group input {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .password-wrapper input {
    padding-right: 40px;
  }
  
  .password-toggle {
    right: 10px;
    width: 22px;
    height: 22px;
  }
  
  .eye-icon {
    width: 18px;
    height: 18px;
  }
  
  .btn-primary {
    padding: 12px;
    font-size: 15px;
  }
  
  /* 导航栏移动端优化 */
  .header-container {
    position: relative;
    padding: 10px 12px;
    height: auto;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  
  /* 移动端头部操作按钮组 */
  .header-actions-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  
  @media (min-width: 769px) {
    .header-actions-mobile {
      display: none;
    }
  }
  
  /* 移动端菜单切换按钮（汉堡菜单） */
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
  }
  
  .mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  }
  
  .mobile-menu-toggle:active {
    transform: scale(0.95);
  }
  
  .mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }
  
  .header-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    gap: 0;
    margin-top: 0;
    width: 100%;
    border-top: 1px solid #f0f0f0;
  }
  
  .header-nav.active {
    max-height: 600px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .header-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 0;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
  }
  
  .header-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .header-nav .nav-link:hover {
    background: #f8f9ff;
    padding-left: 24px;
  }
  
  .header-nav .nav-link:hover::before {
    opacity: 1;
  }
  
  .header-nav .nav-link:last-child {
    border-bottom: none;
  }
  
  .header-nav .nav-link.active {
    background: linear-gradient(90deg, #f0f4ff 0%, #ffffff 100%);
    color: #667eea;
    font-weight: 600;
    padding-left: 24px;
  }
  
  .header-nav .nav-link.active::before {
    opacity: 1;
  }
  
  .header-nav .nav-link .cart-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
  }
  
  .category-nav {
    display: flex;
    flex-direction: column;
    padding: 0;
    width: 100%;
  }
  
  .category-nav .category-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    display: block;
  }
  
  /* 头部分类导航移动端样式 */
  .category-nav-header {
    display: block !important;
  }
  
  .category-nav-trigger {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .category-dropdown-header {
    right: 0;
    left: auto;
    min-width: 140px;
  }
  
  .category-nav-header {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .category-nav-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
  }
  
  .category-nav-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  }
  
  .category-nav-trigger:active {
    transform: translateY(0);
  }
  
  .category-nav-trigger::after {
    float: right;
    margin-top: 2px;
  }
  
  .category-dropdown-header {
    position: static;
    box-shadow: none;
    border-radius: 0;
    margin-top: 8px;
    max-height: 0;
    padding: 0;
    border: none;
    opacity: 1;
    transform: none;
    min-width: 100%;
  }
  
  .category-dropdown-header.show {
    max-height: 300px;
    padding: 8px 0;
  }
  
  .user-menu {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .user-menu .username {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 8px;
    font-weight: 500;
    color: #667eea;
    border: 1px solid #e0e7ff;
  }
  
  .user-dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    border: none;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
    display: block;
    background: #fafbfc;
    border-radius: 8px;
    padding: 4px 0;
  }
  
  .user-dropdown a {
    padding: 12px 20px;
    border-radius: 6px;
    margin: 2px 8px;
    transition: all 0.2s ease;
  }
  
  .user-dropdown a:hover {
    background: #f0f4ff;
    color: #667eea;
    transform: translateX(4px);
  }
  
  .logo {
    font-size: 18px;
    flex: 1;
    min-width: 0;
  }
  
  .logo a {
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #8b4513;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  }
  
  .logo a:hover {
    color: #654321;
    transform: scale(1.02);
  }
  
  /* 搜索栏移动端 */
  .search-bar {
    padding: 15px 0;
  }
  
  .search-container {
    padding: 0 15px;
    flex-direction: row;
    gap: 8px;
  }
  
  #search-input {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .search-btn {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
  }
  
  /* 商品网格移动端 */
  .shop-main {
    padding: 20px 0;
  }
  
  .main-container {
    padding: 0 15px;
  }
  
  .products-section {
    padding: 16px;
    border-radius: 8px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .section-header h2 {
    font-size: 18px;
    margin: 0;
  }
  
  .sort-options {
    width: 100%;
  }
  
  #sort-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .product-card {
    font-size: 13px;
  }
  
  .product-info {
    padding: 12px;
  }
  
  .product-name {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .current-price {
    font-size: 16px;
  }
  
  .original-price {
    font-size: 12px;
  }
  
  .product-meta {
    font-size: 11px;
    margin-top: 6px;
  }
  
  .add-to-cart-btn {
    padding: 10px;
    font-size: 13px;
  }
  
  /* 商品详情移动端 */
  .product-detail {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }
  
  .product-info-detail h1 {
    font-size: 20px;
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .btn-primary.large, .btn-secondary.large {
    width: 100%;
    margin-right: 0;
    margin-bottom: 12px;
  }
  
  /* 购物车移动端优化 */
  .cart-table {
    display: none; /* 隐藏表格 */
  }
  
  .cart-table thead {
    display: none;
  }
  
  /* 移动端卡片布局 */
  .cart-items-mobile {
    display: block;
  }
  
  .cart-item-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  
  .cart-item-card.disabled {
    opacity: 0.6;
  }
  
  .cart-item-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
  }
  
  .cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
  }
  
  .cart-item-details {
    flex: 1;
    min-width: 0;
  }
  
  .cart-item-name {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
  }
  
  .cart-item-name:hover {
    color: #667eea;
  }
  
  .cart-item-price-mobile {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
  }
  
  .cart-item-delete {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
  }
  
  .cart-item-delete:hover {
    color: #dc3545;
  }
  
  .cart-item-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
  }
  
  .quantity-control-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    user-select: none;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
  }
  
  .qty-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(102, 126, 234, 0.3);
  }
  
  .qty-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(102, 126, 234, 0.2);
  }
  
  .qty-btn:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    color: #fff;
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .qty-input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
  }
  
  .cart-item-subtotal-mobile {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  
  .subtotal-label {
    font-size: 12px;
    color: #999;
  }
  
  .subtotal-value {
    font-size: 18px;
    font-weight: 600;
    color: #dc3545;
  }
  
  .cart-item-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .cart-item-info img {
    width: 60px;
    height: 60px;
  }
  
  /* 订单卡片移动端 */
  .order-card {
    padding: 16px;
  }
  
  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .order-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .order-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .order-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .order-actions button,
  .order-buttons button {
    width: 100%;
  }
  
  /* 结算页面移动端 */
  .checkout-container {
    padding: 0 15px;
  }
  
  .checkout-section {
    padding: 16px;
  }
  
  .address-card {
    padding: 12px;
  }
  
  /* 地址管理移动端 */
  .address-card-manage {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .address-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  /* 模态框移动端 */
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  /* 后台管理移动端（H5） */
  .admin-wrapper {
    padding: 10px;
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    min-height: 100vh;
  }
  
  .admin-login-card,
  .admin-panel {
    padding: 20px;
    border-radius: 12px;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .admin-panel {
    max-height: calc(100vh - 20px);
    padding: 16px;
    border-radius: 12px;
  }
  
  .admin-login-header h1 {
    font-size: 22px;
  }
  
  .admin-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
  }
  
  .admin-panel-header h1 {
    font-size: 20px;
    line-height: 1.3;
  }
  
  .btn-admin-logout {
    width: 100%;
    padding: 10px;
    font-size: 14px;
  }
  
  .admin-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    margin: 12px 0;
    padding-bottom: 8px;
    gap: 8px;
    scrollbar-width: thin;
  }
  
  .admin-tabs::-webkit-scrollbar {
    height: 4px;
  }
  
  .admin-tabs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
  }
  
  .tab-btn {
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 44px;
  }
  
  .tab-content {
    margin-top: 12px;
    overflow-x: hidden;
  }
  
  .card {
    padding: 16px;
    margin: 12px 0;
    overflow-x: visible;
    border-radius: 8px;
  }
  
  .card h2 {
    font-size: 18px;
    margin-bottom: 16px;
    line-height: 1.4;
  }
  
  .row {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .row input,
  .row button,
  .search-input {
    width: 100%;
    margin: 0;
    min-height: 44px;
    font-size: 16px; /* 防止iOS自动缩放 */
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .btn-primary {
    padding: 12px 20px;
    font-size: 16px;
    min-height: 44px;
  }
  
  .table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin: 12px -16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    position: relative;
    background: #fff;
  }
  
  /* 移动端显示滚动提示 */
  .table-container::before {
    content: '← 左右滑动查看更多 →';
    position: sticky;
    left: 0;
    top: 0;
    display: block;
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 12px;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
    z-index: 5;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
  }
  
  table {
    font-size: 12px;
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
  }
  
  th, td {
    padding: 10px 6px;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  th {
    font-size: 12px;
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  td {
    font-size: 12px;
  }
  
  /* 表格中的下拉框和按钮 */
  table select {
    font-size: 12px;
    padding: 6px 8px;
    min-width: 80px;
    max-width: 100%;
    border-radius: 4px;
  }
  
  table button {
    font-size: 12px;
    padding: 6px 12px;
    white-space: nowrap;
    min-width: 60px;
    min-height: 36px;
    border-radius: 4px;
  }
  
  .btn-edit {
    margin-right: 6px;
  }
  
  .role-select,
  .status-select,
  .product-status-select,
  .category-status-select,
  .order-status-select {
    font-size: 12px;
    padding: 6px 8px;
    min-height: 36px;
  }
  
  .order-card-admin {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
  }
  
  .order-header-admin {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 12px;
  }
  
  .order-header-admin span {
    display: block;
    width: 100%;
  }
  
  .order-status-select {
    width: 100%;
    margin-top: 4px;
    min-height: 40px;
  }
  
  /* 模态框移动端优化 */
  .modal-content {
    width: 95%;
    max-width: 95%;
    max-height: 90vh;
    margin: 20px auto;
  }
  
  .modal-header {
    padding: 16px;
  }
  
  .modal-header h2 {
    font-size: 18px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .form-group {
    margin-bottom: 16px;
  }

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
  width: 100%;
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 16px;
  color: #999;
  user-select: none;
}

.password-toggle:hover {
  color: #666;
}
  
  .form-group label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .form-group input,
  .form-group select {
    font-size: 16px; /* 防止iOS自动缩放 */
    padding: 12px;
    min-height: 44px;
  }
  
  .modal-footer {
    padding: 16px;
    flex-direction: column;
    gap: 10px;
  }
  
  .modal-footer button {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0;
  }
  
  .container {
    padding: 10px;
  }
  
  .register-wrapper {
    padding: 10px;
  }
  
  .register-card {
    padding: 20px;
    border-radius: 12px;
  }
  
  .register-card h1 {
    font-size: 22px;
  }
  
  .register-wrapper {
    padding: 5px;
  }
  
  .register-card,
  .login-card,
  .forgot-password-card {
    padding: 16px;
    margin: 5px;
  }
  
  .login-header h1,
  .forgot-password-header h1 {
    font-size: 22px;
  }
  
  /* 超小屏幕优化 */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .main-container,
  .cart-container,
  .orders-container,
  .checkout-container,
  .addresses-container,
  .profile-container {
    padding: 0 10px;
  }
  
  .search-container {
    padding: 0 10px;
  }
  
  /* 分类筛选栏移动端样式 */
  .category-filter-bar {
    padding: 12px 0;
  }
  
  .category-filter-container {
    padding: 0 10px;
  }
  
  .category-filter {
    gap: 8px;
  }
  
  .category-filter-label {
    font-size: 13px;
    width: 100%;
    margin-bottom: 4px;
  }
  
  .category-filter-options {
    width: 100%;
    gap: 6px;
  }
  
  .category-filter-item {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .category-icons-grid {
    display: flex;
    gap: 0;
    padding: 0;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
  
  .category-page {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 6px 8px;
    padding: 4px 2px 10px 2px;
    min-width: 100%;
    width: 100%;
  }
  
  .category-icon-wrapper {
    width: 50px;
    height: 50px;
    margin-bottom: 3px;
    border-radius: 12px; /* 四角圆润 */
    overflow: hidden; /* 确保图片也显示圆角 */
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
  }
  
  .category-icon-placeholder {
    font-size: 18px;
    line-height: 50px;
  }
  
  .category-icon-name {
    font-size: 10px;
    padding: 0 1px;
    line-height: 1.3;
    max-height: 26px;
  }
  
  .category-pagination-dots {
    gap: 6px;
    padding: 6px 0;
  }
  
  .category-dot {
    width: 5px;
    height: 5px;
  }
  
  .category-dot.active {
    width: 16px;
  }
  
  .products-section {
    padding: 12px;
  }
  
  .section-header h2 {
    font-size: 16px;
  }
  
  .section-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .sort-options {
    width: 100%;
  }
  
  #sort-select {
    width: 100%;
  }
  
  .pagination {
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .page-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .cart-summary,
  .checkout-summary {
    padding: 16px;
  }
  
  .summary-row {
    font-size: 14px;
  }
  
  .total-amount {
    font-size: 20px;
  }
}

/* ========== 购物平台样式 ========== */

/* 导航栏 */
.shop-header {
  background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 50%, #fdcb6e 100%);
  box-shadow: 0 2px 12px rgba(255, 215, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* 语言切换按钮样式 */
.language-switcher {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
}

.lang-switch-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #495057;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lang-switch-btn:hover {
  background: #e9ecef;
  border-color: #667eea;
  color: #667eea;
}

.lang-switch-btn:active {
  transform: scale(0.98);
}

/* PC端语言切换按钮样式 */
@media (min-width: 769px) {
  .language-switcher-pc {
    display: inline-flex !important;
    align-items: center;
    margin-right: 12px;
  }
  
  .lang-switch-btn-pc {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 1.5px solid #667eea;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #667eea;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 70px;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
    position: relative;
    overflow: hidden;
  }
  
  .lang-switch-btn-pc::before {
    content: '🌐';
    font-size: 14px;
    margin-right: 4px;
  }
  
  .lang-switch-btn-pc:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border-color: transparent;
  }
  
  .lang-switch-btn-pc:hover::before {
    filter: brightness(0) invert(1);
  }
  
  .lang-switch-btn-pc:active {
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .language-switcher {
    margin-right: 0;
    margin-left: 0;
  }
  
  .lang-switch-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 1.5px solid #667eea;
    border-radius: 20px;
    color: #667eea;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  
  .lang-switch-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  }
  
  .lang-switch-btn:active {
    transform: translateY(0);
  }
  
  /* 移动端头部按钮组 */
  .header-container {
    flex-wrap: wrap;
  }
  
  /* 移动端登录/注册按钮样式 */
  .header-nav .nav-link#login-btn,
  .header-nav .nav-link#register-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    margin: 4px 20px;
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
    justify-content: center;
  }
  
  .header-nav .nav-link#login-btn:hover,
  .header-nav .nav-link#register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    padding-left: 20px;
  }
  
  .header-nav .nav-link#login-btn::before,
  .header-nav .nav-link#register-btn::before {
    display: none;
  }
  
  .header-nav .nav-link#register-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    color: #667eea;
    border: 1.5px solid #667eea;
  }
  
  .header-nav .nav-link#register-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
  }
}

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

/* PC端隐藏移动端操作按钮组 */
@media (min-width: 769px) {
  .header-actions-mobile {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: none !important;
  }
  
  /* PC端显示语言切换按钮 */
  .language-switcher-pc {
    display: inline-flex !important;
  }
}

.logo a {
  font-size: clamp(16px, 2.4vw, 20px);
  font-weight: bold;
  color: #8b4513;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  max-width: 100%;
  overflow: hidden;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-text {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-text.scrolling {
  animation: logo-scroll 8s linear infinite;
}

@keyframes logo-scroll {
  0%, 10% {
    transform: translateX(0);
  }
  90%, 100% {
    transform: translateX(calc(-1 * var(--scroll-distance, 60px)));
  }
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: #8b4513;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s;
  position: relative;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.3);
  color: #654321;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-badge {
  background: #dc3545;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 12px;
  margin-left: 4px;
}

.user-menu {
  position: relative;
  cursor: pointer;
}

.username {
  padding: 8px 12px;
  color: #8b4513;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 150px;
  display: none;
  margin-top: 8px;
}

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

.user-dropdown a {
  display: block;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
}

.user-dropdown a:hover {
  background: #f0f0f0;
}

/* 搜索栏 */
.search-bar {
  background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 50%, #fdcb6e 100%);
  padding: 20px 0;
}

.search-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 12px;
}

#search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
}

.search-btn {
  padding: 12px 24px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.search-btn:hover {
  background: #5568d3;
}

/* 分类筛选栏 */
.category-filter-bar {
  background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 50%, #fdcb6e 100%);
  border-bottom: 1px solid rgba(253, 203, 110, 0.3);
  padding: 16px 0;
  position: relative;
  overflow: hidden;
}

/* PC端分类筛选栏增强样式 */
@media (min-width: 769px) {
  .category-filter-bar {
    background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 50%, #fdcb6e 100%);
    padding: 24px 0;
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.15);
  }

  .category-filter-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
  }

  @keyframes shimmer {
    0%, 100% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
  }
}

.category-filter-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 中分类区域 */
.middle-categories-section {
  background: #fff7e6;
  padding: 12px 0 4px 0;
}

/* PC端隐藏中分类和大分类区域，仅保留小分类 */
@media (min-width: 992px) {
  .middle-categories-section,
  .big-categories-section {
    display: none;
  }
}

.middle-categories-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px;
}

.middle-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 768px) {
  .middle-categories-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.middle-category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 12px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: #333;
  overflow: hidden;
}

.middle-category-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.middle-category-name {
  font-size: 16px;
  font-weight: 700;
}

.middle-category-desc {
  font-size: 12px;
  color: #ff7f32;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 127, 50, 0.08);
  border: 1px solid rgba(255, 127, 50, 0.3);
  white-space: nowrap;
}

.middle-category-image-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.middle-category-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  object-fit: cover;
}

/* 大分类区域 */
.big-categories-section {
  background: #fff7e6; /* 与中分类区域保持一致的背景色 */
  padding: 8px 0 4px 0;
}

.big-categories-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px 8px 12px;
}

.big-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 左右宽度一致，保证图片容器高度一致 */
  gap: 12px;
}

.big-categories-left,
.big-categories-right {
  width: 100%;
}

.big-categories-left {
  position: relative;
}

.big-category-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.big-category-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: rotate(45deg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
}

.big-category-dot.active {
  background: #ff6b00;
  border-color: #ff6b00;
  box-shadow: 0 0 6px rgba(255, 107, 0, 0.8);
}

.big-category-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  text-decoration: none;
  color: #333;
  min-height: 0;
  display: block;
  padding: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.big-category-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 150%; /* 高度略大于宽度，接近商品卡高度 */
  overflow: hidden;
}

.big-category-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.category-filter-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
}

.category-filter-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.category-filter-item {
  padding: 8px 16px;
  background: #f8f9fa;
  color: #666;
  text-decoration: none;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.category-filter-item:hover {
  background: #e9ecef;
  color: #333;
}

.category-filter-item.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  font-weight: 500;
}

/* 分类图标容器 */
.category-icons-wrapper {
  position: relative;
  width: 100%;
}

/* 分类图标网格 - PC端样式 */
@media (min-width: 769px) {
  .category-icons-grid {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
  }

  .category-icons-grid::-webkit-scrollbar {
    height: 6px;
  }

  .category-icons-grid::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
  }

  .category-icons-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
  }

  .category-icons-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
  }

  /* PC端：单行横向滚动布局 */
  .category-page {
    display: flex;
    gap: 16px;
    padding: 0;
    min-width: auto;
    width: auto;
    flex-shrink: 0;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    box-sizing: border-box;
  }

  /* PC端分类卡片样式 */
  .category-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-width: 120px;
    padding: 16px 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
  }

  .category-icon-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
  }

  .category-icon-item:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  }

  .category-icon-item:hover::before {
    opacity: 1;
  }

  .category-icon-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
    transform: translateY(-4px);
  }

  .category-icon-item.active .category-icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .category-icon-item.active .category-icon-name {
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  .category-icon-item.active .category-icon-placeholder {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  .category-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e8ecf7;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .category-icon-item:hover .category-icon-wrapper {
    transform: scale(1.1) rotate(2deg);
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
  }

  .category-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
  }

  .category-icon-item:hover .category-icon-img {
    transform: scale(1.1);
  }

  .category-icon-placeholder {
    font-size: 28px;
    font-weight: 600;
    color: #667eea;
    line-height: 1;
    transition: all 0.4s ease;
  }

  .category-icon-name {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
    line-height: 1.4;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .category-icon-item:hover .category-icon-name {
    color: #667eea;
    font-weight: 600;
  }

  /* PC端隐藏分页指示器 */
  .category-pagination-dots {
    display: none;
  }
}

/* 移动端保持原有样式 */
@media (max-width: 768px) {
  .category-icons-grid {
    display: flex;
    gap: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    touch-action: pan-x;
  }

  .category-page {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px 12px;
    padding: 8px 4px 12px 4px;
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
  }
}

.category-icons-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* 分类分页指示器 */
.category-pagination-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  margin-top: 4px;
}

.category-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d0d0d0;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.category-dot:hover {
  background: #999;
  transform: scale(1.2);
}

.category-dot.active {
  background: #667eea;
  width: 20px;
  border-radius: 3px;
}

.category-icons-grid::-webkit-scrollbar {
  height: 6px;
}

.category-icons-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.category-icons-grid::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.category-icons-grid::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.category-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 0;
  justify-content: flex-start;
}

.category-icon-item:hover {
  transform: translateY(-2px);
}

/* 移动端分类样式继续 */
  .category-icon-item.active .category-icon-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    border-color: transparent;
    border-radius: 12px; /* 保持圆角 */
  }

  .category-icon-item.active .category-icon-name {
    color: #667eea;
    font-weight: 600;
  }

  .category-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px; /* 四角圆润 */
  }

  .category-icon-item.active .category-icon-placeholder {
    color: white;
  }

  .category-icon-name {
    font-size: 11px;
    text-align: center;
  color: #666;
  transition: color 0.3s ease;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.3;
  padding: 0 2px;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 28px;
}

/* 主要内容 */
.shop-main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
  background: #f8f9fa;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 商品列表 */
.products-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-image {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f0f0f0;
  overflow: hidden;
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discount-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #dc3545;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.product-info {
  padding: 16px;
}

.product-name {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 12px 0;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.current-price {
  font-size: 20px;
  font-weight: bold;
  color: #dc3545;
}

.original-price {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

.add-to-cart-btn {
  width: 100%;
  padding: 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 0 0 12px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
  touch-action: manipulation;
  min-height: 44px;
}

.add-to-cart-btn:hover {
  background: #5568d3;
}

.add-to-cart-btn:active {
  background: #4a5bc4;
  transform: scale(0.98);
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.page-btn {
  padding: 8px 16px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.page-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.page-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
  font-weight: 600;
}

.page-ellipsis {
  padding: 8px;
  color: #999;
}

.page-info {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: #666;
  font-size: 14px;
  margin: 0 8px;
}

/* 无限滚动加载指示器 */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: #999;
  font-size: 14px;
  width: 100%;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f0f0f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 没有更多商品提示 */
.no-more-indicator {
  display: none;
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
  border-top: 1px solid #f0f0f0;
  margin-top: 20px;
  width: 100%;
}

#product-page-input {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
}

#product-page-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* 商品详情页 - 淘宝风格 */
.product-detail-main {
  min-height: calc(100vh - 200px);
  padding: 20px 0;
  background: #f5f5f5;
}

.product-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 商品基本信息区域（顶部白色卡片） */
.product-info-section {
  background: white;
  border-radius: 0;
  padding: 20px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 图片区域 */
.product-images-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-main-image-wrapper {
  width: 100%;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.product-main-image {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.product-images {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-images img {
  width: 100%;
  border-radius: 8px;
}

.image-thumbnails {
  display: flex;
  gap: 8px;
}

.image-thumbnails img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
}

.image-thumbnails img.active {
  border-color: #667eea;
}

/* 商品副图预览 */
.product-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.product-image-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
}

.product-image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #eee;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-upload.disabled,
.btn-gallery.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-remove-product-image {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.btn-remove-product-image:hover {
  background: rgba(220, 53, 69, 0.9);
}

/* 商品详情页图片放大预览 */
/* 商品详情页图片展示样式 */
.product-images {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.product-images .product-main-image {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  aspect-ratio: 1;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
}

.product-images .product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.image-thumbnails {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

.image-thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.image-thumbnails img:hover {
  border-color: #667eea;
  transform: scale(1.05);
}

.image-thumbnails img.active {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* 图片放大预览层（禁止下载） */
.image-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  cursor: pointer;
}

.image-viewer-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-viewer-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
  cursor: pointer;
  /* 禁止下载：禁用拖拽、选择、右键 */
  -webkit-user-drag: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  pointer-events: auto; /* 允许点击，但禁止拖拽保存 */
}

/* 图片预览左右切换按钮 */
.image-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #ffffff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100000;
  transition: background 0.2s, transform 0.2s;
}

.image-viewer-prev {
  left: 20px;
}

.image-viewer-next {
  right: 20px;
}

.image-viewer-nav:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.05);
}

.product-info-detail h1 {
  font-size: 24px;
  margin: 0 0 16px 0;
}

.product-price-detail {
  margin-bottom: 24px;
}

.product-meta-detail {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.meta-item {
  display: flex;
  gap: 8px;
}

.meta-label {
  color: #999;
}

.product-description {
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f5;
  color: #333;
  cursor: pointer;
  font-size: 18px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-right: 1px solid #ddd;
}

.qty-btn:first-child {
  border-right: 1px solid #ddd;
}

.qty-btn:last-child {
  border-right: none;
  border-left: 1px solid #ddd;
}

.qty-btn:hover:not(:disabled) {
  background: #e8e8e8;
}

.qty-btn:active:not(:disabled) {
  background: #ddd;
}

.qty-btn:disabled {
  background: #f5f5f5;
  color: #ccc;
  cursor: not-allowed;
}

.qty-input {
  width: 60px;
  height: 32px;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  font-size: 14px;
  outline: none;
}

/* 购买按钮区域 - 淘宝风格 */
.product-action-buttons {
  display: flex;
  gap: 12px;
  padding-top: 16px;
}

.btn-cart {
  flex: 1;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid #ff5000;
  background: #fff;
  color: #ff5000;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-cart:hover {
  background: #fff3f0;
  border-color: #ff6600;
  color: #ff6600;
}

.btn-buy {
  flex: 1;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  background: #ff5000;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-buy:hover {
  background: #ff6600;
}

/* 商品详情区域（下方单独区域） */
.product-detail-section {
  background: white;
  border-radius: 0;
  padding: 0;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-tabs {
  display: flex;
  border-bottom: 2px solid #e8e8e8;
  background: #fafafa;
}

.detail-tab {
  padding: 16px 32px;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
}

.detail-tab:hover {
  color: #ff5000;
}

.detail-tab.active {
  color: #ff5000;
  border-bottom-color: #ff5000;
  background: white;
  font-weight: 600;
}

.detail-content {
  padding: 24px;
}

.detail-panel {
  display: none;
}

.detail-panel.active {
  display: block;
}

.detail-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8;
}

.detail-text {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* 规格参数表格 */
.specs-table {
  width: 100%;
}

.spec-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  color: #999;
  font-size: 14px;
}

.spec-value {
  color: #333;
  font-size: 14px;
}

/* 购物车页面 */
.cart-main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
  background: #f8f9fa;
}

.cart-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.cart-container h1 {
  margin-bottom: 24px;
}

.cart-items {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

/* 移动端卡片布局（默认隐藏） */
.cart-items-mobile {
  display: none;
}

.cart-table {
  width: 100%;
}

.cart-table th {
  background: #f8f9fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.cart-table td {
  padding: 16px 12px;
  vertical-align: middle;
}

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-item-info img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-control button {
  width: 32px;
  height: 32px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  user-select: none;
  -webkit-user-select: none;
}

.quantity-control button:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.quantity-control button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(102, 126, 234, 0.2);
}

.quantity-control button:disabled {
  background: linear-gradient(135deg, #ccc 0%, #999 100%);
  color: #fff;
  cursor: not-allowed;
  opacity: 0.6;
}

.quantity-control input {
  width: 60px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cart-summary {
  background: white;
  border-radius: 12px;
  padding: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.summary-row.total {
  font-size: 18px;
  font-weight: bold;
  border-bottom: none;
  margin-top: 8px;
}

.total-amount {
  color: #dc3545;
  font-size: 24px;
}

.btn-danger {
  background: #dc3545;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-danger:hover {
  background: #c82333;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 8px;
}

.status-badge.error {
  background: #f8d7da;
  color: #721c24;
}

/* 订单页面 */
.orders-main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
  background: #f8f9fa;
}

.orders-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.order-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.filter-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
  font-weight: 600;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.order-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.order-header .order-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-payment-method {
  font-size: 12px;
  color: #999;
  margin-left: 12px;
}

.order-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-paid { background: #d1ecf1; color: #0c5460; }
.status-shipped { background: #d4edda; color: #155724; }
.status-completed { background: #d1ecf1; color: #0c5460; }
.status-cancelled { background: #f8d7da; color: #721c24; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-processing { background: #d1ecf1; color: #0c5460; }

.order-items {
  margin-bottom: 16px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
  border-bottom: none;
}

.order-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.order-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.order-express-info {
  margin-top: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.express-basic {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.express-basic strong {
  color: #333;
  font-weight: 600;
}

.express-basic span {
  color: #666;
  font-size: 14px;
}

.btn-link {
  background: none;
  border: none;
  color: #667eea;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  text-decoration: underline;
}

.btn-link:hover {
  color: #5568d3;
}

.btn-link:disabled {
  color: #999;
  cursor: not-allowed;
  text-decoration: none;
}

.express-tracking {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
}

.tracking-loading {
  text-align: center;
  color: #666;
  padding: 12px;
}

.tracking-header {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
}

.tracking-header strong {
  color: #333;
  font-weight: 600;
}

.tracking-status {
  color: #667eea;
  font-weight: 500;
  margin-left: 8px;
}

.tracking-timeline {
  position: relative;
  padding-left: 20px;
}

.tracking-item {
  position: relative;
  padding-bottom: 16px;
  padding-left: 24px;
}

.tracking-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: -8px;
  width: 2px;
  background: #e9ecef;
}

.tracking-item-latest::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #667eea;
  border: 2px solid white;
  box-shadow: 0 0 0 2px #667eea;
}

.tracking-item:not(.tracking-item-latest)::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
}

.tracking-time {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}

.tracking-content {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

.tracking-message {
  margin-top: 8px;
  padding: 8px;
  background: #fff3cd;
  border-radius: 4px;
  font-size: 12px;
  color: #856404;
}

.tracking-error {
  padding: 12px;
  background: #f8d7da;
  border-radius: 4px;
  color: #721c24;
  font-size: 14px;
}

.text-muted {
  color: #999;
  font-size: 14px;
}

/* 退换货管理样式 */
.returns-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.return-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s;
}

.return-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.return-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.return-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.return-no {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.return-date {
  font-size: 12px;
  color: #999;
}

.return-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.return-content {
  margin-bottom: 16px;
}

.return-row {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.return-row strong {
  color: #333;
  margin-right: 8px;
}

.return-images {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.return-images img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #eee;
  transition: transform 0.2s;
}

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

.return-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
}

.btn-success {
  padding: 8px 16px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-success:hover {
  background: #218838;
}

.btn-warning {
  padding: 8px 16px;
  background: #ffc107;
  color: #333;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-warning:hover {
  background: #e0a800;
}

/* 邮件通知系统样式 */
/* 后台通知管理 */
/* 通知表格样式 */
#notifications-table-container {
  margin: 20px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#notifications-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

#notifications-table thead {
  background: #f8f9fa;
}

#notifications-table thead th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 13px;
}

#notifications-table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  vertical-align: middle;
}

#notifications-table tbody tr:hover {
  background: #f8f9fa;
}

#notifications-table tbody tr[data-notification-id] {
  cursor: pointer;
  transition: background-color 0.2s;
}

#notifications-table tbody tr[data-notification-id]:hover {
  background: #e9ecef;
}

#notifications-table tbody tr:last-child td {
  border-bottom: none;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.notification-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s;
}

.notification-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.notification-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-title {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.notification-type,
.notification-target {
  font-size: 12px;
  color: #999;
}

.notification-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.notification-content-preview {
  margin-bottom: 16px;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

.notification-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 12px;
  color: #999;
}

.notification-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

/* 用户通知列表 */
.user-notifications-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notification-item {
  background: white;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #eee;
  transition: all 0.3s;
  cursor: pointer;
}

.notification-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.notification-item.unread {
  background: #f0f4ff;
  border-color: #667eea;
}

.notification-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.notification-item-type {
  font-size: 12px;
  font-weight: 500;
}

.notification-item-status {
  font-size: 12px;
  color: #999;
}

.notification-item-title {
  font-weight: 600;
  color: #333;
  font-size: 15px;
  margin-bottom: 8px;
  cursor: pointer;
}

.notification-item-preview {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.notification-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.notification-item-time {
  font-size: 12px;
  color: #999;
}

.notification-item-actions {
  display: flex;
  gap: 12px;
}

.btn-link {
  background: none;
  border: none;
  color: #667eea;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  text-decoration: underline;
  transition: color 0.3s;
}

.btn-link:hover {
  color: #5568d3;
}

.btn-link.text-danger {
  color: #ef4444;
}

.btn-link.text-danger:hover {
  color: #dc2626;
}

.notification-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-badge,
.chat-unread-badge {
  background: #ef4444;
  color: white;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
}

/* 通知详情模态框 */
.notification-detail-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.notification-type-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  background: #f0f0f0;
}

.notification-time {
  font-size: 14px;
  color: #999;
}

.notification-detail-content {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}

.notification-detail-content img {
  max-width: 100%;
  height: auto;
}

.inline-checkbox {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inline-checkbox .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #333;
}

.inline-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  pointer-events: auto !important;
  -webkit-appearance: checkbox;
  -moz-appearance: checkbox;
  appearance: checkbox;
}

.target-users-list {
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  min-height: 40px;
}

.selected-users {
  font-size: 14px;
  color: #666;
}

/* 广告系统样式 */
/* 启动页广告 */
.splash-ad-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.splash-ad-container {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.splash-ad-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.3s;
}

.splash-ad-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.splash-ad-link {
  display: block;
  width: 100%;
  height: 100%;
}

.splash-ad-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 80vh;
  object-fit: contain;
}

.splash-ad-countdown {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
}

/* 首页轮播广告 - 卡片叠加样式 */
.home-banner-ads {
  width: 100%;
  margin-bottom: 24px;
  padding: 0 12px;
  perspective: 1000px;
}

.banner-ads-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 220px;
  overflow: visible;
  border-radius: 16px;
  touch-action: pan-y pinch-zoom; /* 允许垂直滚动和缩放，但阻止水平滚动 */
  -webkit-overflow-scrolling: touch;
}

.banner-ads-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-ad-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15),
              0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              z-index 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
  background: #fff;
}

/* 卡片叠加效果 */
.banner-ad-item:nth-child(1) {
  z-index: 5;
  transform: translateY(0) scale(1);
  opacity: 1;
}

.banner-ad-item:nth-child(2) {
  z-index: 4;
  transform: translateY(-8px) scale(0.98);
  opacity: 0.9;
}

.banner-ad-item:nth-child(3) {
  z-index: 3;
  transform: translateY(-16px) scale(0.96);
  opacity: 0.8;
}

.banner-ad-item:nth-child(4) {
  z-index: 2;
  transform: translateY(-24px) scale(0.94);
  opacity: 0.7;
}

.banner-ad-item:nth-child(5) {
  z-index: 1;
  transform: translateY(-32px) scale(0.92);
  opacity: 0.6;
}

/* 激活状态 - 顶层卡片 */
.banner-ad-item.active {
  z-index: 10 !important;
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2),
              0 6px 16px rgba(0, 0, 0, 0.15);
}

/* 激活状态下的其他卡片 */
.banner-ad-item.active ~ .banner-ad-item {
  transform: translateY(8px) scale(0.98);
  opacity: 0.85;
}

.banner-ad-item.active ~ .banner-ad-item:nth-child(n+3) {
  transform: translateY(16px) scale(0.96);
  opacity: 0.75;
}

.banner-ad-item.active ~ .banner-ad-item:nth-child(n+4) {
  transform: translateY(24px) scale(0.94);
  opacity: 0.65;
}

.banner-ad-item.active ~ .banner-ad-item:nth-child(n+5) {
  transform: translateY(32px) scale(0.92);
  opacity: 0.55;
}

.banner-ad-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
  user-select: none; /* 防止文本选择 */
  -webkit-user-select: none;
}

.banner-ad-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.05) 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.banner-ad-item.active .banner-ad-link::before {
  opacity: 1;
}

.banner-ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-ad-item.active .banner-ad-image {
  transform: scale(1.02);
}

/* 右下角页数显示 - 精美样式 */
.banner-ads-pagination {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
              0 2px 8px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 15px;
  font-weight: 500;
  color: #333;
  line-height: 1.2;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.banner-ads-pagination:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2),
              0 3px 10px rgba(0, 0, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.banner-page-current {
  font-weight: 700;
  font-size: 16px;
  color: #1a73e8;
  min-width: 24px;
  text-align: center;
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
  position: relative;
}

.banner-page-current::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #1a73e8, #4285f4);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.banner-ads-pagination:hover .banner-page-current::after {
  width: 80%;
}

.banner-page-separator {
  margin: 0 6px;
  color: #999;
  font-weight: 400;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.banner-ads-pagination:hover .banner-page-separator {
  opacity: 0.8;
}

.banner-page-total {
  font-weight: 500;
  color: #666;
  min-width: 24px;
  text-align: center;
  opacity: 0.85;
  transition: color 0.3s ease;
}

.banner-ads-pagination:hover .banner-page-total {
  color: #888;
  opacity: 1;
}

/* 隐藏左右导航按钮 */
.banner-ad-prev,
.banner-ad-next {
  display: none !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .home-banner-ads {
    padding: 0 8px;
    margin-bottom: 16px;
  }
  
  .banner-ads-container {
    height: 180px;
  }
  
  .banner-ad-item {
    border-radius: 12px;
  }
  
  .banner-ad-link {
    border-radius: 12px;
  }
  
  /* 移动端减少叠加层数 */
  .banner-ad-item:nth-child(2) {
    transform: translateY(-6px) scale(0.99);
  }
  
  .banner-ad-item:nth-child(3) {
    transform: translateY(-12px) scale(0.98);
  }
  
  .banner-ad-item:nth-child(n+4) {
    display: none;
  }
  
  .banner-ads-pagination {
    bottom: 14px;
    right: 14px;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 20px;
  }
  
  .banner-page-current {
    font-size: 14px;
    min-width: 20px;
  }
  
  .banner-page-separator {
    margin: 0 5px;
    font-size: 12px;
  }
  
  .banner-page-total {
    min-width: 20px;
    font-size: 13px;
  }
}

/* 后台广告管理 - 轮播项样式 */
.banner-item-wrapper {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: #f9f9f9;
}

.banner-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.banner-item-title {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.btn-small {
  padding: 4px 12px;
  font-size: 12px;
}

.banner-item-wrapper .form-group {
  margin-bottom: 12px;
}

.banner-item-wrapper .form-group:last-child {
  margin-bottom: 0;
}

.banner-item-preview {
  margin-top: 10px;
}

.banner-item-preview-img {
  max-width: 100%;
  max-height: 150px;
  border-radius: 4px;
}

#ad-banner-items-list {
  margin-bottom: 15px;
}

/* 对联广告 */
.couplet-ads-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9999;
}

.couplet-ad-left,
.couplet-ad-right {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  /* 宽度和高度由内联样式设置，这里只设置默认值 */
  width: 120px;
  height: 600px;
  max-width: 15vw;
  pointer-events: auto;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 10000;
}

.couplet-ad-left {
  left: 0;
}

.couplet-ad-right {
  right: 0;
}

.couplet-ad-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}

.couplet-ad-link:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.couplet-ad-image {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.couplet-ad-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.3s;
}

.couplet-ad-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* 移动端隐藏对联广告 */
@media (max-width: 768px) {
  .couplet-ads-container {
    display: none;
  }
}

/* 列表广告 */
.list-ad-item {
  width: 100%;
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: white;
}

.list-ad-link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.list-ad-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 300px;
  object-fit: cover;
}

.list-ad-title {
  padding: 12px;
  font-size: 14px;
  color: #333;
  text-align: center;
  background: #f8f9fa;
}

/* 商品详情页广告 */
.product-detail-ads {
  margin-top: 30px;
  margin-bottom: 20px;
}

.detail-ads-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-ad-item {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: white;
}

.detail-ad-link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.detail-ad-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 200px;
  object-fit: cover;
}

.detail-ad-title {
  padding: 12px;
  font-size: 14px;
  color: #333;
  text-align: center;
  background: #f8f9fa;
}

/* 后台广告管理样式 */
.ads-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ad-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s;
}

.ad-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.ad-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ad-title {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.ad-position,
.ad-sort {
  font-size: 12px;
  color: #999;
}

.ad-status {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.status-active {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.35);
}

.status-disabled {
  background: linear-gradient(135deg, #f97373 0%, #dc2626 100%);
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
}

.ad-content {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.ad-image-container {
  flex-shrink: 0;
  width: 200px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
}

.ad-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 客服聊天 - 会话复选框样式（自定义打勾） */
.chat-session-checkbox,
#chat-select-all {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  background-color: #fff;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}

.chat-session-checkbox:hover,
#chat-select-all:hover {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}

.chat-session-checkbox:checked,
#chat-select-all:checked {
  background-color: #667eea;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.chat-session-checkbox:checked::after,
#chat-select-all:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* 商品管理 - 复选框样式（自定义打勾） */
.product-checkbox,
#product-select-all {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  background-color: #fff;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}

.product-checkbox:hover,
#product-select-all:hover {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}

.product-checkbox:checked,
#product-select-all:checked {
  background-color: #667eea;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.product-checkbox:checked::after,
#product-select-all:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

#product-select-all:indeterminate {
  background-color: #667eea;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

#product-select-all:indeterminate::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 5px;
  width: 10px;
  height: 2px;
  background-color: #fff;
  border: none;
  transform: none;
}

/* 用户管理 - 复选框样式（自定义打勾） */
.user-checkbox,
#user-select-all {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  background-color: #fff;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}

.user-checkbox:hover,
#user-select-all:hover {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}

.user-checkbox:checked,
#user-select-all:checked {
  background-color: #667eea;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.user-checkbox:checked::after,
#user-select-all:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

#user-select-all:indeterminate {
  background-color: #667eea;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

#user-select-all:indeterminate::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 5px;
  width: 10px;
  height: 2px;
  background-color: #fff;
  border: none;
  transform: none;
}

/* 库存不足商品列表复选框样式 */
.low-stock-checkbox {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  background-color: #fff;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}

.low-stock-checkbox:hover {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}

.low-stock-checkbox:checked {
  background-color: #667eea;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.low-stock-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

#low-stock-select-all:indeterminate {
  background-color: #667eea;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

#low-stock-select-all:indeterminate::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 5px;
  width: 10px;
  height: 2px;
  background-color: #fff;
  border: none;
  transform: none;
}

#low-stock-table tbody.dragging {
  cursor: crosshair;
  user-select: none;
}

#low-stock-table tbody.dragging .low-stock-checkbox {
  cursor: crosshair;
}

#low-stock-table tbody.dragging tr:hover {
  background-color: rgba(102, 126, 234, 0.05);
}

#user-select-all:indeterminate::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 5px;
  width: 10px;
  height: 2px;
  background-color: #fff;
  border: none;
  transform: none;
}

/* 用户表格拖选时的样式 */
#user-table tbody.dragging {
  cursor: crosshair;
}

/* 商品表格拖选时的样式 */
#product-table tbody.dragging {
  cursor: crosshair;
  user-select: none;
}

#product-table tbody.dragging .product-checkbox {
  cursor: crosshair;
}

#product-table tbody.dragging tr:hover {
  background-color: rgba(102, 126, 234, 0.05);
}

.ad-details {
  flex: 1;
}

.ad-row {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.ad-row strong {
  color: #333;
  margin-right: 8px;
}

.ad-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.order-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* 结算页面 */
.checkout-main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
  background: #f8f9fa;
}

.checkout-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.checkout-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #333;
}

.checkout-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.checkout-section h2 {
  margin: 0 0 16px 0;
  font-size: 18px;
}

.address-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.address-card {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.address-card.selected {
  border-color: #667eea;
  background: #f0f4ff;
}

/* 地址标签选择样式 */
.address-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag-option {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.tag-option input[type="radio"] {
  display: none;
}

.tag-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  font-size: 14px;
  color: #666;
  background: white;
  transition: all 0.3s;
  white-space: nowrap;
}

.tag-option input[type="radio"]:checked + .tag-label {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #667eea;
  font-weight: 500;
}

.tag-option:hover .tag-label {
  border-color: #667eea;
  background: #f8f9ff;
}

/* 地址标签徽章样式 */
.address-tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #667eea;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.address-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.default-badge {
  background: #667eea;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.checkout-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.checkout-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.checkout-item-info {
  flex: 1;
}

.checkout-summary {
  background: white;
  border-radius: 12px;
  padding: 24px;
  position: sticky;
  bottom: 20px;
}

/* 支付方式样式 */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-method {
  display: flex;
  align-items: center;
  padding: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
  position: relative;
}

.payment-method:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.payment-method input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* 自定义复选框样式 */
.payment-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #ddd;
  border-radius: 4px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
  background: white;
  position: relative;
}

.payment-checkmark {
  color: white;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s;
}

.payment-method input[type="radio"]:checked ~ .payment-checkbox {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

.payment-method input[type="radio"]:checked ~ .payment-checkbox .payment-checkmark {
  opacity: 1;
  transform: scale(1);
}

.payment-method input[type="radio"]:checked ~ .payment-checkbox ~ .payment-icon {
  transform: scale(1.1);
}

.payment-icon {
  font-size: 24px;
  margin-right: 12px;
  transition: transform 0.2s;
}

.payment-name {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.payment-method:has(input[type="radio"]:checked) {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* 全局确认弹窗（后台风格） */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.confirm-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  max-width: 90%;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  animation: modalZoomIn 0.18s ease-out;
}

.confirm-modal-header {
  padding: 16px 20px 8px;
}

.confirm-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.confirm-modal-body {
  padding: 0 20px 16px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}

.confirm-modal-footer {
  padding: 12px 20px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

@keyframes modalZoomIn {
  from {
    opacity: 0;
    transform: translate(-50%, -54%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* 确认订单页面新样式 */
.address-card-checkout {
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
  position: relative;
}

.address-card-checkout:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.address-card-checkout.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.address-checkout-content {
  flex: 1;
}

.address-checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.address-checkout-name-phone {
  display: flex;
  align-items: center;
  gap: 12px;
}

.address-name-checkout {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.address-phone-checkout {
  font-size: 15px;
  color: #666;
}

.default-badge-checkout {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 8px;
}

.selected-badge-checkout {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.address-detail-checkout {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  padding-right: 40px;
}

.address-actions-checkout {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.address-edit-link {
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.address-edit-link:hover {
  color: #5568d3;
  text-decoration: underline;
}

/* 添加地址按钮 */
.add-address-btn {
  width: 100%;
  padding: 14px;
  background: white;
  border: 2px dashed #ddd;
  border-radius: 12px;
  color: #667eea;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-address-btn:hover {
  border-color: #667eea;
  background: #f8f9ff;
  color: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

/* 商品信息卡片 */
.checkout-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.checkout-item-card:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.checkout-item-image {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: white;
  padding: 4px;
}

.checkout-item-content {
  flex: 1;
  min-width: 0;
}

.checkout-item-name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin: 0 0 10px 0;
  line-height: 1.4;
  word-break: break-word;
}

.checkout-item-details {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #666;
}

.checkout-item-price {
  color: #667eea;
  font-weight: 500;
}

.checkout-item-quantity {
  color: #999;
}

.checkout-item-subtotal-new {
  font-size: 18px;
  font-weight: 600;
  color: #dc3545;
  flex-shrink: 0;
  min-width: 80px;
  text-align: right;
}

/* 订单备注输入框 */
.order-remark-input {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s;
  box-sizing: border-box;
}

.order-remark-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 订单汇总新样式 */
.checkout-summary-new {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  bottom: 20px;
}

.summary-content {
  margin-bottom: 16px;
}

.summary-row-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
}

.summary-label {
  color: #666;
}

.summary-value {
  color: #333;
  font-weight: 500;
}

.total-row {
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 8px;
}

.summary-label-total {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.summary-value-total {
  font-size: 24px;
  font-weight: 700;
  color: #dc3545;
}

.submit-order-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.submit-order-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.submit-order-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-order-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 订单操作按钮组 */
.order-action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.cancel-order-btn {
  flex: 1;
  padding: 16px;
  background: white;
  color: #666;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.cancel-order-btn:hover {
  background: #f8f9fa;
  border-color: #999;
  color: #333;
}

.cancel-order-btn:active {
  transform: translateY(1px);
}

.submit-order-btn {
  flex: 2;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .checkout-main {
    padding: 20px 0 240px 0; /* 为底部固定汇总区域和导航栏预留空间 */
    padding-bottom: 240px; /* 确保有足够空间 */
  }
  
  .checkout-container {
    padding: 0 15px;
  }
  
  .checkout-title {
    font-size: 20px;
    margin-bottom: 20px;
  }
  
  .checkout-section {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
  }
  
  .checkout-section h2 {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
  }
  
  .address-card-checkout {
    padding: 14px;
  }
  
  .address-name-checkout {
    font-size: 15px;
  }
  
  .address-phone-checkout {
    font-size: 14px;
  }
  
  .address-detail-checkout {
    font-size: 13px;
    padding-right: 30px;
  }
  
  .checkout-item-card {
    padding: 12px;
    gap: 10px;
  }
  
  .checkout-item-image {
    width: 75px;
    height: 75px;
  }
  
  .checkout-item-name {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .checkout-item-details {
    font-size: 12px;
  }
  
  .checkout-item-subtotal-new {
    font-size: 16px;
    min-width: 70px;
  }
  
  .payment-method {
    padding: 14px;
  }
  
  .payment-icon {
    font-size: 22px;
  }
  
  .payment-name {
    font-size: 15px;
  }
  
  .order-remark-input {
    min-height: 70px;
    font-size: 13px;
  }
  
  .checkout-summary-new {
    position: fixed;
    bottom: 70px; /* 为底部导航栏预留空间 */
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 16px 16px 0 0;
    padding: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100; /* 高于底部导航栏 */
  }
  
  .summary-row-new {
    font-size: 13px;
    padding: 8px 0;
  }
  
  .summary-label-total {
    font-size: 15px;
  }
  
  .summary-value-total {
    font-size: 22px;
  }
  
  .order-action-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .cancel-order-btn {
    padding: 14px;
    font-size: 16px;
    width: 100%;
  }
  
  .submit-order-btn {
    padding: 14px;
    font-size: 16px;
    width: 100%;
  }
  
  .payment-checkbox {
    width: 20px;
    height: 20px;
  }
  
  .payment-checkmark {
    font-size: 12px;
  }
}

/* 支付页面样式 */
.payment-main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
  background: #f8f9fa;
}

.payment-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.payment-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.payment-section h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: #333;
}

.order-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #666;
}

.info-value {
  color: #333;
  font-weight: 500;
}

.payment-area {
  text-align: center;
  padding: 40px 20px;
}

.qr-code-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.qr-code-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.qr-code {
  padding: 20px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qr-code img {
  width: 300px;
  height: 300px;
  display: block;
}

.qr-code-amount {
  font-size: 20px;
  font-weight: 600;
  color: #667eea;
}

.payment-redirect {
  padding: 40px;
}

.payment-redirect p {
  margin: 12px 0;
  font-size: 16px;
  color: #666;
}

.payment-redirect a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.payment-redirect a:hover {
  text-decoration: underline;
}

.payment-button-container {
  padding: 40px;
}

.btn-payment {
  padding: 16px 48px;
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-payment:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.payment-tips {
  background: #fff9e6;
  border: 1px solid #ffd700;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.payment-tips p {
  margin: 0 0 12px 0;
  font-weight: 600;
  color: #856404;
}

.payment-tips ul {
  margin: 0;
  padding-left: 20px;
  color: #856404;
}

.payment-tips li {
  margin: 8px 0;
}

.payment-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.payment-actions .btn-primary,
.payment-actions .btn-secondary {
  padding: 12px 32px;
  font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .qr-code img {
    width: 250px;
    height: 250px;
  }
  
  .payment-actions {
    flex-direction: column;
  }
  
  .payment-actions .btn-primary,
  .payment-actions .btn-secondary {
    width: 100%;
  }
}

/* 地址管理页面 */
.addresses-main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
  background: #f8f9fa;
}

.addresses-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.addresses-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.address-card-manage {
  background: white;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.address-actions {
  display: flex;
  gap: 12px;
}

/* 模态框 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 相册模态框需要更高的z-index，确保显示在其他模态框之上 */
#gallery-modal {
  z-index: 100000 !important;
}

.modal[style*="display: flex"] {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #eee;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 24px;
}

.modal-body textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
}

.modal-body textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.required {
  color: #dc3545;
  margin-left: 2px;
}

.btn-edit {
  padding: 6px 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s;
  margin-right: 6px;
  white-space: nowrap;
}

.btn-edit:hover {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn-delete {
  padding: 6px 12px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-delete:hover {
  background: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* 操作列按钮组样式 */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  justify-content: center;
}

.action-buttons button {
  flex-shrink: 0;
  min-width: 60px;
}

/* 会员等级表格操作列样式 */
#membership-levels-list .data-table th:last-child,
#membership-levels-list .data-table td:last-child {
  min-width: 140px;
  text-align: center;
}

.btn-secondary {
  padding: 10px 20px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-secondary:hover {
  background: #5a6268;
}

.address-form {
  padding: 24px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* 通用样式 */
.loading, .empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
}

.empty-state p {
  margin-bottom: 16px;
}

/* 后台管理样式 */
.admin-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center; /* 垂直居中 */
  justify-content: center !important; /* 强制水平居中 */
  padding: 20px;
  box-sizing: border-box;
  width: 100%;
  overflow-x: auto; /* 如果内容超出，允许横向滚动 */
  position: relative; /* 确保定位正确 */
}

/* 确保admin-panel在wrapper中居中 */
.admin-wrapper > .admin-panel {
  flex-shrink: 0 !important; /* 防止flex收缩 */
  margin-left: auto !important; /* 强制左对齐到中心 */
  margin-right: auto !important; /* 强制右对齐到中心 */
  margin-top: auto !important; /* 垂直居中 */
  margin-bottom: auto !important; /* 垂直居中 */
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
}

.admin-login-container {
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
}

/* 当admin-panel显示时，admin-login-container不限制宽度，让admin-panel可以完整显示 */
.admin-login-container:has(#admin-panel:not([style*="display: none"])) {
  max-width: 100% !important;
  width: 100% !important;
}

/* 确保admin-panel在admin-login-container中时不受宽度限制 */
.admin-login-container #admin-panel {
  max-width: none !important;
  width: auto !important;
}

.admin-login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 40px;
  width: 100%;
  animation: fadeInUp 0.5s ease-out;
}

.admin-login-header {
  text-align: center;
  margin-bottom: 32px;
}

.admin-login-header h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: #333;
}

.admin-login-header p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.admin-login-form {
  width: 100%;
}


.btn-admin-login {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
  min-height: 48px;
}

.btn-admin-login:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-admin-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-admin-login:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.admin-login-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.admin-login-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.admin-login-footer a:hover {
  text-decoration: underline;
}

/* 管理面板样式 */
.admin-panel {
  width: auto; /* 改为auto */
  max-width: 1600px;
  min-width: 1024px; /* 最小宽度1024px，适应1024x768分辨率 */
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 40px;
  margin: 0 auto !important; /* 强制水平居中 */
  box-sizing: border-box;
  overflow-x: auto; /* 允许横向滚动，如果屏幕小于1024px */
  overflow-y: auto;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  flex-shrink: 0 !important; /* 防止flex收缩，确保居中 */
  position: relative;
  left: 0 !important;
  right: 0 !important;
}

/* 电脑端优化 - 1024px及以上 */
@media (min-width: 1024px) {
  .admin-wrapper {
    padding: 20px;
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 确保水平居中 */
  }
  
  .admin-panel {
    padding: 40px;
    min-width: 1024px; /* 确保最小宽度1024px */
    width: auto; /* 改为auto */
    max-width: 1600px; /* 最大宽度1600px，适应大屏幕 */
    margin: 0 auto !important; /* 强制水平居中 */
    flex-shrink: 0 !important; /* 防止flex收缩 */
    position: relative;
    left: 0 !important;
    right: 0 !important;
  }
  
  .admin-panel-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .admin-panel-header h1 {
    font-size: 28px;
  }
  
  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: visible;
    gap: 12px;
  }
  
  .tab-btn {
    padding: 12px 24px;
    font-size: 16px;
    white-space: nowrap;
  }
  
  .card {
    padding: 24px;
    margin: 16px 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  .card h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }
  
  .row {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .row input,
  .search-input {
    flex: 1 1 auto;
    min-width: 150px;
    max-width: calc(100% - 180px);
    margin-left: 0;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  .row button {
    flex-shrink: 0;
    min-width: auto;
  }
  
  .table-container {
    width: 100%;
    overflow-x: auto;
  }
  
  table {
    font-size: 14px;
    width: 100%;
    min-width: 900px; /* 确保表格最小宽度 */
  }
  
  th, td {
    padding: 12px 16px;
    white-space: nowrap;
  }
  
  /* 优化表格列宽 */
  #user-table th:nth-child(1), #user-table td:nth-child(1) { width: 60px; } /* ID */
  #user-table th:nth-child(2), #user-table td:nth-child(2) { width: 120px; } /* 用户名 */
  #user-table th:nth-child(3), #user-table td:nth-child(3) { width: 180px; } /* 邮箱 */
  #user-table th:nth-child(4), #user-table td:nth-child(4) { width: 130px; } /* 手机号 */
  #user-table th:nth-child(5), #user-table td:nth-child(5) { width: 80px; } /* 角色 */
  #user-table th:nth-child(6), #user-table td:nth-child(6) { width: 80px; } /* 状态 */
  #user-table th:nth-child(7), #user-table td:nth-child(7) { width: 160px; } /* 注册时间 */
  #user-table th:nth-child(8), #user-table td:nth-child(8) { width: 160px; } /* 更新时间 */
  #user-table th:nth-child(9), #user-table td:nth-child(9) { width: 150px; } /* 操作 */
  
  #product-table th:nth-child(1), #product-table td:nth-child(1) { width: 60px; } /* ID */
  #product-table th:nth-child(2), #product-table td:nth-child(2) { width: 200px; } /* 商品名称 */
  #product-table th:nth-child(3), #product-table td:nth-child(3) { width: 100px; } /* 货号 */
  #product-table th:nth-child(4), #product-table td:nth-child(4) { width: 120px; } /* 国际条码 */
  #product-table th:nth-child(5), #product-table td:nth-child(5) { width: 100px; } /* 价格 */
  #product-table th:nth-child(6), #product-table td:nth-child(6) { width: 100px; } /* 库存 */
  #product-table th:nth-child(7), #product-table td:nth-child(7) { width: 120px; } /* 分类 */
  #product-table th:nth-child(8), #product-table td:nth-child(8) { width: 100px; } /* 状态 */
  #product-table th:nth-child(9), #product-table td:nth-child(9) { width: 150px; } /* 操作 */
}

/* 中等屏幕尺寸优化（平板和小桌面） */
@media (min-width: 768px) and (max-width: 1023px) {
  .admin-wrapper {
    padding: 15px;
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
  }
  
  .admin-panel {
    max-width: 98%;
    padding: 24px;
    min-width: 768px; /* 平板最小宽度 */
    margin: 0 auto !important; /* 强制水平居中 */
    position: relative;
    left: 0 !important;
    right: 0 !important;
  }
  
  .admin-panel-header {
    flex-direction: row;
    align-items: center;
  }
  
  .admin-panel-header h1 {
    font-size: 24px;
  }
  
  .admin-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .tab-btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .card {
    padding: 20px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  .row {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .row input,
  .search-input {
    flex: 1 1 auto;
    min-width: 150px;
    max-width: 100%;
    margin-left: 12px;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  .row button {
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .table-container {
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
  }
  
  table {
    font-size: 13px;
    min-width: 800px;
  }
  
  th, td {
    padding: 10px 8px;
  }
}

/* 大屏幕优化（桌面端） - 1024px到1440px */
@media (min-width: 1024px) and (max-width: 1440px) {
  .admin-wrapper {
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 确保水平居中 */
  }
  
  .admin-panel {
    max-width: 95%;
    width: auto; /* 改为auto */
    padding: 35px;
    min-width: 1024px;
    margin: 0 auto !important; /* 强制水平居中 */
    flex-shrink: 0 !important; /* 防止flex收缩 */
    position: relative;
    left: 0 !important;
    right: 0 !important;
  }
  
  table {
    min-width: 900px;
  }
}

/* 超大屏幕优化 - 1441px及以上 */
@media (min-width: 1441px) {
  .admin-wrapper {
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 确保水平居中 */
  }
  
  .admin-panel {
    max-width: 1600px;
    width: auto; /* 改为auto */
    padding: 40px;
    min-width: 1024px;
    margin: 0 auto !important; /* 强制水平居中 */
    flex-shrink: 0 !important; /* 防止flex收缩 */
    position: relative;
    left: 0 !important;
    right: 0 !important;
  }
  
  table {
    min-width: 1000px;
  }
  
  .card {
    padding: 30px;
  }
}

.admin-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid #eee;
  flex-shrink: 0;
}

.admin-panel-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: #333;
  flex: 1;
}

.admin-header-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-right: 12px;
}

.header-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 14px;
}

.header-stat-item span:first-child {
  color: #666;
}

#header-online-count {
  color: #10b981;
  font-weight: 600;
}

#header-today-registered {
  color: #667eea;
  font-weight: 600;
}

.btn-admin-logout {
  padding: 10px 20px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-admin-logout:hover {
  background: #c82333;
}

.admin-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

/* 菜单栏样式已在admin.html中定义，这里保留基础样式作为后备 */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0;
  flex-wrap: wrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.tab-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: white;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #495057;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  min-height: 48px;
}

.tab-btn:hover {
  color: #667eea;
  background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
  border-color: #e0e7ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.tab-btn.active {
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
}

.tab-content {
  margin-top: 24px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

.order-card-admin {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  overflow: visible;
}

.order-header-admin {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  position: relative;
}

.order-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  align-items: center;
}

.order-info-item {
  font-size: 14px;
  color: #666;
}

.order-info-item strong {
  color: #333;
  margin-right: 4px;
}

.order-status-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.order-status-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.order-status-label strong {
  color: #333;
  min-width: 80px;
}

.order-status-display {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.order-status-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
}

.order-status-badge-pending {
  background: #fff3cd;
  color: #856404;
}

.order-status-badge-paid {
  background: #d1ecf1;
  color: #0c5460;
}

.order-status-badge-shipped {
  background: #d4edda;
  color: #155724;
}

.order-status-badge-completed {
  background: #d1ecf1;
  color: #0c5460;
}

.order-status-badge-cancelled {
  background: #f8d7da;
  color: #721c24;
}

/* 筛选行样式 */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.filter-row > button {
  margin-left: 0;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
  flex: 0 0 auto;
}

.filter-group label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  margin-bottom: 2px;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
  height: 38px;
  box-sizing: border-box;
}

.filter-select[type="text"],
.filter-select[type="number"] {
  cursor: text;
  min-width: 140px;
}

.filter-group input.filter-select {
  width: 100%;
}

.filter-select:hover {
  border-color: #667eea;
}

.filter-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.order-filter-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
}

.order-filter-select:hover {
  border-color: #667eea;
}

.order-filter-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 订单状态操作按钮 */
.order-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-status-action {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-status-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-status-accept {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.btn-status-accept:hover:not(:disabled) {
  background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-status-ship {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
}

.btn-status-ship:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-status-complete {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-status-complete:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-status-cancel {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.btn-status-cancel:hover:not(:disabled) {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.order-items-admin {
  margin: 16px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
}

.order-items-admin strong {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.order-item-row {
  padding: 6px 0;
  font-size: 14px;
  color: #666;
  border-bottom: 1px solid #e9ecef;
}

.order-item-row:last-child {
  border-bottom: none;
}

.order-address-admin {
  margin-top: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.order-address-admin strong {
  color: #333;
  margin-right: 4px;
}

/* 快递信息样式 */
.order-express-admin {
  margin-top: 12px;
  padding: 16px;
  background: #fff9e6;
  border: 1px solid #ffd700;
  border-radius: 8px;
  font-size: 14px;
}

.express-info-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.express-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.express-label strong {
  color: #333;
  white-space: nowrap;
  min-width: 80px;
}

.express-company-select,
.express-no-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  min-width: 150px;
}

.express-company-select:focus,
.express-no-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.express-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.btn-express-print,
.btn-express-update {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.btn-express-print {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-express-print:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-express-update {
  background: #28a745;
  color: white;
}

.btn-express-update:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.express-print-time {
  color: #666;
  font-size: 12px;
  margin-left: auto;
}

.express-hint {
  color: #999;
  font-size: 12px;
  font-style: italic;
}

.express-company-other-input {
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  display: none;
}

.express-company-other-input.show {
  display: block;
}

/* 物流跟踪信息样式 */
.express-tracking-info {
  margin-top: 12px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.tracking-loading {
  text-align: center;
  color: #666;
  padding: 20px;
}

.tracking-error {
  color: #d6336c;
  padding: 12px;
  background: #f8d7da;
  border-radius: 6px;
}

.tracking-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dee2e6;
}

.tracking-header strong {
  color: #333;
  margin-right: 8px;
}

.tracking-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.tracking-status-0 { background: #fff3cd; color: #856404; }
.tracking-status-1 { background: #cfe2ff; color: #084298; }
.tracking-status-2 { background: #f8d7da; color: #842029; }
.tracking-status-3 { background: #d1e7dd; color: #0f5132; }
.tracking-status-4 { background: #f8d7da; color: #842029; }
.tracking-status-5 { background: #cfe2ff; color: #084298; }
.tracking-status-6 { background: #f8d7da; color: #842029; }
.tracking-status-7 { background: #fff3cd; color: #856404; }

.tracking-timeline {
  position: relative;
  padding-left: 24px;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #dee2e6;
}

.tracking-item {
  position: relative;
  margin-bottom: 16px;
  padding-left: 24px;
}

.tracking-item::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #dee2e6;
  border: 2px solid white;
}

.tracking-item-latest::before {
  background: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.tracking-time {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.tracking-content {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

/* 订单复选框样式 */
.order-checkbox-wrapper {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 100;
  pointer-events: auto !important;
}

.order-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  cursor: pointer;
  position: relative;
  z-index: 101;
  pointer-events: auto !important;
  margin: 0;
  flex-shrink: 0;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  -webkit-appearance: checkbox !important;
  -moz-appearance: checkbox !important;
  appearance: checkbox !important;
  accent-color: #667eea;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.order-checkbox:checked {
  accent-color: #667eea;
  background-color: #667eea;
  border-color: #667eea;
}

.order-checkbox:focus {
  outline: 2px solid rgba(102, 126, 234, 0.3);
  outline-offset: 2px;
}

.order-checkbox-wrapper label,
.order-checkbox-label {
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: #666;
  position: relative;
  z-index: 101;
  pointer-events: auto !important;
  margin: 0;
  padding: 0;
  display: inline-block;
  line-height: 18px;
}

.order-checkbox-label:hover {
  color: #667eea;
}

.order-select-all-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 12px;
}

#selected-orders-count {
  margin-left: auto;
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

/* 批量打印按钮 */
.btn-batch-print {
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-batch-print:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 快递按钮样式 */
.btn-express-tracking,
.btn-express-electronic,
.btn-express-auto {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.btn-express-tracking {
  background: #17a2b8;
  color: white;
}

.btn-express-tracking:hover {
  background: #138496;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-express-electronic {
  background: #6c757d;
  color: white;
}

.btn-express-electronic:hover {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-express-auto {
  background: #ffc107;
  color: #000;
}

.btn-express-auto:hover {
  background: #e0a800;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .order-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .order-status-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .order-status-select {
    width: 100%;
  }
}

/* 个人中心样式 */
.profile-main {
  min-height: calc(100vh - 200px);
  padding: 0;
  background: #f5f5f5;
  position: relative;
}

.profile-content {
  display: block;
}

/* 顶部用户信息区域 */
.profile-header {
  background: linear-gradient(135deg, #ffebee 0%, #fce4ec 50%, #ffffff 100%);
  padding: 60px 20px 30px;
  margin-bottom: 0;
}

.profile-header-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  flex-shrink: 0;
}

.avatar-wrapper {
  position: relative;
  width: 60px;
  height: 60px;
}

.avatar-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.avatar-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #667eea;
  border: 2px solid white;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s;
}

.avatar-edit-btn:hover {
  background: #5568d3;
  transform: scale(1.1);
}

.avatar-edit-btn:active {
  transform: scale(0.95);
}

.profile-header-info {
  flex: 1;
  min-width: 0;
}

.profile-username-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.profile-username {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
}

.profile-star {
  font-size: 20px;
  color: #ffc107;
}

.profile-member-code {
  font-size: 14px;
  color: #666;
}

.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-settings-btn,
.profile-target-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: color 0.2s;
}

.profile-settings-btn:hover,
.profile-target-btn:hover {
  color: #333;
}

.profile-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.error-state {
  background: white;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.error-state p {
  font-size: 16px;
  color: #721c24;
  margin-bottom: 24px;
}

.error-state .btn-primary,
.error-state .btn-secondary {
  margin: 0 8px;
}

.profile-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 订单状态网格 */
.order-status-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 8px 0;
}

.order-status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s;
}

.order-status-item:hover {
  transform: translateY(-2px);
}

.order-status-icon-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-status-icon {
  font-size: 28px;
}

.order-status-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff4444;
  color: white;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(255, 68, 68, 0.3);
}

.order-status-label {
  font-size: 13px;
  color: #666;
}

.profile-card-link {
  font-size: 14px;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.profile-card-link:hover {
  color: #667eea;
}

.profile-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s;
}

.profile-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.profile-orders-card {
  margin-top: -10px;
  border-radius: 16px 16px 12px 12px;
}

.profile-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: none;
}

/* 列表项样式 */
.profile-list {
  display: flex;
  flex-direction: column;
}

.profile-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.profile-list-item:last-child {
  border-bottom: none;
}

.profile-list-item:hover {
  background-color: #fafbfc;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}

.profile-list-label {
  font-size: 15px;
  color: #333;
}

.profile-list-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-list-value {
  font-size: 15px;
  color: #999;
}

.profile-list-arrow {
  font-size: 16px;
  color: #ccc;
}

.profile-list-icon {
  font-size: 18px;
  color: #999;
}

.profile-list-item.invitation-highlight {
  background: linear-gradient(90deg, #fff7e6 0%, #ffeaa7 50%, #ffffff 100%);
  border-radius: 12px;
  margin: 4px -16px;
  padding-left: 20px;
  padding-right: 20px;
  position: relative;
}

.profile-list-item.invitation-highlight .profile-list-label {
  font-weight: 600;
  color: #d35400;
}

.profile-list-item.invitation-highlight .profile-list-icon {
  color: #e67e22;
}

.profile-list-item.invitation-highlight::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4757;
  box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.25);
}

.profile-version {
  position: fixed;
  bottom: 80px;
  right: 20px;
  color: #999;
  font-size: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
  pointer-events: none;
}

@media (max-width: 768px) {
  .profile-version {
    bottom: 70px;
    right: 10px;
    font-size: 11px;
    padding: 6px 10px;
  }
}

/* 后台用户列表头像样式 */
.user-avatar-cell {
  width: 60px;
  padding: 8px !important;
}

.user-avatar-wrapper-small {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0 auto;
}

.user-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e0e0;
}

.user-avatar-placeholder-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: white;
  border: 2px solid #e0e0e0;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.action-btn:hover::before {
  left: 100%;
}

.action-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
  border-color: transparent;
}

.action-btn:active {
  transform: translateY(-2px);
}

.action-icon {
  font-size: 32px;
  margin-bottom: 8px;
  transition: transform 0.3s;
}

.action-btn:hover .action-icon {
  transform: scale(1.1);
}

.action-btn span:not(.action-icon) {
  font-size: 14px;
  font-weight: 500;
}

/* 退出登录样式 */
.logout-section {
  padding: 8px 0;
}

.btn-logout {
  width: 100%;
  padding: 14px 24px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-logout:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-logout:active {
  transform: translateY(0);
}

.logout-icon {
  font-size: 18px;
}

/* 设置模态框 */
.profile-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  z-index: 1000;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.profile-settings-content {
  background: white;
  width: 100%;
  border-radius: 16px 16px 0 0;
  padding: 20px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.profile-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.profile-settings-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.profile-settings-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-settings-list {
  display: flex;
  flex-direction: column;
}

.profile-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.profile-settings-item:last-child {
  border-bottom: none;
}

.profile-settings-item:hover {
  background-color: #fafbfc;
}

.profile-settings-logout {
  color: #ff4444;
}

/* 编辑表单模态框 */
.profile-edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s;
}

.profile-edit-modal-content {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  animation: scaleIn 0.3s;
  position: relative;
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.profile-edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.profile-edit-modal-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.3px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

.profile-edit-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 300;
}

.profile-edit-modal-close:hover {
  color: #333;
  transform: scale(1.1);
}

.profile-edit-form-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

/* 确保下拉菜单在模态框内正确显示 */
.profile-edit-form-content .form-group {
  position: relative;
  margin-bottom: 20px;
}

.profile-edit-form-content .form-group:last-child {
  margin-bottom: 0;
}

.btn-edit {
  padding: 10px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-edit::before {
  content: '✏️';
  font-size: 14px;
}

.btn-edit:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-edit:active {
  transform: translateY(0);
}

.profile-edit-form {
  margin-top: 20px;
}

.profile-edit-form .form-group {
  margin-bottom: 24px;
}

.profile-edit-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.2px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
}

.profile-edit-form input[type="text"],
.profile-edit-form input[type="email"],
.profile-edit-form input[type="tel"],
.profile-edit-form input[type="password"],
.profile-edit-form input[type="month"],
.profile-edit-form select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 400;
  color: #2c3e50;
  box-sizing: border-box;
  transition: all 0.3s ease;
  background: #fafbfc;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  letter-spacing: 0.1px;
}

/* 会员码只读字段特殊样式 */
.profile-edit-form input[readonly] {
  background: #f5f7fa;
  color: #5a6c7d;
  font-weight: 500;
  cursor: not-allowed;
  border-color: #d1d9e0;
}

/* 输入框 placeholder 样式优化 */
.profile-edit-form input::placeholder,
.profile-edit-form select::placeholder {
  color: #b0b8c1;
  font-weight: 400;
  opacity: 1;
}

.profile-edit-form .form-group {
  position: relative;
}

.profile-edit-form input:focus,
.profile-edit-form select:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.profile-edit-form input:hover:not(:focus),
.profile-edit-form select:hover:not(:focus) {
  border-color: #ccc;
  background: white;
}

.profile-edit-form .form-hint {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #7f8c8d;
  padding-left: 4px;
  line-height: 1.6;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.1px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.section-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-save-section {
  padding: 8px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-save-section:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-save-section:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-actions .btn-primary {
  padding: 14px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  flex: 1;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.form-actions .btn-secondary {
  padding: 14px 32px;
  background: white;
  color: #5a6c7d;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  flex: 1;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

.form-actions .btn-secondary:hover {
  background: #f8f9fa;
  border-color: #ccc;
  color: #2c3e50;
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.profile-edit-form .form-message {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.2px;
  line-height: 1.5;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-message.success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border: 1px solid #c3e6cb;
  box-shadow: 0 2px 8px rgba(21, 87, 36, 0.1);
}

.form-message.error {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border: 1px solid #f5c6cb;
  box-shadow: 0 2px 8px rgba(114, 28, 36, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .profile-header {
    padding: 50px 16px 24px;
  }

  .profile-container {
    padding: 0 16px 100px;
  }

  .profile-card {
    padding: 16px;
    margin-bottom: 12px;
  }

  .order-status-grid {
    gap: 12px;
  }
  
  .order-status-icon-wrapper {
    width: 44px;
    height: 44px;
  }
  
  .order-status-icon {
    font-size: 24px;
  }

  .order-status-label {
    font-size: 12px;
  }
  
  .profile-list-item {
    padding: 14px 0;
  }
  
  .profile-list-item:hover {
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .profile-edit-modal {
    padding: 16px;
    align-items: flex-end;
  }
  
  .profile-edit-modal-content {
    padding: 20px;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
}

  .profile-edit-form select {
    font-size: 16px; /* 防止iOS自动缩放 */
    min-height: 44px;
}
}


/* 响应式 */
@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  
  .header-nav {
    gap: 8px;
  }
  
  .nav-link {
    padding: 6px 8px;
    font-size: 14px;
  }
  
  .cart-table {
    display: none;
  }
  
  .cart-items-mobile {
    display: block;
  }
  
  /* 购物车汇总区域移动端优化 */
  .cart-summary {
    padding: 16px;
  }
  
  .summary-row {
    font-size: 14px;
    padding: 10px 0;
  }
  
  .summary-row.total {
    font-size: 18px;
    padding: 12px 0;
  }
  
  #checkout-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 16px;
  }
  
  .cart-item-info {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .order-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .order-header-admin {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 订单通知徽章 */
.order-notification-badge,
.return-notification-badge,
.chat-unread-badge {
  display: inline-block;
  background: #dc3545;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  margin-left: 6px;
  min-width: 18px;
  text-align: center;
  line-height: 16px;
  vertical-align: middle;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.tab-btn {
  position: relative;
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 90; /* 低于订单汇总区域 */
  padding: 8px 0;
  border-top: 1px solid #f0f0f0;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  text-decoration: none;
  color: #666;
  position: relative;
  transition: all 0.3s;
  cursor: pointer;
  min-width: 0;
}

.bottom-nav-item.active {
  color: #667eea;
}

.bottom-nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.bottom-nav-label {
  font-size: 10px;
  font-weight: 500;
}

.bottom-nav-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: #dc3545;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 14px;
}

/* 分类页面样式 */
.page-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.page-header h1 {
  font-size: 24px;
  color: #333;
  margin: 0;
}

.categories-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.category-page-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
}

.category-page-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.category-page-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
  overflow: hidden;
  margin-bottom: 12px;
}

.category-page-item:hover .category-page-icon-wrapper {
  border-color: #667eea;
  background: #f0f4ff;
}

.category-page-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-page-icon-placeholder {
  font-size: 32px;
  font-weight: 600;
  color: #666;
  text-align: center;
  line-height: 80px;
}

.category-page-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-bottom: 4px;
}

.category-page-description {
  font-size: 12px;
  color: #999;
  text-align: center;
  line-height: 1.4;
  max-height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state p {
  font-size: 16px;
  margin: 0;
}

@media (max-width: 768px) {
  .categories-page-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
    padding: 16px;
  }
  
  .category-page-icon-wrapper {
    width: 70px;
    height: 70px;
  }
  
  .category-page-icon-placeholder {
    font-size: 28px;
    line-height: 70px;
  }
  
  .category-page-name {
    font-size: 13px;
  }
  
  .category-page-description {
    font-size: 11px;
  }
  
  .page-header h1 {
    font-size: 20px;
  }
}

/* 个人中心通知红点（底部导航） */
.bottom-nav-dot {
  padding: 0;
  min-width: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  line-height: 8px;
  right: 16px;
}

/* 头部分类导航 - 重新设计 */
.category-nav-header {
  position: relative;
  display: flex;
  align-items: center;
}

.category-nav-trigger {
  color: #667eea;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  white-space: nowrap;
}

.category-nav-trigger:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transform: translateY(-1px);
}

.category-nav-trigger:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.category-nav-trigger::after {
  content: '▼';
  font-size: 10px;
  margin-left: 2px;
  transition: transform 0.3s ease;
  opacity: 0.9;
}

.category-nav-header.active .category-nav-trigger::after {
  transform: rotate(180deg);
}

/* 头部分类下拉菜单 - 重新设计 */
.category-dropdown-header {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 180px;
  max-width: 280px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.category-dropdown-header.show {
  max-height: 400px;
  overflow-y: auto;
  opacity: 1;
  transform: translateY(0);
}

/* 底部分类下拉菜单（保留用于兼容） */
.category-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 12px 12px 0 0;
  padding: 12px 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  margin-bottom: 8px;
}

.category-dropdown.show {
  max-height: 300px;
  overflow-y: auto;
}

.category-dropdown-item {
  display: block;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  font-size: 14px;
}

.category-dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.category-dropdown-item:hover,
.category-dropdown-item:active {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
  color: #667eea;
  padding-left: 24px;
}

.category-dropdown-item:hover::before,
.category-dropdown-item:active::before {
  height: 60%;
}

/* 商品详情页固定底部操作栏 */
.product-fixed-actions {
  position: fixed;
  bottom: 60px; /* 在底部导航栏上方 */
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  display: none; /* 默认隐藏，移动端显示 */
  z-index: 95; /* 高于底部导航栏 */
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  align-items: center;
  gap: 12px;
}

/* PC端隐藏固定操作栏 */
@media (min-width: 769px) {
  .product-fixed-actions {
    display: none !important;
  }
}

.product-fixed-actions-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.product-action-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s;
  color: #666;
  min-width: 50px;
}

.product-action-icon-btn:hover {
  color: #667eea;
  transform: translateY(-2px);
}

.product-action-icon-btn.active {
  color: #dc3545;
}

.product-action-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.product-action-label {
  font-size: 10px;
  font-weight: 500;
}

.product-fixed-actions-right {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.btn-fixed {
  flex: 1;
  max-width: 120px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-fixed.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-fixed.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-fixed.btn-secondary {
  background: #ffffff;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-fixed.btn-secondary:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

/* 移动端显示底部导航栏 */
@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }
  
  .product-fixed-actions {
    display: flex;
  }
  
  /* 移动端商品详情页样式 */
  .product-info-section {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 16px;
  }
  
  .product-title {
    font-size: 18px;
  }
  
  .current-price {
    font-size: 28px;
  }
  
  .price-symbol {
    font-size: 18px;
  }
  
  .product-action-buttons {
    flex-direction: column;
  }
  
  .btn-cart,
  .btn-buy {
    width: 100%;
  }
  
  .detail-tabs {
    overflow-x: auto;
  }
  
  .detail-tab {
    padding: 12px 20px;
    font-size: 14px;
    white-space: nowrap;
  }
  
  .spec-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .spec-label {
    font-weight: 600;
  }
  
  .product-detail-main {
    padding: 10px 0;
    padding-bottom: 140px; /* 底部导航栏(60px) + 固定操作栏(80px) */
  }
  
  .product-detail-container {
    padding: 0 10px;
  }
  
  .product-info-section,
  .product-detail-section {
    margin-bottom: 10px;
  }
  
  /* 为底部导航栏和固定操作栏预留空间 */
  .shop-main,
  .cart-main,
  .orders-main,
  .profile-main,
  .addresses-main {
    padding-bottom: 140px; /* 底部导航栏(60px) + 固定操作栏(80px) */
  }
  
  body {
    padding-bottom: 140px;
  }
  
  /* 隐藏顶部导航栏中的主要导航项（在移动端） */
  .header-nav .nav-link:not(.mobile-only) {
    display: none;
  }
  
  /* 保留分类导航、用户菜单和登录/注册按钮在顶部 */
  .header-nav .category-nav-header,
  .header-nav .user-menu,
  .header-nav #login-btn,
  .header-nav #register-btn {
    display: block;
  }
  
  /* 头部分类下拉菜单移动端样式 */
  .category-dropdown-header {
    min-width: 120px;
    max-width: 200px;
  }
}

/* 库存预警样式 */
.stock-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d32f2f;
  font-weight: 600;
}

.alert-badge {
  display: inline-block;
  padding: 2px 8px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: #ffffff;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(211, 47, 47, 0.3);
  animation: pulse-alert 2s ease-in-out infinite;
}

@keyframes pulse-alert {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* 商品列表中的预警行高亮 */
#product-table tbody tr:has(.stock-alert) {
  background-color: #fff3e0;
}

#product-table tbody tr:has(.stock-alert):hover {
  background-color: #ffe0b2;
}

/* 商品行双击编辑样式 */
#product-table tbody tr.product-row {
  user-select: none; /* 防止双击时选中文本 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  transition: background-color 0.2s ease;
}

#product-table tbody tr.product-row:hover {
  background-color: #f0f4ff !important; /* 悬停时高亮显示 */
}

#product-table tbody tr.product-row:active {
  background-color: #e0e8ff !important; /* 点击时更深的颜色 */
}

/* 库存预警横幅样式 */
.stock-alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-radius: 8px;
  border: 1px solid #ffb74d;
  width: 100%;
  box-sizing: border-box;
}

.alert-icon {
  font-size: 20px;
}

.alert-text {
  color: #d84315;
  font-weight: 600;
  font-size: 14px;
}

.alert-text strong {
  color: #d32f2f;
  font-size: 18px;
}

.btn-view-alert {
  padding: 6px 16px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(211, 47, 47, 0.3);
}

.btn-view-alert:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(211, 47, 47, 0.4);
}

.btn-set-threshold {
  padding: 6px 12px;
  background: #ffffff;
  color: #d84315;
  border: 1px solid #ffb74d;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.btn-set-threshold:hover {
  background: #fff3e0;
  transform: rotate(90deg);
}

/* 库存不足商品列表样式 */
#low-stock-table {
  width: 100%;
  border-collapse: collapse;
}

#low-stock-table th {
  background: #f5f5f5;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
}

#low-stock-table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
}

#low-stock-table tbody tr:hover {
  background-color: #f9f9f9;
}

.restock-qty {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px;
  font-size: 14px;
}

.restock-qty:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.btn-restock {
  padding: 6px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
}

.btn-restock:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* 批量补货按钮样式 */
#btn-batch-restock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#btn-batch-restock:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#btn-batch-restock:active:not(:disabled) {
  transform: translateY(0);
}

#btn-batch-restock:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#batch-restock-progress {
  font-size: 13px;
  opacity: 0.9;
}

/* 页脚样式 */
.site-footer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h3 {
  margin: 0 0 15px 0;
  font-size: 20px;
  font-weight: 600;
}

.footer-section h4 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
}

.footer-section p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
}

.footer-section a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-section a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
}

.site-copyright {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}

#contact-email,
#contact-phone {
  display: block;
  margin: 8px 0;
}

#contact-email strong,
#contact-phone strong {
  margin-right: 8px;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .site-footer {
    padding: 30px 15px 15px;
    margin-top: 40px;
  }
}

/* ========== 版本升级弹窗样式 ========== */
.version-update-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.version-update-modal.show {
  opacity: 1;
  visibility: visible;
}

.version-update-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.version-update-content {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(-20px);
  transition: transform 0.3s ease;
  z-index: 10001;
}

.version-update-modal.show .version-update-content {
  transform: scale(1) translateY(0);
}

.version-update-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.version-update-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.version-update-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.version-update-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.version-update-body {
  padding: 24px;
}

.version-info {
  margin-bottom: 20px;
}

.version-info p {
  margin: 8px 0;
  font-size: 15px;
  color: #374151;
}

.version-info strong {
  color: #1f2937;
  margin-right: 8px;
}

.version-current {
  color: #6b7280;
  font-family: 'Courier New', monospace;
}

.version-latest {
  color: #10b981;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.version-release-notes {
  margin-top: 20px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.version-release-notes h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #1f2937;
}

.release-notes-content {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ========== 分类详情页样式 ========== */

/* 搜索栏 */
.category-detail-search {
  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 100;
}

.category-detail-search .search-container {
  display: flex;
  gap: 10px;
  max-width: 100%;
}

.category-detail-search .search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  font-size: 14px;
  background: #f5f5f5;
  outline: none;
}

.category-detail-search .search-input:focus {
  background: #fff;
  border-color: #1a73e8;
}

.category-detail-search .search-btn {
  padding: 10px 24px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.category-detail-search .search-btn:active {
  background: #1557b0;
}

/* 横向分类导航 */
.category-horizontal-nav {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-horizontal-nav::-webkit-scrollbar {
  display: none;
}

.category-nav-wrapper {
  padding: 12px 16px;
  min-width: max-content;
}

.category-nav-list {
  display: flex;
  gap: 16px;
  align-items: center;
}

.category-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #666;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 60px;
  background: #f5f5f5;
}

.category-nav-item.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  transform: scale(1.05);
}

.category-nav-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.category-nav-item.active .category-nav-icon {
  background: rgba(255, 255, 255, 0.3);
}

.category-nav-icon-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
}

.category-nav-label {
  font-size: 12px;
  font-weight: 500;
}

/* 排序和筛选栏 */
.category-sort-filter-bar {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-sort-filter-bar::-webkit-scrollbar {
  display: none;
}

.sort-filter-list {
  display: flex;
  gap: 16px;
  align-items: center;
  min-width: max-content;
}

.sort-filter-item {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sort-filter-item:hover {
  background: #f5f5f5;
  color: #333;
}

.sort-filter-item.active {
  background: #e3f2fd;
  color: #1a73e8;
  font-weight: 500;
}

.sort-arrow {
  font-size: 12px;
  opacity: 0.7;
}

/* 主要内容区域 */
.category-detail-main {
  display: flex;
  min-height: calc(100vh - 200px);
  background: #f8f9fa;
}

/* 左侧分类侧边栏 */
.category-sidebar {
  width: 90px;
  background: #fff;
  border-right: 1px solid #e5e5e5;
  flex-shrink: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar-category-list {
  padding: 12px 0;
}

.sidebar-category-item {
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f5f5f5;
}

.sidebar-category-item:hover {
  background: #f8f9fa;
}

.sidebar-category-item.active {
  background: #e3f2fd;
  border-left-color: #1a73e8;
}

.sidebar-category-name {
  font-size: 13px;
  color: #333;
  font-weight: 500;
  display: block;
}

.sidebar-category-item.active .sidebar-category-name {
  color: #1a73e8;
  font-weight: 600;
}

/* 右侧产品列表 */
.category-products-section {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.category-products-section .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.category-products-section .product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.category-products-section .product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.category-products-section .product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* 分类详情页商品图片样式 - 与主页保持一致 */
.category-products-section .product-image {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f0f0f0;
  overflow: hidden;
}

.category-products-section .product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 折扣标签样式 - 与主页保持一致 */
.category-products-section .discount-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #dc3545;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.category-products-section .product-info {
  padding: 16px;
}

.category-products-section .product-name {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 12px 0;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-products-section .product-description {
  font-size: 12px;
  color: #999;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.category-products-section .product-feedback {
  font-size: 11px;
  color: #666;
  margin: 0 0 8px 0;
}

.category-products-section .product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px 0;
}

.category-products-section .product-tag {
  font-size: 10px;
  color: #1a73e8;
  background: #e3f2fd;
  padding: 2px 6px;
  border-radius: 4px;
}

.category-products-section .product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-products-section .product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.category-products-section .current-price {
  font-size: 20px;
  font-weight: bold;
  color: #dc3545;
}

.category-products-section .original-price {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
}

.category-products-section .product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

/* 购物车按钮 - 桌面端和移动端通用 */
.category-products-section .product-card {
  position: relative;
}

.category-products-section .product-cart-btn-mobile {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  z-index: 10;
}

.category-products-section .product-cart-btn-mobile:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.category-products-section .product-cart-btn-mobile:active {
  transform: scale(0.9);
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.4);
}

.category-products-section .product-cart-btn-mobile .cart-icon {
  font-size: 20px;
  line-height: 1;
}

.category-products-section .product-cart-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a73e8;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.category-products-section .product-cart-btn:active {
  background: #1557b0;
  transform: scale(0.95);
}

.category-products-section .cart-icon {
  font-size: 18px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  /* 隐藏横向分类导航和排序筛选栏 */
  .category-horizontal-nav,
  .category-sort-filter-bar {
    display: none;
  }
  
  .category-detail-main {
    flex-direction: row;
    height: calc(100vh - 200px);
  }
  
  .category-sidebar {
    width: 90px;
    border-right: 1px solid #e5e5e5;
    border-bottom: none;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
  }
  
  .sidebar-category-list {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .sidebar-category-item {
    padding: 16px 8px;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #f5f5f5;
    border-right: none;
    min-width: auto;
    white-space: normal;
    text-align: center;
  }
  
  .sidebar-category-item.active {
    background: #e3f2fd;
    border-left-color: #1a73e8;
    border-bottom: 1px solid #f5f5f5;
  }
  
  .sidebar-category-name {
    font-size: 12px;
    line-height: 1.4;
    word-break: break-all;
  }
  
  .category-products-section {
    padding: 12px;
    flex: 1;
  }
  
  /* 移动端商品列表样式 - 一行一个商品 */
  .category-products-section .products-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .category-products-section .product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
  }
  
  .category-products-section .product-card:hover {
    transform: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  }
  
  .category-products-section .product-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
  }
  
  .category-products-section .product-image {
    width: 100px;
    height: 100px;
    padding-top: 0;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 12px;
  }
  
  .category-products-section .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .category-products-section .product-info {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
  }
  
  .category-products-section .product-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    min-height: auto;
  }
  
  .category-products-section .product-price {
    margin-bottom: 6px;
  }
  
  .category-products-section .current-price {
    font-size: 18px;
    font-weight: bold;
    color: #dc3545;
  }
  
  .category-products-section .original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-left: 6px;
  }
  
  .category-products-section .product-meta {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
  }
  
  /* 购物车按钮 - 显示在商品信息右下角 */
  .category-products-section .product-cart-btn-mobile {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 10;
  }
  
  .category-products-section .product-cart-btn-mobile:active {
    transform: scale(0.9);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.4);
  }
  
  .category-products-section .product-cart-btn-mobile .cart-icon {
    font-size: 20px;
    line-height: 1;
  }
  
  .category-products-section .product-card {
    position: relative;
  }
  
  .category-products-section .product-cart-btn {
    width: 32px;
    height: 32px;
  }
  
  .category-products-section .cart-icon {
    font-size: 16px;
  }
  
  .category-products-section .discount-badge {
    top: 4px;
    right: 4px;
    font-size: 10px;
    padding: 2px 6px;
  }
}

.version-force-notice {
  margin-top: 16px;
  padding: 12px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 6px;
  color: #92400e;
  font-size: 14px;
  text-align: center;
}

.version-update-footer {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
  justify-content: flex-end;
}

.btn-version-update {
  padding: 10px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-version-update:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-version-update:active {
  transform: translateY(0);
}

.btn-version-later {
  padding: 10px 24px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-version-later:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

@media (max-width: 640px) {
  .version-update-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .version-update-header {
    padding: 16px 20px;
  }
  
  .version-update-header h3 {
    font-size: 18px;
  }
  
  .version-update-body {
    padding: 20px;
  }
  
  .version-update-footer {
    flex-direction: column;
    padding: 16px 20px;
  }
  
  .btn-version-update,
  .btn-version-later {
    width: 100%;
  }
}

/* ==================== 邀请系统样式 ==================== */

.invitation-main {
  min-height: calc(100vh - 200px);
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  background: #f8f9fa;
}

.invitation-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* 标签页导航 */
.invitation-tabs {
  display: flex;
  background: white;
  border-bottom: 2px solid #e5e7eb;
  overflow-x: auto;
}

.invitation-tab-btn {
  flex: 1;
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  min-width: 120px;
}

.invitation-tab-btn:hover {
  color: #667eea;
  background: #f3f4f6;
}

.invitation-tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: #f0f4ff;
}

.invitation-tab-btn .tab-icon {
  font-size: 20px;
}

/* 标签页内容 */
.invitation-tab-content {
  display: none;
  padding: 24px;
}

.invitation-tab-content.active {
  display: block;
}

.invitation-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

/* 活动列表 */
.activities-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.activity-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s;
}

.activity-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.activity-name {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.activity-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.activity-status.active {
  background: #d1fae5;
  color: #065f46;
}

.activity-status.inactive {
  background: #f3f4f6;
  color: #6b7280;
}

.activity-status.ended {
  background: #fee2e2;
  color: #991b1b;
}

.activity-description {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.activity-requirements {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.requirement-label {
  color: #6b7280;
  min-width: 100px;
}

.requirement-value {
  color: #1f2937;
  font-weight: 500;
}

.product-price {
  color: #dc3545;
  font-weight: 600;
  margin-left: 8px;
}

.activity-reward {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 16px;
}

.reward-label {
  color: white;
  font-weight: 500;
}

.reward-value {
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.activity-actions {
  display: flex;
  gap: 12px;
}

/* 邀请码卡片 */
.invite-codes-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.invite-code-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s;
}

.invite-code-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.invite-code-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 20px 0;
}

.invite-code-display-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}

.invite-code-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin-bottom: 8px;
}

.invite-code-value-large {
  color: white;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 16px;
  font-family: 'Courier New', monospace;
}

.btn-copy-code {
  background: white;
  color: #667eea;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-copy-code:hover {
  background: #f0f4ff;
  transform: translateY(-2px);
}

.invite-code-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.stat-item.highlight {
  background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.invite-code-actions {
  display: flex;
  gap: 12px;
}

/* 统计卡片 */
.statistics-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.statistics-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.statistics-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 20px 0;
}

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat-box {
  text-align: center;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
  transition: all 0.3s;
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-box.highlight {
  background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
}

.stat-box.reward {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.stat-box-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.stat-box-value {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

/* 邀请记录 */
.records-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  min-width: 150px;
}

.invite-records-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.invite-record-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s;
}

.invite-record-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.record-user {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.record-username {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.record-phone {
  font-size: 14px;
  color: #6b7280;
}

.record-badges {
  display: flex;
  gap: 8px;
}

.badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.level-badge {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge {
  background: #f3f4f6;
  color: #6b7280;
}

.status-badge.active {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.completed {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.record-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-item {
  display: flex;
  font-size: 14px;
}

.info-label {
  color: #6b7280;
  min-width: 80px;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.page-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.page-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.page-ellipsis {
  padding: 8px 4px;
  color: #6b7280;
}

.page-info {
  margin-left: 16px;
  color: #6b7280;
  font-size: 14px;
}

/* 分享模态框 */
#share-modal .modal-content {
  max-width: 400px;
}

.invite-code-display {
  text-align: center;
  margin-bottom: 24px;
}

.invite-code-value {
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
  letter-spacing: 2px;
  margin: 16px 0;
  font-family: 'Courier New', monospace;
}

.btn-copy {
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  margin-top: 12px;
}

.btn-copy:hover {
  background: #5568d3;
}

.invite-code-qr {
  text-align: center;
  margin: 24px 0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-placeholder {
  padding: 40px;
  background: #f9fafb;
  border-radius: 8px;
  color: #6b7280;
  line-height: 1.6;
}

.invite-share-tips {
  padding: 16px;
  background: #f0f4ff;
  border-radius: 8px;
  color: #667eea;
  font-size: 14px;
  line-height: 1.6;
}

/* 消息提示 */
.message-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 24px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.message-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.message-toast.success {
  background: #10b981;
}

.message-toast.error {
  background: #ef4444;
}

.message-toast.warning {
  background: #f59e0b;
}

.message-toast.info {
  background: #3b82f6;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.empty-state p {
  font-size: 16px;
  margin: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .invitation-main {
    padding: 12px;
  }
  
  .invitation-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .invitation-tab-btn {
    min-width: 100px;
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .invitation-tab-content {
    padding: 16px;
  }
  
  .activity-card {
    padding: 16px;
  }
  
  .activity-actions {
    flex-direction: column;
  }
  
  .activity-actions button {
    width: 100%;
  }
  
  .invite-code-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .statistics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .records-filters {
    flex-direction: column;
  }
  
  .filter-select {
    width: 100%;
  }
  
  .record-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .pagination {
    flex-wrap: wrap;
  }
  
  .page-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* ========== 淘宝风格订单页面样式 ========== */

/* 订单筛选标签（淘宝风格） */
.order-filters-taobao {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: white;
  border-bottom: 2px solid #f5f5f5;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-tab {
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  position: relative;
}

.filter-tab:hover {
  color: #ff6a00;
}

.filter-tab.active {
  color: #ff6a00;
  border-bottom-color: #ff6a00;
  font-weight: 600;
}

/* 订单卡片（淘宝风格） */
.order-card-taobao {
  background: white;
  border-radius: 0;
  margin-bottom: 12px;
  border: 1px solid #e8e8e8;
  overflow: hidden;
}

.order-header-taobao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fafafa;
  border-bottom: 1px solid #e8e8e8;
}

.order-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.order-no-taobao {
  font-size: 13px;
  color: #666;
}

.order-date-taobao {
  font-size: 13px;
  color: #999;
}

.order-status-taobao {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-paid { background: #d1ecf1; color: #0c5460; }
.status-shipped { background: #d4edda; color: #155724; }
.status-signed { background: #fff4e6; color: #d46b08; }
.status-completed { background: #d1ecf1; color: #0c5460; }
.status-cancelled { background: #f8d7da; color: #721c24; }

/* 商品列表（淘宝风格） */
.order-items-taobao {
  padding: 12px 16px;
}

.order-item-taobao {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

.order-item-taobao:last-child {
  border-bottom: none;
}

.order-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e8e8e8;
}

.order-item-content {
  flex: 1;
  min-width: 0;
}

.order-item-name {
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item-specs {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #999;
}

.order-item-price {
  font-size: 15px;
  color: #ff6a00;
  font-weight: 600;
  min-width: 80px;
  text-align: right;
}

/* 订单信息（淘宝风格） */
.order-info-taobao {
  padding: 12px 16px;
  background: #fafafa;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}

.order-payment-info {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.order-address-taobao {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.address-label {
  color: #999;
}

.address-text {
  color: #333;
}

.address-receiver {
  display: block;
  margin-top: 4px;
  color: #666;
}

/* 物流信息（淘宝风格） */
.order-express-taobao {
  margin-top: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
}

.express-signed-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff4e6;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 13px;
}

.signed-icon {
  color: #ff6a00;
  font-weight: bold;
  font-size: 16px;
}

.signed-text {
  color: #d46b08;
  font-weight: 500;
}

.countdown-text {
  color: #ff6a00;
  font-weight: 500;
  margin-left: auto;
}

.countdown-expired {
  color: #ff4d4f;
  font-weight: 500;
  margin-left: auto;
}

.express-basic-taobao {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}

.express-label {
  color: #666;
}

.express-company {
  color: #333;
  font-weight: 500;
}

.express-no {
  color: #666;
}

.express-tracking-taobao {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8e8e8;
}

.tracking-header-taobao {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8e8e8;
  font-size: 13px;
}

.tracking-status-label {
  color: #666;
}

.tracking-status-taobao {
  color: #ff6a00;
  font-weight: 500;
  margin-left: 8px;
}

.tracking-timeline-taobao {
  position: relative;
  padding-left: 20px;
}

.tracking-item-taobao {
  position: relative;
  padding-bottom: 16px;
  padding-left: 24px;
  font-size: 13px;
}

.tracking-item-taobao:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: -8px;
  width: 2px;
  background: #e8e8e8;
}

.tracking-item-latest::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6a00;
  border: 2px solid white;
  box-shadow: 0 0 0 2px #ff6a00;
}

.tracking-item-taobao:not(.tracking-item-latest)::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
}

.tracking-time-taobao {
  color: #999;
  font-size: 12px;
  margin-bottom: 4px;
}

.tracking-content-taobao {
  color: #333;
  line-height: 1.5;
}

.tracking-loading {
  text-align: center;
  color: #666;
  padding: 12px;
  font-size: 13px;
}

.tracking-error-taobao {
  color: #ff4d4f;
  padding: 12px;
  font-size: 13px;
}

.tracking-message-taobao {
  margin-top: 8px;
  padding: 8px;
  background: #fff4e6;
  border-radius: 4px;
  font-size: 12px;
  color: #d46b08;
}

/* 订单底部（淘宝风格） */
.order-footer-taobao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
}

.order-total-taobao {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.total-label {
  color: #666;
}

.total-amount-taobao {
  color: #ff6a00;
  font-size: 18px;
  font-weight: 600;
}

.order-actions-taobao {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.order-actions-taobao .btn-taobao {
  margin: 0;
  flex-shrink: 0;
}

.order-actions-taobao .btn-link-taobao {
  padding: 8px 12px;
  min-width: auto;
}

/* 按钮（淘宝风格） */
.btn-taobao {
  padding: 8px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-primary-taobao {
  background: #ff6a00;
  color: white;
  border-color: #ff6a00;
}

.btn-primary-taobao:hover {
  background: #ff8500;
  border-color: #ff8500;
}

.btn-secondary-taobao {
  background: white;
  color: #666;
  border-color: #d9d9d9;
}

.btn-secondary-taobao:hover {
  color: #ff6a00;
  border-color: #ff6a00;
}

.btn-warning-taobao {
  background: white;
  color: #ff6a00;
  border-color: #ff6a00;
}

.btn-warning-taobao:hover {
  background: #fff4e6;
}

.btn-link-taobao {
  background: transparent;
  color: #666;
  border-color: transparent;
  padding: 8px 12px;
  text-decoration: none;
  border: none;
}

.btn-link-taobao:hover {
  color: #ff6a00;
  background: transparent;
}

/* 禁用按钮样式 */
.btn-taobao:disabled,
.btn-taobao.btn-disabled {
  background: #f5f5f5 !important;
  color: #bfbfbf !important;
  border-color: #d9d9d9 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.btn-taobao:disabled:hover,
.btn-taobao.btn-disabled:hover {
  background: #f5f5f5 !important;
  color: #bfbfbf !important;
  border-color: #d9d9d9 !important;
  transform: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .order-filters-taobao {
    padding: 0 12px;
  }
  
  .filter-tab {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .order-header-taobao {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .order-footer-taobao {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .order-actions-taobao {
    width: 100%;
    justify-content: flex-end;
    gap: 6px;
  }
  
  .order-actions-taobao .btn-taobao {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 6px 12px;
    min-height: 30px;
  }
  
  .order-actions-taobao .btn-link-taobao {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .order-item-taobao {
    flex-wrap: wrap;
  }
  
  .order-item-price {
    width: 100%;
    text-align: left;
    margin-top: 8px;
  }
}

/* ========== 订单详情模态框样式 ========== */
.order-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.order-detail-modal-content {
  background: white;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
  background: #fafafa;
}

.order-detail-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.order-detail-header .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s;
}

.order-detail-header .modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.order-detail-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.order-detail-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.order-detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.order-detail-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #ff6a00;
}

.order-detail-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.order-detail-row:last-child {
  margin-bottom: 0;
}

.order-detail-label {
  color: #666;
  min-width: 100px;
  flex-shrink: 0;
}

.order-detail-value {
  color: #333;
  flex: 1;
  word-break: break-word;
}

.order-detail-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
}

.order-detail-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.order-detail-item-info {
  flex: 1;
  min-width: 0;
}

.order-detail-item-name {
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
}

.order-detail-item-specs {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #999;
}

.order-detail-item-price {
  font-size: 16px;
  color: #ff6a00;
  font-weight: 600;
  min-width: 100px;
  text-align: right;
  flex-shrink: 0;
}

.order-detail-remark {
  padding: 12px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.order-detail-total {
  background: #fff4e6;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #ffe7ba;
  margin-top: 20px;
}

.order-detail-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-detail-total-label {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.order-detail-total-amount {
  font-size: 24px;
  color: #ff6a00;
  font-weight: 600;
}

.order-detail-footer {
  padding: 16px 20px;
  border-top: 1px solid #e8e8e8;
  background: #fafafa;
  display: flex;
  justify-content: flex-end;
}

.order-detail-footer .btn-taobao {
  min-width: 100px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .order-detail-modal {
    padding: 10px;
  }
  
  .order-detail-modal-content {
    max-width: 100%;
    max-height: 95vh;
  }
  
  .order-detail-header {
    padding: 12px 16px;
  }
  
  .order-detail-header h2 {
    font-size: 16px;
  }
  
  .order-detail-body {
    padding: 16px;
  }
  
  .order-detail-row {
    flex-direction: column;
    gap: 4px;
  }
  
  .order-detail-label {
    min-width: auto;
    font-weight: 500;
  }
  
  .order-detail-item {
    flex-wrap: wrap;
  }
  
  .order-detail-item-price {
    width: 100%;
    text-align: left;
    margin-top: 8px;
  }
  
  .order-detail-total-amount {
    font-size: 20px;
  }
}

/* ========== 确认对话框样式 ========== */
.confirm-dialog-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-dialog-content {
  background: white;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.confirm-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
  background: #fafafa;
}

.confirm-dialog-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.confirm-dialog-header .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s;
}

.confirm-dialog-header .modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.confirm-dialog-body {
  padding: 24px 20px;
  font-size: 15px;
  color: #333;
  line-height: 1.6;
}

.confirm-dialog-body p {
  margin: 0;
}

.confirm-dialog-footer {
  padding: 16px 20px;
  border-top: 1px solid #e8e8e8;
  background: #fafafa;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.confirm-dialog-footer .btn-taobao {
  min-width: 80px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .confirm-dialog-modal {
    padding: 10px;
  }
  
  .confirm-dialog-content {
    max-width: 100%;
  }
  
  .confirm-dialog-header {
    padding: 12px 16px;
  }
  
  .confirm-dialog-header h2 {
    font-size: 16px;
  }
  
  .confirm-dialog-body {
    padding: 20px 16px;
    font-size: 14px;
  }
  
  .confirm-dialog-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
  }
  
  .confirm-dialog-footer .btn-taobao {
    width: 100%;
    min-width: auto;
  }
}

/* 评价弹窗样式 - 科技感设计 */
.review-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

.review-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: 20px;
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.review-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  border-radius: 20px 20px 0 0;
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.review-modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 255, 0.95) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1;
  border-radius: 20px 20px 0 0;
}

.review-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.review-modal-body {
  padding: 28px;
  background: linear-gradient(to bottom, transparent, rgba(102, 126, 234, 0.02));
}

.review-item {
  padding: 24px;
  border: 2px solid rgba(102, 126, 234, 0.1);
  border-radius: 16px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 255, 0.9) 100%);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.08),
              0 0 0 1px rgba(102, 126, 234, 0.05) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.review-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.review-item:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15),
              0 0 0 1px rgba(102, 126, 234, 0.1) inset;
}

.review-item:hover::before {
  opacity: 1;
}

.review-product-info {
  display: flex;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(102, 126, 234, 0.1);
  position: relative;
}

.review-product-info::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.review-product-image {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(102, 126, 234, 0.15);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
  transition: all 0.3s;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.review-product-image:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.3);
}

.review-product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.review-product-name {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #333 0%, #555 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.review-product-specs {
  font-size: 14px;
  color: #666;
  display: flex;
  gap: 12px;
  align-items: center;
}

.review-product-specs::before {
  content: '📦';
  font-size: 16px;
  opacity: 0.6;
}

.review-form-item {
  margin-bottom: 24px;
}

.review-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  position: relative;
  padding-left: 8px;
}

.review-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.review-rating {
  display: flex;
  gap: 8px;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 0;
}

.review-rating input[type="radio"] {
  display: none;
}

.review-rating .star-label {
  font-size: 36px;
  color: #e0e0e0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  text-shadow: 0 0 0 rgba(255, 193, 7, 0);
}

.review-rating .star-label::before {
  content: '★';
  position: absolute;
  top: 0;
  left: 0;
  color: #ffc107;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s;
  filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.5));
}

.review-rating .star-label:hover {
  transform: scale(1.15) rotate(5deg);
  color: #ffc107;
  filter: drop-shadow(0 0 12px rgba(255, 193, 7, 0.6));
}

.review-rating .star-label:hover ~ .star-label {
  color: #ffc107;
  transform: scale(1.1);
}

.review-rating input[type="radio"]:checked ~ .star-label,
.review-rating .star-label.active,
.review-rating .star-label.active ~ .star-label {
  color: #ffc107;
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.5));
  animation: starPulse 0.3s ease-out;
}

@keyframes starPulse {
  0% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1.1);
  }
}

.review-comment {
  width: 100%;
  padding: 16px;
  border: 2px solid rgba(102, 126, 234, 0.15);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.6;
  color: #333;
}

.review-comment::placeholder {
  color: #999;
  opacity: 0.7;
}

.review-comment:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1),
              0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-1px);
}

.review-images-upload {
  margin-top: 12px;
}

.review-image-input {
  padding: 12px 20px;
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  color: #667eea;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
}

.review-image-input:hover {
  border-color: rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.review-image-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.review-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.review-image-item {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
  transition: all 0.3s;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.review-image-item:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.4);
}

.review-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.review-image-item:hover .review-image-preview {
  transform: scale(1.05);
}

.review-image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.9) 0%, rgba(200, 35, 51, 0.9) 100%);
  color: white;
  border: 2px solid white;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.review-image-remove:hover {
  background: linear-gradient(135deg, rgba(220, 53, 69, 1) 0%, rgba(200, 35, 51, 1) 100%);
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.review-already {
  padding: 16px 20px;
  text-align: center;
  color: #28a745;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
  border-radius: 12px;
  border: 2px solid rgba(40, 167, 69, 0.2);
  position: relative;
  overflow: hidden;
}

.review-already::before {
  content: '✓';
  position: absolute;
  left: 20px;
  font-size: 20px;
  color: #28a745;
}

.review-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 2px solid rgba(102, 126, 234, 0.1);
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 255, 0.98) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1;
  border-radius: 0 0 20px 20px;
}

/* 评价表单按钮样式优化 */
.review-form-actions .btn-taobao {
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.review-form-actions .btn-primary-taobao {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.review-form-actions .btn-primary-taobao::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.review-form-actions .btn-primary-taobao:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.review-form-actions .btn-primary-taobao:hover::before {
  left: 100%;
}

.review-form-actions .btn-primary-taobao:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.review-form-actions .btn-secondary-taobao {
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  border: 2px solid rgba(102, 126, 234, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.review-form-actions .btn-secondary-taobao:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* 评价表单标签样式 */
.review-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  position: relative;
  padding-left: 8px;
}

.review-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* 文件上传按钮样式 */
.review-image-input {
  padding: 12px 20px;
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  color: #667eea;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
}

.review-image-input:hover {
  border-color: rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.review-image-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* 关闭按钮样式 */
.review-modal-header .modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border: none;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.review-modal-header .modal-close:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
  .review-modal {
    padding: 10px;
  }
  
  .review-modal-content {
    max-height: 95vh;
    border-radius: 16px;
  }
  
  .review-modal-header {
    padding: 18px 20px;
  }
  
  .review-modal-header h2 {
    font-size: 20px;
  }
  
  .review-modal-body {
    padding: 20px;
  }
  
  .review-item {
    padding: 18px;
    border-radius: 12px;
  }
  
  .review-product-image {
    width: 70px;
    height: 70px;
  }
  
  .review-product-name {
    font-size: 16px;
  }
  
  .review-rating .star-label {
    font-size: 32px;
    gap: 6px;
  }
  
  .review-rating {
    gap: 6px;
  }
  
  .review-form-actions {
    flex-direction: column-reverse;
    gap: 10px;
    padding-top: 20px;
    margin-top: 24px;
  }
  
  .review-form-actions .btn-taobao {
    width: 100%;
    padding: 14px;
    font-size: 16px;
  }
  
  .review-image-item {
    width: 90px;
    height: 90px;
  }
}

/* 客服聊天管理输入框样式 */
#chat-admin-input-area {
  width: 100%;
  box-sizing: border-box;
}

#chat-admin-input-area > div {
  display: flex !important;
  flex-direction: row !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#chat-admin-input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 150px !important;
  padding: 18px 24px !important;
  border: 2px solid #e0e0e0 !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  resize: vertical !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  outline: none !important;
  transition: border-color 0.3s ease !important;
}

#chat-admin-input:focus {
  border-color: #667eea !important;
}

#chat-admin-send-btn {
  flex-shrink: 0 !important;
  padding: 10px 20px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  height: 48px !important;
  min-width: 80px !important;
  max-width: 100px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
