/* ===================================================
   我的信息中心 - 自托管版
   样式表
   =================================================== */

:root {
  --bg: #f5f3ef;
  --surface: #ffffff;
  --surface2: #f1efe8;
  --surface3: #eae7df;
  --border: #e0ddd5;
  --border2: #d0cdc5;
  --text: #1a1a1a;
  --text2: #555;
  --text3: #999;
  --primary: #6366f1;
  --primary-light: #eef2ff;
  --primary-dark: #4f46e5;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --error: #ef4444;
  --error-light: #fef2f2;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: all 0.2s ease;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============ 首页导航 ============ */
.home-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8vh 20px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
}

.home-header {
  text-align: center;
  margin-bottom: 40px;
}

.home-clock {
  font-size: 72px;
  font-weight: 200;
  color: #fff;
  letter-spacing: 4px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.home-date {
  font-size: 1.125em;
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
}

.home-search {
  margin-top: 24px;
}

.home-search input {
  width: 480px;
  max-width: 90vw;
  padding: 14px 24px;
  border: none;
  border-radius: 50px;
  font-size: 1em;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  outline: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: var(--transition);
}

.home-search input:focus {
  box-shadow: 0 4px 25px rgba(0,0,0,0.15);
  transform: scale(1.02);
}

.home-nav {
  width: 100%;
  max-width: 900px;
}

.nav-category {
  margin-bottom: 24px;
}

.nav-category h3 {
  color: rgba(255,255,255,0.8);
  font-size: 0.875em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.85);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.nav-card:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-icon {
  font-size: 0.875em;
  line-height: 1;
}

.nav-title {
  font-size: 0.8125em;
  font-weight: 500;
}

.home-footer {
  margin-top: 40px;
}

.home-footer .btn-text {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px 24px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.home-footer .btn-text:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ============ 认证页面 ============ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.auth-logo {
  font-size: 48px;
  margin-bottom: 12px;
}

.auth-card h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.auth-subtitle {
  color: var(--text3);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-form { text-align: left; }

.auth-error {
  color: var(--error);
  font-size: 13px;
  min-height: 20px;
  margin: 8px 0;
}

.auth-switch {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text2);
}

.auth-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-back {
  margin-top: 16px;
  font-size: 13px;
}

.auth-back a {
  color: var(--text3);
  text-decoration: none;
}

/* ============ 主应用布局 ============ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

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

.sidebar-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo { font-size: 24px; }
.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
  position: relative;
}

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

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

.nav-item span:first-child {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

.badge {
  margin-left: auto;
  background: var(--surface3);
  color: var(--text2);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.nav-item.active .badge {
  background: var(--primary);
  color: #fff;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.btn-logout {
  width: 100%;
  padding: 10px;
  background: var(--surface2);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text2);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--error-light);
  color: var(--error);
}

.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 24px 32px;
  min-height: 100vh;
}

/* ============ 视图头部 ============ */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.view-header h2 {
  font-size: 20px;
  font-weight: 600;
}

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

/* ============ 仪表盘 ============ */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text3);
  margin-top: 2px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.dash-type-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

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

.dash-type-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dash-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.dash-type-label {
  font-weight: 500;
  flex: 1;
}

.dash-type-count {
  font-size: 13px;
  color: var(--text3);
}

.dash-type-list { font-size: 13px; }

.dash-item {
  padding: 6px 0;
  color: var(--text2);
  border-bottom: 1px solid var(--surface2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-more {
  padding: 6px 0;
  color: var(--primary);
  font-size: 12px;
}

.dash-empty {
  color: var(--text3);
  font-size: 13px;
  padding: 8px 0;
}

/* ============ 条目列表 ============ */
.entry-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.entry-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.entry-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

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

.entry-title {
  font-weight: 500;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.entry-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: var(--transition);
}

.entry-card:hover .entry-actions { opacity: 1; }

.fav-star { font-size: 14px; }

.entry-card-body { font-size: 13px; }

.entry-field {
  display: flex;
  gap: 8px;
  padding: 3px 0;
}

.field-label {
  color: var(--text3);
  min-width: 70px;
  font-size: 12px;
}

.field-value {
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-masked {
  filter: blur(4px);
  cursor: pointer;
  user-select: none;
}

.field-masked:hover { filter: blur(2px); }

.entry-tags {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
}

/* ============ 空状态 ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}

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

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}

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

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

/* ============ 按钮 ============ */
.btn-primary {
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  padding: 10px 20px;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--surface3);
}

.btn-full { width: 100%; }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--surface2);
}

.btn-xs {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--surface2);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--primary);
  transition: var(--transition);
}

