/* =====================
   懂你的创作平台 - 深色科技蓝主题
   ===================== */

:root {
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.08);
  --accent-medium: rgba(37, 99, 235, 0.15);
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8fafc;
  --bg-elevated: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

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

html, body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  min-width: 320px;
  overflow-x: auto;
}

/* ===== 整体布局 ===== */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 320px;
}

/* ===== 顶部导航栏 ===== */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.3);
  flex-shrink: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand .logo {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid rgba(255,255,255,0.15);
}

.nav-brand .brand-text h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.nav-brand .brand-text span {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

/* 用户信息栏 - 汉堡菜单下拉面板 */
.user-bar {
  position: absolute;
  top: 52px;
  right: 8px;
  left: auto;
  width: 160px;
  background: #fff;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 6px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 99;
  font-size: 13px;
}
.user-bar.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.user-bar .user-actions {
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.user-bar .user-link {
  display: block;
  padding: 11px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  border-radius: 0;
}
.user-bar .user-link:hover,
.user-bar .user-link:active {
  background: #f0f5ff;
  color: var(--accent);
}

.user-login-btn {
  padding: 7px 16px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.2);
}
.user-login-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  font-weight: 700;
  font-size: 13px;
}

.user-role {
  padding: 2px 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  font-weight: 600;
  font-size: 11px;
}

.user-expire {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
}

.user-actions {
  display: flex;
  gap: 6px;
}

.user-link {
  padding: 5px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.15);
}
.user-link:hover {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* 汉堡菜单按钮 - 所有端都显示 */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  gap: 5px;
  padding: 0;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: all 0.3s ease;
}
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 欢迎信息 - 汉堡菜单模式下始终显示在导航栏内 */
.nav-user-greeting {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  padding-right: 8px;
  white-space: nowrap;
  font-size: 13px;
  color: rgba(255,255,255,0.95);
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ===== 主内容区 ===== */
.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-width: 0;
  justify-content: center;
  align-items: stretch;
  position: relative;
}

/* 两侧装饰背景图 */
.main-content::before,
.main-content::after {
  content: '';
  flex: 1;
  min-width: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  opacity: 0.08;
}

.main-content::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 800'%3E%3Cdefs%3E%3ClinearGradient id='g1' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%232563eb'/%3E%3Cstop offset='100%25' stop-color='%237c3aed'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect fill='url(%23g1)' width='400' height='800' rx='0'/%3E%3Ccircle cx='200' cy='150' r='80' fill='white' opacity='0.15'/%3E%3Ccircle cx='100' cy='400' r='50' fill='white' opacity='0.1'/%3E%3Ccircle cx='300' cy='600' r='60' fill='white' opacity='0.08'/%3E%3Cpath d='M50 700 Q150 600 250 700 Q350 800 400 700' fill='none' stroke='white' stroke-width='2' opacity='0.12'/%3E%3Cpath d='M0 100 Q100 50 200 100' fill='none' stroke='white' stroke-width='1.5' opacity='0.1'/%3E%3C/svg%3E");
  background-color: var(--accent);
}

.main-content::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 800'%3E%3Cdefs%3E%3ClinearGradient id='g2' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%237c3aed'/%3E%3Cstop offset='100%25' stop-color='%232563eb'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect fill='url(%23g2)' width='400' height='800' rx='0'/%3E%3Ccircle cx='200' cy='200' r='70' fill='white' opacity='0.12'/%3E%3Ccircle cx='300' cy='450' r='55' fill='white' opacity='0.1'/%3E%3Ccircle cx='80' cy='650' r='45' fill='white' opacity='0.08'/%3E%3Cpath d='M0 300 Q100 200 200 300 Q300 400 400 300' fill='none' stroke='white' stroke-width='2' opacity='0.12'/%3E%3C/svg%3E");
  background-color: var(--accent);
}

