:root {
  --wechat-green: #07C160;
  --wechat-green-hover: #06ad56;
  --wechat-green-light: #e8f8ef;
  --wechat-green-dark: #06a852;
  --bg-page: #F5F7FA;
  --bg-white: #ffffff;
  --bg-hover: #f0f2f5;
  --border-color: #E4E7ED;
  --border-light: #ebeef5;
  --text-primary: #303133;
  --text-regular: #606266;
  --text-secondary: #909399;
  --text-placeholder: #c0c4cc;
  --danger: #f56c6c;
  --danger-light: #fef0f0;
  --warning: #e6a23c;
  --warning-light: #fdf6ec;
  --info: #909399;
  --info-light: #f4f4f5;
  --sidebar-width: 220px;
  --topbar-height: 56px;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
}

a { color: var(--wechat-green); text-decoration: none; }
a:hover { color: var(--wechat-green-hover); }

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-white);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  height: var(--topbar-height);
  padding: 0 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: #07C160;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo .logo-icon svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.sidebar-logo .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
}

.nav-section-title {
  padding: 16px 12px 8px;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-regular);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1px;
  font-size: 15px;
  user-select: none;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--wechat-green-light);
  color: var(--wechat-green);
  font-weight: 500;
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  filter: grayscale(1) opacity(0.6);
}

.nav-item.active .nav-icon {
  filter: grayscale(0) opacity(1);
}

.main-area {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-area {
  display: flex;
  align-items: center;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--border-light);
}

.auth-guest {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  cursor: pointer;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--wechat-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  transition: var(--transition);
}

.user-avatar:hover {
  background: var(--wechat-green-hover);
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 300;
  display: none;
  overflow: hidden;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown-header {
  padding: 12px 16px;
  background: var(--bg-page);
}

.user-dropdown-header .dd-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.user-dropdown-header .dd-role {
  font-size: 12px;
  color: var(--text-secondary);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.user-dropdown-item {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-regular);
  cursor: pointer;
  transition: var(--transition);
}

.user-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.user-dropdown-item.logout {
  color: var(--danger);
}

.user-dropdown-item.logout:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.notification-bell {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  font-size: 18px;
  color: var(--text-secondary);
}

.notification-bell:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-white);
  display: none;
}

.notification-badge.show {
  display: block;
}

.notification-panel {
  position: absolute;
  top: calc(var(--topbar-height) - 4px);
  right: 24px;
  width: 380px;
  max-height: 480px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
  display: none;
}

.notification-panel.show {
  display: block;
}

.notification-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-panel-header h4 {
  font-size: 14px;
  font-weight: 600;
}

.notification-panel-body {
  max-height: 400px;
  overflow-y: auto;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

.notification-item:hover {
  background: var(--bg-hover);
}

.notification-item .notif-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notification-item .notif-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notification-item .notif-time {
  font-size: 11px;
  color: var(--text-placeholder);
  margin-top: 4px;
}

.notification-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-placeholder);
  font-size: 13px;
}

.content-area {
  flex: 1;
  padding: 20px 24px;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

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

.btn-primary {
  background: var(--wechat-green);
  color: white;
  border-color: var(--wechat-green);
}
.btn-primary:hover:not(:disabled) { background: var(--wechat-green-hover); }

.btn-success {
  background: var(--wechat-green);
  color: white;
  border-color: var(--wechat-green);
}
.btn-success:hover:not(:disabled) { background: var(--wechat-green-hover); }

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) { background: #e04040; }

.btn-outline {
  background: transparent;
  color: var(--text-regular);
  border-color: var(--border-color);
}
.btn-outline:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-text {
  background: transparent;
  color: var(--wechat-green);
  border: none;
  padding: 4px 8px;
}
.btn-text:hover:not(:disabled) { color: var(--wechat-green-hover); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 2px 8px; font-size: 12px; border-radius: 3px; }
.btn-lg { padding: 10px 24px; font-size: 15px; }

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-regular);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--wechat-green);
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.15);
}

.form-textarea { min-height: 120px; resize: vertical; }

.form-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='%23909399' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.table-wrapper { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; }

.table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-primary);
  vertical-align: top;
}