.btn-xs:hover { background: var(--primary-light); }

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn-text {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
}

/* ============ 搜索 ============ */
.search-input {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 14px;
  width: 220px;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  width: 280px;
}

/* ============ 模态框 ============ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text3);
  padding: 4px 8px;
  border-radius: 6px;
}

.modal-close:hover { background: var(--surface2); }

.modal-content h3 {
  margin-bottom: 16px;
  font-size: 18px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ============ 详情 ============ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-field { padding: 8px 0; }
.detail-field-full { grid-column: 1 / -1; }

.detail-field label {
  display: block;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 4px;
}

.detail-value {
  font-size: 14px;
  color: var(--text);
  word-break: break-all;
}

.detail-meta {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--text3);
}

/* ============ 导航管理 ============ */
.nav-manage-list { display: flex; flex-direction: column; gap: 8px; }

.nav-manage-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.nav-mi-icon { font-size: 24px; }
.nav-mi-info { flex: 1; }
.nav-mi-title { display: block; font-weight: 500; font-size: 14px; }
.nav-mi-url { font-size: 12px; color: var(--text3); }
.nav-mi-cat {
  font-size: 12px;
  padding: 2px 10px;
  background: var(--surface2);
  border-radius: 10px;
  color: var(--text2);
}

.toggle-small {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.toggle-small input { opacity: 0; width: 0; height: 0; }

.toggle-small span {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--surface3);
  border-radius: 20px;
  transition: var(--transition);
}

.toggle-small span::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-small input:checked + span { background: var(--success); }
.toggle-small input:checked + span::before { transform: translateX(16px); }