/* ===== 左侧配置面板 ===== */
.config-panel {
  width: 460px;
  min-width: 380px;
  max-width: 520px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 10;
  flex-shrink: 0;
  border-radius: 0;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.panel-body::-webkit-scrollbar { width: 5px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

/* ===== 登录提示 ===== */
.login-tip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.login-tip .tip-icon { font-size: 26px; flex-shrink: 0; }
.login-tip .tip-text { flex: 1; }
.login-tip .tip-text strong { display: block; font-size: 14px; color: #1a202c; margin-bottom: 3px; }
.login-tip .tip-text span { font-size: 12px; color: var(--text-secondary); }
.login-tip .tip-btn {
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.login-tip .tip-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* ===== 区块样式 ===== */
.section { margin-bottom: 24px; }

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title .icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  font-weight: 700;
}

/* ===== 表单元素 ===== */
.form-group { margin-bottom: 16px; }

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

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

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

/* 滑块 */
.slider-group { margin-bottom: 16px; }

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

.slider-header label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.slider-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 10px;
  border-radius: 20px;
}

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  border: 3px solid #fff;
  transition: transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.1); }

/* 标签 */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  padding: 7px 14px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  font-weight: 500;
}

.tag-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.tag-item.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* 复选框 */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 0;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-group span {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== 生成按钮 ===== */
.generate-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  letter-spacing: 0.02em;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

.generate-btn:active { transform: translateY(0); }
.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.generate-btn .spinner {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ===== 操作按钮 ===== */
.action-btn {
  white-space: nowrap;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.action-btn:hover {
  background: var(--accent);
  color: #fff;
}
.action-btn:active {
  transform: scale(0.97);
}
.action-btn:disabled:not(.loading) {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #9ca3af;
  color: #9ca3af;
  background: transparent;
}
.action-btn.loading {
  opacity: 1;
  cursor: wait;
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ===== 热榜搜索 ===== */
.hot-search-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--border-light);
}

.platform-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.platform-tab {
  flex: 1;
  padding: 9px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.platform-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.platform-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.hot-list {
  max-height: 260px;
  overflow-y: auto;
}

.hot-meta-bar {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 4px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 500;
}

.hot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.hot-item:hover { background: var(--accent-light); }

.hot-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.hot-rank.top {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.hot-rank.normal {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1.5px solid var(--border-color);
}

.hot-title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.hot-heat {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 500;
}

.hot-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  flex-shrink: 0;
}

.hot-tag.bao {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.hot-tag.re {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--accent);
  border: 1px solid #bfdbfe;
}

.hot-tag.xin {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: var(--success);
  border: 1px solid #a7f3d0;
}

/* ===== 右侧预览区域 ===== */
.preview-area {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
  animation: previewFadeIn 0.25s ease;
}

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

/* 预览工具栏 */
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.preview-toolbar h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

.toolbar-btn {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.toolbar-btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.toolbar-btn.primary:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.toolbar-btn.close-preview-btn {
  background: var(--bg-tertiary);
  border-color: var(--danger);
  color: var(--danger);
  font-weight: 700;
}
.toolbar-btn.close-preview-btn:hover {
  background: #fef2f2;
}

/* 统计栏 */
.stats-bar {
  display: flex;
  gap: 24px;
  padding: 10px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}

.stats-bar .stat-value {
  font-weight: 800;
  color: var(--accent);
}

/* 预览内容容器 - 独立滚动 */
.preview-content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.preview-content-wrapper::-webkit-scrollbar {
  width: 8px;
}
.preview-content-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.preview-content-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* ===== 文章样式 ===== */
.preview-content {
  max-width: 100%;
  margin: 0 auto;
}

.article-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 20px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--border-color);
}

.article-meta .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.article-meta .meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-meta .author {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.article-meta .date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.article-body,
.article-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* 段落间距与缩进 */
.article-body p,
.article-content p {
  margin-bottom: 12px;
  text-align: justify;
  text-indent: 2em;
  line-height: 1.85;
}

/* 短段落：保持与长段落一致的对齐与缩进，避免居中破坏段落对齐 */
.article-body p.short-para,
.article-content p.short-para {
  text-indent: 2em;
  text-align: justify;
  font-weight: 600;
}

/* 金句：只给少数真正点睛的短句，继承原文基准行距/字号/段间距 */
.article-body p.short-para.gold-line,
.article-content p.short-para.gold-line {
  color: var(--accent);
  font-weight: 700;
}

/* 长段落：铺陈叙述，正常缩进，继承原文基准行距/字号/段间距 */
.article-body p.long-para,
.article-content p.long-para {
  text-indent: 2em;
}

/* 列表项不缩进 */
.article-body p.list-item,
.article-content p.list-item {
  text-indent: 0;
  padding-left: 10px;
  margin-bottom: 8px;
  font-weight: 500;
}

/* h2 小标题 - 左侧竖线装饰 */
.article-body h2,
.article-content h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 32px 0 16px;
  padding: 8px 0 8px 14px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, var(--accent-light) 0%, transparent 100%);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}



/* 引用块增强 */
.article-body blockquote,
.article-content blockquote {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, var(--accent-light) 0%, rgba(37,99,235,0.04) 100%);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
}
.article-body blockquote::before,
.article-content blockquote::before {
  content: '"';
  font-size: 48px;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.15;
  position: absolute;
  top: -4px;
  left: 12px;
  line-height: 1;
}