.table tr:hover td { background: var(--bg-page); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.badge-primary { background: var(--wechat-green-light); color: var(--wechat-green); }
.badge-success { background: #f0f9eb; color: #67c23a; }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-bar .form-input,
.filter-bar .form-select { width: auto; min-width: 140px; }

/* ========== Auth Modal Styles ========== */
.auth-modal {
  background: var(--bg-white);
  width: 100%;
  overflow: visible;
}

.auth-modal-header {
  padding: 32px 28px 24px;
  text-align: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-bottom: 1px solid #e5e7eb;
}

.auth-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.auth-logo svg {
  width: 30px;
  height: 30px;
  fill: white;
}

.auth-title {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin: 0 0 6px !important;
}

.auth-subtitle {
  font-size: 14px !important;
  color: #6b7280 !important;
  margin: 0 !important;
}

.auth-modal-body {
  padding: 28px 28px 28px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: var(--bg-white);
  color: #10b981;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-input-group {
  margin-bottom: 20px;
}

.auth-input-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  text-align: left;
}

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

.auth-input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: #9ca3af;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 48px;
  font-size: 15px;
  color: #111827;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  outline: none;
  transition: all 0.25s ease;
}

.auth-input:focus {
  border-color: #10b981;
  background: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.auth-input::placeholder {
  color: #9ca3af;
}

.auth-input-wrapper .clear-btn {
  position: absolute;
  right: 12px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d1d5db;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.auth-input-wrapper:hover .clear-btn {
  opacity: 1;
}

.auth-input-with-btn {
  display: flex;
  gap: 10px;
}

.auth-input-with-btn .auth-input-wrapper {
  flex: 1;
}

.auth-send-btn {
  height: 44px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: #10b981;
  background: #ecfdf5;
  border: 2px solid #10b981;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.auth-send-btn:hover:not(:disabled) {
  background: #10b981;
  color: white;
}

.auth-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-code-hint {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #059669;
  line-height: 1.6;
}

.auth-submit-btn {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: white;
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #059669, #047857);
}

.auth-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.auth-submit-btn.loading {
  opacity: 0.8;
  cursor: not-allowed;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #6b7280;
}

.auth-footer a {
  color: #10b981;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-footer a:hover {
  color: #059669;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: #9ca3af;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* ========== Original Modal Styles ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-white);
  border-radius: 12px;
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  transform: translateY(20px);
  transition: all 0.3s ease;
}

/* 专门用于登录注册的模态框，紧凑布局无空白 */
.modal:has(.auth-modal) {
  max-width: 400px !important;
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* auth-modal完全占满容器 */
.modal:has(.auth-modal) .auth-modal {
  display: block;
  width: 100%;
  border-radius: 20px;
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.3),
    0 10px 30px -5px rgba(0, 0, 0, 0.15);
}

.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 16px; font-weight: 600; }

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 18px;
  transition: var(--transition);
}

.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-body { padding: 20px 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  color: white;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}

.toast-success { background: var(--wechat-green); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }

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

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.loading-spinner.dark {
  border-color: var(--border-color);
  border-top-color: var(--wechat-green);
}

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

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-placeholder);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 14px; margin-bottom: 16px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-card .stat-trend {
  font-size: 12px;
  margin-top: 4px;
}

.stat-card .stat-trend.up { color: var(--wechat-green); }
.stat-card .stat-trend.down { color: var(--danger); }

.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.tab-item {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  user-select: none;
}

.tab-item:hover { color: var(--text-primary); }

.tab-item.active {
  color: var(--wechat-green);
  border-bottom-color: var(--wechat-green);
  font-weight: 500;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--wechat-green);
  cursor: pointer;
}

.analysis-card {
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}

.analysis-card .analysis-label {
  font-size: 12px;
  color: var(--text-placeholder);
  margin-bottom: 4px;
  font-weight: 500;
}

.analysis-card .analysis-value {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.preview-frame {
  background: #f5f5f5;
  border: none;
  border-radius: 32px;
  padding: 0;
  max-width: 390px;
  margin: 0 auto;
  max-height: 720px;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

.preview-frame::-webkit-scrollbar {
  width: 4px;
}
.preview-frame::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.wechat-preview-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 17px;
  line-height: 1.8;
  color: #222;
  background: #ffffff;
  min-height: 100%;
}

.wechat-preview-header {
  padding: 20px 16px 12px;
  border-bottom: none;
  margin-bottom: 0;
}

.wechat-preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #07C160, #06ad56);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.wechat-preview-account-info {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 2px;
}