/* ============ 设置 ============ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.settings-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.settings-card h3 {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.settings-card p {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 8px;
}

/* ============ 首页标题/副标题 ============ */
.home-title {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  margin-top: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.home-subtitle {
  font-size: 1em;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

.home-footer-text {
  margin-top: 40px;
  font-size: 0.8125em;
  color: rgba(255,255,255,0.5);
}

/* ============ 首页底部备案/版权 ============ */
.home-bottom-bar {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.home-copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.5px;
}

.home-icp {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}

.home-icp:hover {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
}

.home-gongan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============ 首页文摘预览 ============ */
.home-blog-section {
  width: 100%;
  max-width: 900px;
  margin-top: 32px;
}

.home-blog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.home-blog-header h3 {
  color: rgba(255,255,255,0.9);
  font-size: 16px;
  font-weight: 500;
}

.home-blog-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.home-blog-link:hover {
  color: #fff;
}

.home-blog-empty {
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  padding: 20px;
}

.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.home-blog-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.9);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.home-blog-card:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.home-blog-cover {
  height: 120px;
  background-size: cover;
  background-position: center;
}

.home-blog-card-body {
  padding: 14px;
}

.home-blog-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-blog-card-summary {
  font-size: 13px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 8px;
}

.home-blog-card-meta {
  font-size: 12px;
  color: var(--text3);
  display: flex;
  gap: 8px;
  align-items: center;
}

.home-blog-tag {
  font-size: 11px;
  padding: 1px 6px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 6px;
}

/* ============ 文摘页面 ============ */
.blog-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

.blog-header {
  width: 100%;
  max-width: 900px;
  text-align: center;
  margin-bottom: 32px;
}

.blog-header-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.blog-title {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
  margin-bottom: 8px;
}

.blog-subtitle {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
}

.blog-nav-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.blog-nav-btn {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.blog-nav-btn:hover,
.blog-nav-btn.active {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

.blog-tags-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.blog-tag-chip {
  padding: 4px 14px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}

.blog-tag-chip:hover,
.blog-tag-chip.active {
  background: rgba(255,255,255,0.35);
  color: #fff;
}

.blog-content,
.blog-detail {
  width: 100%;
  max-width: 900px;
}

.blog-loading,
.blog-empty {
  text-align: center;
  color: rgba(255,255,255,0.6);
  padding: 60px 20px;
  font-size: 16px;
}

.blog-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.blog-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.blog-article-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.9);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.blog-article-card:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.blog-article-cover {
  height: 160px;
  background-size: cover;
  background-position: center;
}

.blog-article-body {
  padding: 16px;
}

.blog-article-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-article-summary {
  font-size: 14px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 10px;
}

.blog-article-meta {
  font-size: 12px;
  color: var(--text3);
  display: flex;
  gap: 10px;
  align-items: center;
}

.blog-article-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 8px;
  text-decoration: none;
}

.blog-article-tag:hover {
  background: var(--primary);
  color: #fff;
}

/* ============ 文摘文章详情 ============ */
.blog-detail-content {
  background: rgba(255,255,255,0.92);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(10px);
}

.blog-detail-cover {
  height: 240px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.blog-detail-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.4;
}

.blog-detail-meta {
  font-size: 13px;
  color: var(--text2);
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.blog-detail-body {
  line-height: 1.8;
}

/* ============ Markdown 渲染样式 ============ */
.markdown-body {
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
}

.markdown-body h1 { font-size: 26px; font-weight: 700; margin: 28px 0 16px; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.markdown-body h2 { font-size: 22px; font-weight: 600; margin: 24px 0 12px; border-bottom: 1px solid var(--surface2); padding-bottom: 6px; }
.markdown-body h3 { font-size: 18px; font-weight: 600; margin: 20px 0 10px; }
.markdown-body h4 { font-size: 16px; font-weight: 600; margin: 16px 0 8px; }
.markdown-body p { margin: 12px 0; }
.markdown-body ul, .markdown-body ol { margin: 12px 0; padding-left: 24px; }
.markdown-body li { margin: 6px 0; }
.markdown-body blockquote {
  margin: 16px 0;
  padding: 12px 20px;
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  border-radius: 4px;
  color: var(--text2);
}
.markdown-body code {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Consolas', 'Monaco', monospace;
}
.markdown-body pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.5;
}
.markdown-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.markdown-body a {
  color: var(--primary);
  text-decoration: none;
}
.markdown-body a:hover {
  text-decoration: underline;
}
.markdown-body img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.markdown-body th, .markdown-body td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.markdown-body th {
  background: var(--surface2);
  font-weight: 600;
}
.markdown-body hr {
  border: none;
  height: 2px;
  background: var(--border);
  margin: 24px 0;
}

/* ============ 文摘管理 ============ */
.blog-manage-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

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

.blog-manage-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.blog-manage-item:hover {
  box-shadow: var(--shadow-lg);
}

.blog-manage-item.draft {
  opacity: 0.7;
}

.blog-mi-status {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 500;
}

.status-draft {
  background: var(--warning-light);
  color: var(--warning);
}

.status-published {
  background: var(--success-light);
  color: var(--success);
}

.blog-mi-pin { font-size: 16px; }

.blog-mi-info { flex: 1; }
.blog-mi-title { display: block; font-weight: 500; font-size: 14px; }
.blog-mi-meta { font-size: 12px; color: var(--text3); }

.blog-mi-tags {
  display: flex;
  gap: 4px;
}

/* ============ 背景样式选择 ============ */
.bg-style-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.bg-style-item {
  height: 60px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px solid transparent;
  transition: var(--transition);
  position: relative;
}

.bg-style-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.bg-style-item.active {
  border-color: var(--primary);
}

.bg-style-check {
  font-size: 20px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.bg-style-name {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}

/* ============ 字体大小设置 ============ */
.font-size-control {
  padding: 4px 0;
}

.font-size-preview {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text);
  transition: font-size 0.2s ease;
  border: 1px solid var(--border);
}

.font-size-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.font-size-slider-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}

.font-size-slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.font-size-slider-row input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.font-size-value {
  text-align: center;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 12px;
}

/* ============ 背景图片设置 ============ */
.bg-image-section {
  padding: 4px 0;
}

.bg-image-preview {
  margin-bottom: 4px;
}

.bg-image-preview img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.bg-image-empty {
  padding: 16px;
  text-align: center;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border2);
  margin-bottom: 8px;
}

/* ============ 访问入口信息表 ============ */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.info-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.info-table td:first-child {
  width: 120px;
}

.info-table td:last-child {
  color: var(--text3);
  font-size: 12px;
}

.info-table code {
  background: var(--surface2);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Consolas', 'Monaco', monospace;
  color: var(--primary);
  word-break: break-all;
}

/* ============ Toast ============ */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 320px;
}

.toast.show { transform: translateX(0); }