/* 加粗文字强调 */
.article-body strong,
.article-content strong {
  font-weight: 800;
  color: var(--accent);
}

/* strong 带内联颜色样式时的增强 */
.article-body strong[style*="color"],
.article-content strong[style*="color"] {
  font-weight: 800;
  padding: 0 2px;
}

/* 高亮框增强 */
.highlight-box {
  margin-top: 28px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--accent-light) 0%, rgba(37,99,235,0.04) 100%);
  border: 1px solid rgba(37,99,235,0.12);
  border-radius: var(--radius);
  position: relative;
}
.highlight-box::before {
  content: '✨';
  position: absolute;
  top: -10px;
  left: 16px;
  font-size: 18px;
}

/* 文章配图 */
.article-image {
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-image .img-caption {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px;
  background: var(--bg-tertiary);
  font-weight: 500;
}

/* 段落分隔线 */
.article-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 24px;
}
.article-divider::before,
.article-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

/* 引用块外层间距 */
.article-quote-wrapper {
  margin: 20px 0;
}

/* 加粗句子独立展示 */
.article-highlight-sentence {
  font-size: 16px;
  line-height: 1.9;
  text-indent: 0 !important;
  padding: 4px 0;
}

/* 文章结尾装饰 */
.article-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
}
.article-end-line {
  width: 40px;
  height: 1px;
  background: var(--border-color);
}
.article-end-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}


/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}

.empty-state .big-icon {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.15;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 400px;
  font-weight: 500;
}

/* Toast 通知 */
.toast {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  padding: 12px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

/* 历史记录 */
.history-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--border-light);
}

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

.history-header .section-title { margin-bottom: 0; }

.clear-history-btn {
  padding: 4px 12px;
  background: transparent;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.clear-history-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: #fef2f2;
}

.history-list {
  max-height: 200px;
  overflow-y: auto;
}

.history-item {
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid transparent;
}

.history-item:hover {
  background: var(--accent-light);
  border-color: var(--accent-medium);
}

.history-item .h-info { flex: 1; min-width: 0; }

.history-item .h-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.history-item .h-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