.wechat-preview-time {
  font-size: 11px;
  color: #969696;
}

.wechat-article-cover {
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f7f7;
}

.wechat-article-cover img {
  width: 100%;
  display: block;
  max-height: 260px;
  object-fit: cover;
}

.wechat-article-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: #212121;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

.wechat-article-meta {
  font-size: 12px;
  color: #969696;
}

.wechat-article-body {
  padding: 4px 16px 20px;
  color: #212121;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.5px;
}

.wechat-article-body p {
  margin: 0 0 24px;
  text-align: justify;
  text-indent: 0;
}

.wechat-article-body h1, 
.wechat-article-body h2, 
.wechat-article-body h3 {
  margin: 32px 0 16px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
}

.wechat-article-body h1 { font-size: 20px; }
.wechat-article-body h2 { font-size: 18px; }
.wechat-article-body h3 { font-size: 17px; }

.wechat-article-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px auto;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wechat-article-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  background: #f7f7f7;
  border-left: 4px solid #07C160;
  color: #666;
  font-style: italic;
}

.wechat-article-body ul,
.wechat-article-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.wechat-article-body li {
  margin-bottom: 8px;
}

.wechat-article-footer {
  padding: 24px 20px;
  border-top: 1px solid #e8e8e8;
  margin-top: 20px;
  background: #fafafa;
}

.wechat-article-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
  color: #999;
  padding: 16px 0;
}

.wechat-article-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wechat-preview-copyright {
  padding: 16px 20px;
  font-size: 12px;
  color: #999;
  text-align: center;
  border-top: 1px solid #e8e8e8;
}

.wechat-preview-bottom-nav {
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid #e8e8e8;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #576b95;
}

.word-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #07C160, #06ad56);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.word-count-badge .count {
  font-size: 14px;
  font-weight: 700;
}

.template-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.template-card:hover { border-color: var(--wechat-green); box-shadow: var(--shadow); }
.template-card.active { border-color: var(--wechat-green); background: var(--wechat-green-light); }

.template-card .template-name { font-weight: 600; margin-bottom: 4px; }
.template-card .template-desc { font-size: 12px; color: var(--text-secondary); }

.hot-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.hot-item:hover { background: var(--bg-hover); margin: 0 -12px; padding: 12px; border-radius: var(--radius-sm); }

.hot-rank {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--bg-page);
  color: var(--text-secondary);
}

.hot-rank.top1 { background: #ff4d4f; color: white; }
.hot-rank.top2 { background: #ff7a45; color: white; }
.hot-rank.top3 { background: #ffc53d; color: white; }

.hot-content { flex: 1; min-width: 0; }
.hot-title { font-size: 14px; color: var(--text-primary); margin-bottom: 4px; line-height: 1.4; }
.hot-meta { font-size: 12px; color: var(--text-placeholder); }

.xls-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.xls-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.xls-card-cover {
  height: 180px;
  background: linear-gradient(135deg, #a8edea, #fed6e3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-placeholder);
  font-size: 13px;
}

.xls-card-body { padding: 12px; }
.xls-card-title { font-size: 13px; font-weight: 500; margin-bottom: 6px; line-height: 1.4; }
.xls-card-stats { font-size: 12px; color: var(--text-placeholder); display: flex; gap: 12px; }

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg-page);
  flex-wrap: wrap;
}

.toolbar-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--text-regular);
  font-size: 14px;
  transition: var(--transition);
}

.toolbar-btn:hover { background: var(--bg-white); color: var(--text-primary); }
.toolbar-btn.active { background: var(--wechat-green-light); color: var(--wechat-green); }

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
  margin: 0 4px;
}

/* 公众号管理页面 */
.acc-action-btn { border-color: var(--wechat-green); color: var(--wechat-green); }
.acc-action-btn:hover { background: var(--wechat-green-light); }

.acc-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.acc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}

.acc-table thead tr {
  background: var(--bg-page);
  border-bottom: 2px solid var(--border-color);
}