.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--error); color: #fff; }
.toast-info { background: var(--primary); color: #fff; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }

  .sidebar.open { transform: translateX(0); }

  .main-content { margin-left: 0; padding: 16px; }

  .home-clock { font-size: 48px; }

  .dashboard-stats { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .entry-list { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .bg-style-grid { grid-template-columns: repeat(2, 1fr); }

  .search-input { width: 140px; }
  .search-input:focus { width: 180px; }
}

/* ============ 用户管理 ============ */
.user-manage-list { margin-top: 16px; }
.user-manage-list .info-table { font-size: 14px; }
.user-manage-list .info-table th { background: var(--surface2); padding: 10px 12px; text-align: left; font-weight: 600; border-bottom: 2px solid var(--border); }
.user-manage-list .info-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tag-admin { background: #fef3c7; color: #92400e; }

/* ============ 运行日志 ============ */
.log-list { margin-top: 16px; }
.log-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px; font-family: monospace; }
.log-item:hover { background: var(--surface2); }
.log-level { font-weight: 700; min-width: 48px; padding: 2px 6px; border-radius: 4px; font-size: 11px; text-align: center; }
.log-info .log-level { background: #dbeafe; color: #1e40af; }
.log-warn .log-level { background: #fef3c7; color: #92400e; }
.log-error .log-level { background: #fecaca; color: #991b1b; }
.log-time { color: var(--text3); min-width: 150px; white-space: nowrap; }
.log-category { color: var(--primary); min-width: 80px; }
.log-message { flex: 1; }
.log-detail { color: var(--text3); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 附件/文件 ============ */
.file-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.file-item img { cursor: pointer; }

/* ============ 入口配置 ============ */
.route-config { margin-top: 12px; }
.route-config input { font-family: monospace; font-size: 13px; }

/* ============ 富文本编辑器（文摘图文编辑）============ */
.rich-editor-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

/* 覆盖 Quill Snow 主题变量，使其融入系统风格 */
.rich-editor-wrap .ql-toolbar {
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  padding: 6px 10px;
  flex-wrap: wrap;
}
.rich-editor-wrap .ql-container {
  border: none;
  font-size: 14px;
  font-family: inherit;
}
.rich-editor-wrap .ql-editor {
  min-height: 280px;
  max-height: 520px;
  overflow-y: auto;
  padding: 14px 16px;
  line-height: 1.8;
  color: var(--text);
}
.rich-editor-wrap .ql-editor img {
  max-width: 100%;
  border-radius: 6px;
  margin: 8px 0;
  display: block;
}
.rich-editor-wrap .ql-editor p { margin: 6px 0; }
.rich-editor-wrap .ql-editor h1 { font-size: 24px; font-weight: 700; margin: 20px 0 10px; }
.rich-editor-wrap .ql-editor h2 { font-size: 20px; font-weight: 600; margin: 18px 0 8px; }
.rich-editor-wrap .ql-editor h3 { font-size: 17px; font-weight: 600; margin: 14px 0 6px; }
.rich-editor-wrap .ql-editor blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 8px 14px;
  margin: 10px 0;
  border-radius: 4px;
  color: var(--text2);
}
.rich-editor-wrap .ql-editor pre.ql-syntax {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 14px;
  border-radius: 6px;
  font-size: 13px;
  overflow-x: auto;
}
.rich-editor-wrap .ql-editor.ql-blank::before {
  color: var(--text3);
  font-style: normal;
}

/* 图片上传进度提示 */
.editor-img-uploading {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  margin: 4px 0;
}

/* 全屏编辑模态框适配 */
#modal-container .modal-inner.editor-modal {
  width: 90vw;
  max-width: 900px;
}

/* 富文本内容前台渲染 */
.richtext-body {
  line-height: 1.85;
  color: var(--text);
  font-size: 15px;
}
.richtext-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 12px 0;
  display: block;
}
.richtext-body h1 { font-size: 26px; font-weight: 700; margin: 28px 0 14px; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.richtext-body h2 { font-size: 22px; font-weight: 600; margin: 22px 0 11px; border-bottom: 1px solid var(--border); padding-bottom: 5px; }
.richtext-body h3 { font-size: 18px; font-weight: 600; margin: 18px 0 9px; }
.richtext-body p { margin: 10px 0; }
.richtext-body ul, .richtext-body ol { margin: 10px 0; padding-left: 22px; }
.richtext-body li { margin: 5px 0; }
.richtext-body a { color: var(--primary); }
.richtext-body a:hover { text-decoration: underline; }
.richtext-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 10px 18px;
  margin: 14px 0;
  border-radius: 4px;
  color: var(--text2);
}
.richtext-body pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 14px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}
.richtext-body code {
  background: var(--surface2);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 13px;
  font-family: 'Consolas', 'Monaco', monospace;
}
.richtext-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
}
.richtext-body th, .richtext-body td {
  padding: 9px 13px;
  border: 1px solid var(--border);
  text-align: left;
}
.richtext-body th { background: var(--surface2); font-weight: 600; }
.richtext-body hr { border: none; height: 2px; background: var(--border); margin: 22px 0; }