.history-item .h-delete {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.history-item .h-delete:hover {
  background: var(--danger);
  color: #fff;
}

/* ===== Modal 弹窗 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  width: 460px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.modal h2 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.modal .form-group { margin-bottom: 16px; }
.modal label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.modal input, .modal select, .modal textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.modal textarea { resize: vertical; }
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--accent); }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* 润色选项 */
.polish-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.polish-option {
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.polish-option:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.polish-option.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* 润色Tab切换 */
.polish-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}
.polish-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.polish-tab.active {
  color: var(--accent);
}
.polish-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.polish-tab:hover {
  color: var(--accent);
}

/* 润色面板 */
.polish-panel {
  display: none;
}
.polish-panel.active {
  display: block;
}

/* 推送平台选择 */
.push-platforms {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.push-platform-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.push-platform-item:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.push-platform-item .platform-icon {
  font-size: 24px;
  width: 36px;
  text-align: center;
}
.push-platform-item .platform-info {
  flex: 1;
}
.push-platform-item .platform-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.push-platform-item .platform-status {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.push-platform-item .platform-check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.push-platform-item.selected .platform-check {
  border-color: var(--accent);
  background: var(--accent);
}
.push-platform-item.selected .platform-check::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* ===== 响应式 - 平板 ===== */
@media (max-width: 1024px) {
  .main-content::before,
  .main-content::after { display: none; }
  .main-content { justify-content: flex-start; }
  .config-panel {
    width: 420px;
    min-width: 320px;
    max-width: 460px;
  }
  .top-nav {
    padding: 0 16px;
  }
  .nav-brand h1 {
    font-size: 16px;
  }
}

/* ===== 响应式 - 移动端 ===== */
@media (max-width: 768px) {
  /* 移动端允许页面自然滚动，不再锁定在 100vh */
  html, body {
    overflow: auto;
    height: auto;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
  }

  .app-container {
    height: auto;
    min-height: 100vh;
  }

  .main-content {
    flex-direction: column;
    overflow: visible;
  }

  /* 顶部导航 */
  .top-nav {
    height: 52px;
    padding: 0 12px;
    position: relative;
  }
  .nav-brand .logo {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .nav-brand h1 {
    font-size: 15px;
  }
  .nav-brand span {
    display: none;
  }
  /* 汉堡按钮显示 */
  .nav-toggle {
    display: flex;
  }
  /* 移动端欢迎信息微调 */
  .nav-user-greeting {
    font-size: 12px;
  }
  .nav-user-greeting .user-name {
    font-size: 12px;
  }
  .nav-user-greeting .user-name + span {
    font-size: 9px;
    padding: 1px 6px;
  }

  /* 左侧面板 - 占满宽度，允许内容自然展开 */
  .config-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
    overflow: visible;
  }
  .panel-body {
    padding: 14px;
  }

  /* section标题 */
  .section-title {
    font-size: 14px;
    padding: 10px 0;
  }
  .section-title .icon {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  /* 表单 */
  .form-group {
    margin-bottom: 12px;
  }
  .form-group label {
    font-size: 12px;
    margin-bottom: 4px;
  }
  .form-group input,
  .form-group select {
    padding: 8px 10px;
    font-size: 14px;
  }

  /* 标签 */
  .tag-container {
    gap: 6px;
    flex-wrap: wrap;
  }
  .tag-item {
    padding: 5px 10px;
    font-size: 12px;
  }

  /* 按钮 */
  .action-btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
  }
  .generate-btn {
    padding: 14px;
    font-size: 16px;
  }

  /* 历史记录 - 移动端可滚动 */
  .history-section {
    display: block;
    margin-top: 16px;
    padding-top: 16px;
  }
  .history-list {
    max-height: 240px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 预览 Modal - 移动端全屏 */
  .preview-area {
    z-index: 1000;
  }
  .preview-toolbar {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .preview-toolbar h2 {
    font-size: 14px;
    width: 100%;
  }
  .toolbar-actions {
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
  .toolbar-btn {
    padding: 6px 10px;
    font-size: 12px;
    flex: 1;
    justify-content: center;
    min-width: 0;
  }
  .stats-bar {
    gap: 12px;
    padding: 8px 12px;
    font-size: 12px;
  }

  /* Modal 弹窗 - 移动端适配 */
  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    padding: 20px 16px;
  }

  /* 登录提示 */
  .login-tip {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 14px;
  }

  /* 移动端触摸滚动优化 */
  .panel-body,
  .hot-list,
  .history-list,
  .preview-content-wrapper,
  .modal {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  /* 预览区域在移动端全屏时，内容可滚动 */
  .preview-area {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .preview-content-wrapper {
    flex: 1;
    overflow-y: auto;
  }
}

/* ===== 响应式 - 小屏手机 ===== */
@media (max-width: 400px) {
  .top-nav {
    height: 48px;
    padding: 0 10px;
  }
  .nav-brand h1 {
    font-size: 13px;
  }
  .user-bar .user-info-text {
    display: none;
  }
  .panel-body {
    padding: 10px;
  }
  .generate-btn {
    padding: 12px;
    font-size: 15px;
  }
  .toolbar-actions {
    gap: 4px;
  }
  .toolbar-btn {
    padding: 6px 8px;
    font-size: 11px;
  }
}