.acc-table th {
  padding: 8px 8px;
  font-weight: 600;
  color: var(--text-regular);
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

.acc-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.acc-table tbody tr:hover { background: var(--bg-page); }
.acc-table tbody tr:last-child { border-bottom: none; }

.acc-table td {
  padding: 8px 8px;
  vertical-align: middle;
}

.acc-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #07C160, #06ad56);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.editor-content {
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius) var(--radius);
  min-height: 400px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.75;
  outline: none;
  background: var(--bg-white);
}

.chart-bar-container {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding: 16px 0;
}

.chart-bar {
  flex: 1;
  background: var(--wechat-green);
  border-radius: 4px 4px 0 0;
  min-width: 20px;
  transition: var(--transition);
  position: relative;
}

.chart-bar:hover { background: var(--wechat-green-hover); }

.chart-bar-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-placeholder);
  white-space: nowrap;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-green { color: var(--wechat-green); }
.text-danger { color: var(--danger); }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

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

.page-header h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.btn.active,
.btn-outline.active {
  background: var(--wechat-green-light);
  color: var(--wechat-green);
  border-color: var(--wechat-green);
  font-weight: 500;
}

.btn-text {
  background: transparent;
  color: var(--wechat-green);
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.btn-text:hover:not(:disabled) { color: var(--wechat-green-hover); }

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc;
  border-radius: 22px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--wechat-green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

.settings-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.settings-tab {
  flex: 1;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  border-radius: 6px;
  transition: var(--transition);
  user-select: none;
}

.settings-tab:hover { color: var(--text-primary); background: var(--bg-page); }

.settings-tab.active {
  color: var(--wechat-green);
  background: var(--wechat-green-light);
}

.settings-tab-content .card { margin-bottom: 20px; }

.settings-toggle-group { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.settings-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 16px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}
.settings-toggle-info { display: flex; align-items: flex-start; gap: 12px; flex: 1; }
.settings-toggle-label { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.settings-toggle-param { min-width: 180px; }
.settings-toggle-param .form-input { margin-top: 4px; }

.articles-new-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  height: calc(100vh - var(--topbar-height) - 140px);
}

.articles-category-panel {
  flex: 0 0 200px;
  max-width: 200px;
  min-width: 200px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px;
  height: 100%;
  overflow-y: auto;
}

.category-panel-header {
  padding: 4px 8px 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-empty {
  text-align: center;
  padding: 20px 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.category-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.category-card:hover {
  background: var(--bg-hover);
}

.category-card.active {
  background: rgba(7, 193, 96, 0.08);
  border-color: var(--wechat-green);
}

.category-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.category-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.category-progress {
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.category-progress-bar {
  height: 100%;
  background: var(--wechat-green);
  border-radius: 2px;
  transition: width 0.3s;
}

.articles-main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.articles-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.articles-article-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.articles-analysis-panel {
  flex: 0 0 300px;
  max-width: 300px;
  min-width: 300px;
  height: 100%;
  overflow-y: auto;
}

.articles-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.articles-action-bar .action-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.articles-action-bar .action-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.articles-main-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.articles-left {
  flex: 0 0 65%;
  max-width: 65%;
  min-width: 0;
}

.articles-right {
  flex: 0 0 calc(35% - 16px);
  max-width: calc(35% - 16px);
  min-width: 0;
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
}

@media (max-width: 768px) {
  /* ========== 布局框架 ========== */
  .sidebar { display: none !important; }
  .main-area { margin-left: 0 !important; }
  .content-area {
    padding: 10px 10px 70px 10px !important;
  }

  /* ========== 底部Tab导航栏 ========== */
  .mobile-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 56px;
    background: #fff;
    border-top: 1px solid #e4e7ed;
    display: flex;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #909399;
    text-decoration: none;
    gap: 2px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: color 0.2s;
  }
  .mobile-tab-icon {
    font-size: 20px;
    line-height: 1;
  }
  .mobile-tab-item.active {
    color: #07C160;
    font-weight: 500;
  }

  /* ========== 顶部栏 ========== */
  .topbar {
    padding: 0 10px !important;
    height: 50px !important;
  }
  .topbar .user-name {
    display: none !important;
  }
  .topbar .auth-area {
    border-left: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
  .topbar .notification-bell {
    display: none !important;
  }
  .topbar .logo-text {
    font-size: 16px !important;
  }

  /* ========== 内容区域与卡片 ========== */
  .card {
    padding: 14px !important;
    margin-bottom: 12px !important;
    border-radius: 12px !important;
  }
  .card-title {
    font-size: 15px !important;
    margin-bottom: 12px !important;
  }

  /* ========== 统计网格 ========== */
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .stat-card {
    padding: 12px !important;
    border-radius: 10px !important;
  }
  .stat-value {
    font-size: 22px !important;
  }
  .stat-label {
    font-size: 11px !important;
  }

  /* ========== 网格布局 ========== */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ========== 表格 ========== */
  .table-container,
  .card:has(table) {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding: 0 14px;
  }
  table {
    font-size: 12px !important;
    min-width: 500px;
  }
  table th, table td {
    padding: 8px 6px !important;
    white-space: nowrap;
  }

  /* ========== 表单元素 ========== */
  .form-input,
  .form-select,
  .form-textarea {
    min-height: 44px !important;
    font-size: 16px !important; /* 防止iOS自动缩放 */
    padding: 10px 12px !important;
    border-radius: 10px !important;
  }
  .form-label {
    font-size: 13px !important;
    margin-bottom: 6px !important;
  }
  .form-group {
    margin-bottom: 14px !important;
  }

  /* ========== 按钮 ========== */
  .btn {
    min-height: 44px;
    padding: 8px 16px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }
  .btn-sm {
    min-height: 36px;
    padding: 6px 12px !important;
    font-size: 13px !important;
  }
  .btn-lg {
    padding: 12px 20px !important;
    font-size: 15px !important;
  }

  /* ========== 页面标题 ========== */
  .page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  .page-header h1 {
    font-size: 18px !important;
  }
  .header-actions {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* ========== Tab栏 ========== */
  .tab-bar {
    gap: 0 !important;
    border-radius: 10px !important;
    overflow: hidden;
  }
  .tab-item {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }

  /* ========== 模态框 ========== */
  .modal-overlay,
  .modal-overlay.active {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    height: auto !important;
    min-height: 100vh;
    border-radius: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .modal-header {
    padding: 14px 16px !important;
  }
  .modal-header h3 {
    font-size: 16px !important;
  }
  .modal-body {
    padding: 14px 16px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .modal-footer {
    padding: 12px 16px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* ========== 登录注册模态框 - 移动端 ========== */
  .modal-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .modal:has(.auth-modal) {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    border-radius: 0 !important;
    overflow: auto !important;
    background: #fff !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .modal:has(.auth-modal) .auth-modal {
    border-radius: 0 !important;
    width: 100% !important;
    min-height: 100vh !important;
    overflow: auto !important;
    box-shadow: none !important;
  }
  .auth-modal-header {
    padding: 60px 20px 20px !important;
  }
  .auth-modal-header h2, .auth-modal-header h3 {
    font-size: 22px !important;
  }
  .auth-modal-body {
    padding: 20px !important;
  }
  .auth-input {
    font-size: 16px !important;
    height: 50px !important;
    -webkit-user-select: text !important;
    user-select: text !important;
  }

  /* ========== 通知面板 ========== */
  .notification-panel {
    position: fixed !important;
    top: var(--topbar-height) !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-height: calc(100vh - var(--topbar-height)) !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  }

  /* ========== 文章页 ========== */
  .articles-new-layout {
    flex-direction: column !important;
    height: auto !important;
  }
  .articles-category-panel,
  .articles-analysis-panel {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }
  .articles-category-panel {
    max-height: 180px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  .articles-category-panel .category-list {
    flex-direction: row !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
    -webkit-overflow-scrolling: touch;
  }
  .articles-category-panel .category-card {
    flex-shrink: 0 !important;
    min-width: 110px !important;
  }
  .articles-action-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .articles-action-bar .action-bar-left,
  .articles-action-bar .action-bar-right {
    width: 100% !important;
    flex-wrap: wrap !important;
  }
  .articles-main-layout {
    flex-direction: column !important;
  }
  .articles-left, .articles-right {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }
  .articles-right {
    position: static !important;
  }

  /* ========== 热点页 ========== */
  .hotspot-grid,
  .hotspot-cards {
    flex-direction: column !important;
  }
  .hotspot-grid > *,
  .hotspot-cards > * {
    width: 100% !important;
  }

  /* ========== 创作页 ========== */
  .grid-2.creation-grid {
    grid-template-columns: 1fr !important;
  }
  .form-textarea {
    min-height: 100px !important;
  }
  /* 创作台：抓取URL行 */
  #creation-mode-content [style*="display:flex"][style*="gap:8px"] {
    flex-wrap: wrap !important;
  }
  /* 创作台：AI改写/生成选题按钮 */
  #creation-mode-content .card > div[style*="display:flex"][style*="gap:8px"]:last-child {
    flex-wrap: wrap !important;
  }
  /* 创作台：创作结果操作按钮 */
  #article-result-card [style*="display:flex"][style*="gap:8px"] {
    flex-wrap: wrap !important;
  }
  /* 创作台：标题+换标题按钮 */
  #article-result-card [style*="align-items:flex-start"] {
    flex-wrap: wrap !important;
  }
  /* 创作记录列表 */
  #creation-records-section .card {
    overflow-x: auto !important;
  }

  /* ========== 发布页 ========== */
  .publish-layout,
  .publish-preview-editor {
    flex-direction: column !important;
  }
  .publish-preview-frame {
    max-height: 400px !important;
  }
  /* 发布页：排版模板改为2列 */
  .template-card {
    padding: 8px 4px !important;
  }
  .template-name {
    font-size: 11px !important;
  }
  .template-desc {
    font-size: 9px !important;
  }
  /* 发布页：编辑器工具栏 */
  .editor-toolbar {
    flex-wrap: wrap !important;
    gap: 4px !important;
    padding: 6px !important;
  }
  .toolbar-btn {
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
  }
  .toolbar-divider {
    display: none !important;
  }
  /* 发布页：配图按钮组 */
  .card [style*="display:flex"][style*="gap:8px"][style*="btn"] {
    flex-wrap: wrap !important;
  }
  /* 发布页：预览区取消sticky */
  .publish-preview-card,
  .card[style*="position:sticky"] {
    position: static !important;
  }
  /* 发布页：预览框 */
  .preview-frame {
    max-height: 500px !important;
    border-radius: 10px !important;
  }
  /* 发布页：字数统计 */
  .word-count-badge {
    font-size: 12px !important;
    padding: 4px 10px !important;
  }
  /* 发布页：公众号选择区 */
  .checkbox-wrapper {
    padding: 6px 10px !important;
  }
  /* 发布页：草稿/发布按钮 */
  .card [style*="display:flex"][style*="gap:12px"][style*="margin-top"] {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  /* ========== 设置页 ========== */
  .settings-toggle-row {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .settings-toggle-param {
    min-width: 100% !important;
  }

  /* ========== 筛选栏 ========== */
  .filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .filter-bar .form-input,
  .filter-bar .form-select {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* ========== 落地页 ========== */
  .landing-hero-inner {
    padding: 60px 20px 40px !important;
  }
  .hero-title {
    font-size: 28px !important;
  }
  .flow-steps {
    flex-direction: column !important;
    align-items: center !important;
  }
  .flow-arrow {
    transform: rotate(90deg) !important;
    padding-top: 0 !important;
  }
  .flow-step {
    max-width: 100% !important;
  }
  .plans-grid {
    grid-template-columns: 1fr !important;
  }
  .hero-stats {
    flex-direction: column !important;
    gap: 16px !important;
  }

  /* ========== 通用flex行自动换行 ========== */
  /* 所有inline flex行在手机端自动换行 */
  [style*="display: flex"][style*="gap: 8px"],
  [style*="display:flex"][style*="gap:8px"],
  [style*="display: flex"][style*="gap:8px"] {
    flex-wrap: wrap !important;
  }

  /* ========== 排版模板grid ========== */
  .template-grid,
  .card [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* ========== 小绿书封面URL+生成按钮 ========== */
  #publish-xiaolvshu-section [style*="display:flex"][style*="gap:8px"] {
    flex-wrap: wrap !important;
  }

  /* ========== 公众号选择区横向滚动 ========== */
  .card [style*="flex-direction:row"][style*="flex-wrap:wrap"][style*="gap:8px"] {
    gap: 6px !important;
    padding: 10px !important;
  }

  /* ========== 触控优化 ========== */
  a, button, .btn, [role="button"], [onclick] {
    -webkit-tap-highlight-color: transparent;
  }
  /* 移除触屏上烦人的hover效果 */
  .btn:hover,
  .card:hover,
  .user-avatar:hover,
  .category-card:hover,
  .notification-item:hover,
  .template-card:hover,
  .checkbox-wrapper:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  /* 平滑滚动 */
  * {
    -webkit-overflow-scrolling: touch;
  }

  /* ========== Toast提示 ========== */
  .toast-container {
    left: 10px !important;
    right: 10px !important;
    bottom: 70px !important;
  }
  .toast {
    font-size: 13px !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
  }

  /* ========== 空状态 ========== */
  .empty-state {
    padding: 20px 10px !important;
  }

  /* ========== Badge标签 ========== */
  .badge {
    font-size: 11px !important;
    padding: 2px 8px !important;
  }

  /* ========== 用户下拉菜单 ========== */
  .user-dropdown {
    right: -10px !important;
    min-width: 180px !important;
    border-radius: 12px !important;
  }
  .user-dropdown-item {
    padding: 12px 16px !important;
    font-size: 14px !important;
  }

  /* ========== 滚动条优化 ========== */
  ::-webkit-scrollbar {
    width: 3px !important;
    height: 3px !important;
  }

  /* ========== 热点列表 ========== */
  .hot-item {
    padding: 10px 0 !important;
    gap: 10px !important;
  }
  .hot-title {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  .hot-meta {
    font-size: 11px !important;
  }
  .hot-item .btn-text {
    font-size: 12px !important;
    padding: 4px 8px !important;
    white-space: nowrap !important;
  }

  /* ========== 爆文库分类面板 ========== */
  .category-card {
    padding: 10px !important;
    min-width: 100px !important;
  }
  .category-card .cat-name {
    font-size: 13px !important;
  }
  .category-card .cat-count {
    font-size: 11px !important;
  }

  /* ========== 爆文库分析面板 ========== */
  .analysis-section {
    padding: 12px !important;
  }
  .analysis-section h4 {
    font-size: 14px !important;
  }

  /* ========== 爆文库文章列表 ========== */
  .article-item {
    padding: 10px 0 !important;
    gap: 10px !important;
  }
  .article-item .article-title {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  /* ========== 创作台移动端Tab ========== */
  .mobile-creation-tabs {
    margin-bottom: 12px !important;
  }

  /* ========== 发布页移动端Tab ========== */
  .mobile-publish-tabs {
    margin-bottom: 12px !important;
  }

  /* ========== 公众号管理页 ========== */
  .account-card {
    padding: 14px !important;
  }
  .account-card .account-info {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* ========== 设置页 ========== */
  .settings-section {
    padding: 14px !important;
  }
  .settings-section h3 {
    font-size: 15px !important;
  }

  /* ========== 提示词管理 ========== */
  .prompt-item {
    padding: 10px 12px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .prompt-item .prompt-actions {
    width: 100% !important;
    justify-content: flex-end !important;
  }

  /* ========== 图片生成弹窗 ========== */
  .image-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .image-grid-item {
    border-radius: 8px !important;
  }

  /* ========== 发布记录 ========== */
  .publish-log-item {
    padding: 10px 0 !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* ========== 页面body滚动优化 ========== */
  .page-body {
    -webkit-overflow-scrolling: touch;
  }

  /* ========== 底部安全区域 ========== */
  .content-area {
    padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  }

  /* ========== 微信预览框 ========== */
  .wechat-preview-container {
    font-size: 14px !important;
  }
  .wechat-article-title {
    font-size: 18px !important;
  }

  /* ========== 小绿书预览 ========== */
  #xls-preview {
    padding: 14px !important;
  }
}

.landing {
  min-height: 100vh;
  background: var(--bg-white);
}

.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
}

.landing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-logo {
  width: 38px;
  height: 38px;
  background: #07C160;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-logo svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.footer-brand .landing-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.footer-brand .landing-logo svg {
  width: 15px;
  height: 15px;
}

.landing-brand-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-hero {
  padding-top: 60px;
  background: linear-gradient(180deg, #f0faf4 0%, var(--bg-white) 100%);
}

.workflow-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.wf-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 16px;
  transition: var(--transition);
}

.wf-step:hover {
  background: var(--wechat-green-light);
  color: var(--wechat-green);
}

.wf-step.active {
  background: var(--wechat-green);
  color: white;
}

.wf-step.active:hover {
  background: var(--wechat-green-hover);
  color: white;
}

.wf-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.wf-step.active .wf-num {
  background: rgba(255,255,255,0.3);
}

.wf-arrow {
  color: var(--text-placeholder);
  font-size: 14px;
  flex-shrink: 0;
}

.landing-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--wechat-green-light);
  color: var(--wechat-green);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.hero-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--wechat-green);
  margin-bottom: 2px;
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.landing-section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

.landing-flow {
  padding: 64px 0;
  background: var(--bg-page);
}

.flow-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.flow-step {
  flex: 1;
  max-width: 220px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.flow-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--wechat-green);
}

.flow-step-num {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  background: var(--wechat-green);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-step-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.flow-step h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.flow-step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.flow-arrow {
  color: var(--text-placeholder);
  font-size: 20px;
  padding-top: 40px;
  flex-shrink: 0;
}

.landing-plans {
  padding: 80px 0;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.plan-card {
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.plan-highlight {
  border-color: var(--wechat-green);
  box-shadow: 0 8px 32px rgba(7, 193, 96, 0.15);
}

.plan-unavailable {
  opacity: 0.7;
}

.plan-unavailable:hover {
  transform: none;
  box-shadow: none;
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--wechat-green);
  color: white;
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.plan-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.plan-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.plan-price {
  margin-bottom: 24px;
}

.plan-price-value {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-primary);
}

.plan-price-period {
  font-size: 14px;
  color: var(--text-secondary);
}

.plan-features {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.plan-feature-item {
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-regular);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
}

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

.plan-check {
  color: var(--wechat-green);
  font-weight: 700;
  flex-shrink: 0;
}

.landing-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #07C160, #06a852);
  text-align: center;
}

.cta-title {
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.cta-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
}

.landing-cta .btn-primary {
  background: white;
  color: var(--wechat-green);
  border-color: white;
}

.landing-cta .btn-primary:hover {
  background: rgba(255,255,255,0.9);
}

.landing-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-placeholder);
}

.membership-current {
  background: var(--wechat-green-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mc-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.mc-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--wechat-green);
}

.membership-plans-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.membership-plan-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: var(--transition);
}

.membership-plan-item:hover {
  border-color: var(--wechat-green);
  background: var(--wechat-green-light);
}

.membership-plan-item.current {
  border-color: var(--wechat-green);
  background: var(--wechat-green-light);
}

.mp-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.mp-info {
  flex: 1;
}

.mp-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.mp-price {
  font-size: 13px;
  color: var(--text-secondary);
}

.payment-order-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-page);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.pos-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.pos-info {
  flex: 1;
}

.pos-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.pos-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.pos-amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--wechat-green);
}

.payment-methods {
  margin-bottom: 16px;
}

.pm-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.pm-options {
  display: flex;
  gap: 12px;
}

.pm-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
}

.pm-option input {
  display: none;
}

.pm-option.selected {
  border-color: var(--wechat-green);
  background: var(--wechat-green-light);
}

.pm-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  position: relative;
  flex-shrink: 0;
  transition: var(--transition);
}

.pm-option.selected .pm-radio {
  border-color: var(--wechat-green);
}

.pm-option.selected .pm-radio::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wechat-green);
}

.pm-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.wechat-icon {
  background: #07C160;
}

.alipay-icon {
  background: #1677FF;
}

.pm-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.payment-qr-area {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--border-light);
  margin-top: 16px;
}

.pqr-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.pqr-code {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.qr-placeholder {
  width: 160px;
  height: 160px;
  border: 2px dashed var(--wechat-green);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--wechat-green-light);
}

.qr-icon {
  font-size: 36px;
  font-weight: 800;
}

.qr-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.pqr-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--wechat-green);
  margin-bottom: 8px;
}

.pqr-tip {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.pqr-status {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 16px;
  background: var(--bg-page);
  border-radius: 20px;
  display: inline-block;
}
