/* ============================================================
   SevenSigma — 统一自定义样式 (Optimized)
   适用于所有页面（base / 独立页面 / 登录注册）
   ============================================================ */

/* ======================== 变量 ======================== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --accent: #f59e0b;
  --success: #10b981;
  --success-dark: #059669;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* 新增：动画与玻璃拟态变量 */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
}

/* ======================== 基础 ======================== */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
               'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue',
               Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.page-wrap {
  flex: 1 0 auto;
}
.site-footer {
  flex-shrink: 0;
}

/* 优化：更精致的滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
::-webkit-scrollbar-corner { background: transparent; }

/* 新增：文本选中高亮 */
::selection { background: rgba(37, 99, 235, 0.18); color: #1e3a5f; }
::-moz-selection { background: rgba(37, 99, 235, 0.18); color: #1e3a5f; }

/* ======================== 动画关键帧 ======================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 新增：滚动显示动画类 */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======================== 通用工具类 ======================== */
.mb-0  { margin-bottom: 0 !important; }
.mb-10 { margin-bottom: 10px; }
.mb-16 { margin-bottom: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-10 { margin-top: 10px; }
.text-center { text-align: center; }
.text-muted { color: #9ca3af; }

/* ======================== 导航栏 — 内部页 ======================== */
.navbar-main {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
  border: none; border-radius: 0; margin-bottom: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1), 0 0 0 1px rgba(255,255,255,0.08) inset;
  position: sticky; top: 0; z-index: 1000;

  /* 新增：毛玻璃效果 */
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.navbar-main .container-fluid { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.navbar-main .navbar-brand {
  color: #fff !important; font-weight: 700; font-size: 20px; letter-spacing: 1px; padding: 14px 20px;
  transition: opacity 0.2s;
}
.navbar-main .navbar-brand:hover { opacity: 0.9; }
.navbar-main .navbar-brand i { margin-right: 6px; }
.navbar-main .nav > li > a {
  color: rgba(255,255,255,0.85) !important; padding: 14px 16px;
  font-weight: 500; font-size: 14px; transition: all 0.2s;
  border-bottom: 2px solid transparent;
  position: relative;
}
.navbar-main .nav > li > a:hover,
.navbar-main .nav > li.active > a {
  color: #fff !important; background: rgba(255,255,255,0.1) !important;
  border-bottom-color: var(--accent);
}
.navbar-main .nav > li.active > a { background: rgba(255,255,255,0.15) !important; }
.navbar-main .navbar-toggle { border-color: rgba(255,255,255,0.3); margin-top: 10px; }
.navbar-main .navbar-toggle .icon-bar { background: #fff; }
.navbar-main .navbar-collapse { border-color: rgba(255,255,255,0.1); }
.navbar-main .dropdown-menu {
  border: none; box-shadow: var(--shadow-lg); border-radius: var(--radius); margin-top: 4px; padding: 8px 0;
  animation: slideDown 0.2s ease-out;
}
.navbar-main .dropdown-menu > li > a {
  padding: 10px 20px; color: var(--text); font-size: 14px; transition: all 0.15s;
}
.navbar-main .dropdown-menu > li > a:hover { background: #f0f4ff; color: var(--primary); }
.navbar-main .dropdown-menu .divider { background: var(--border); margin: 4px 0; }
.navbar-main .navbar-nav .open .dropdown-menu > li > a,
.navbar-main .navbar-nav .open .dropdown-menu .dropdown-header { color: var(--text); }
.navbar-main .navbar-right .user-btn {
  color: rgba(255,255,255,0.9) !important; background: rgba(255,255,255,0.15);
  border-radius: 20px; margin: 8px 4px; padding: 6px 16px; font-weight: 500; transition: all 0.2s;
}
.navbar-main .navbar-right .user-btn:hover { background: rgba(255,255,255,0.25); color: #fff !important; }
.nav-icon { margin-right: 5px; font-size: 14px; }

/* 发表按钮 — 导航栏内醒目强调 */
.navbar-main .nav > li.nav-publish > a {
  background: var(--accent);
  color: #fff !important;
  border-radius: 20px;
  margin: 8px 6px;
  padding: 6px 18px;
  font-weight: 600;
  border-bottom: none;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(245,158,11,0.25);
}
.navbar-main .nav > li.nav-publish > a:hover {
  background: #d97706;
  box-shadow: 0 4px 14px rgba(245,158,11,0.45);
  color: #fff !important;
  border-bottom: none;
  transform: translateY(-1px);
}
.navbar-main .nav > li.nav-publish.active > a {
  background: #d97706;
  border-bottom: none;
}

/* ======================== 导航栏 — 落地页 ======================== */
.navbar-landing {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
  border: none; border-radius: 0; margin-bottom: 0;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1), 0 0 0 1px rgba(255,255,255,0.08) inset;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.navbar-landing .container-fluid { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.navbar-landing .navbar-brand {
  color: #fff !important; font-weight: 700; font-size: 20px; letter-spacing: 1px;
}
.navbar-landing .navbar-brand i { margin-right: 6px; }
.navbar-landing .nav > li > a {
  color: rgba(255,255,255,0.85) !important; font-weight: 500; font-size: 14px;
  padding: 14px 16px; transition: all 0.2s;
}
.navbar-landing .nav > li > a:hover { color: #fff !important; background: rgba(255,255,255,0.1) !important; }
.navbar-landing .nav > li.active > a { color: #fff !important; background: rgba(255,255,255,0.15) !important; }
.navbar-landing .navbar-toggle .icon-bar { background: #fff; }
.navbar-landing .nav-icon { margin-right: 4px; }

/* ======================== Hero — 内部页 ======================== */
.hero-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff; padding: 48px 0 40px; text-align: center; margin-bottom: 30px;
  position: relative; overflow: hidden;
}
.hero-banner::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: hero-pulse 8s ease-in-out infinite;
}
.hero-banner h1 { font-weight: 700; font-size: 32px; margin: 0 0 12px; position: relative; }
.hero-banner p {
  font-size: 16px; opacity: 0.9; max-width: 600px; margin: 0 auto; line-height: 1.7;
  position: relative;
}

/* ======================== Hero — 落地页 ======================== */
.landing-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff; padding: 80px 0 70px; text-align: center;
  position: relative; overflow: hidden;
}
.landing-hero::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
  animation: hero-pulse 8s ease-in-out infinite;
}
@keyframes hero-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.landing-hero h1 {
  font-size: 42px; font-weight: 700; margin: 0 0 16px;
  position: relative; text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.landing-hero p {
  font-size: 18px; opacity: 0.9; max-width: 640px; margin: 0 auto 32px;
  line-height: 1.7; position: relative;
}
.landing-hero .hero-btns { position: relative; }
.landing-hero .hero-btns a {
  display: inline-block; padding: 12px 36px; border-radius: var(--radius);
  font-size: 16px; font-weight: 600; text-decoration: none; margin: 0 8px; transition: all 0.25s;
}
.btn-hero-primary {
  background: #fff; color: var(--primary); box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.btn-hero-primary:hover {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  color: var(--primary-dark); text-decoration: none;
}
.btn-hero-outline {
  background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.7);
}
.btn-hero-outline:hover {
  background: #fff; color: var(--primary); text-decoration: none; border-color: #fff;
}

/* ======================== 落地页特性卡 ======================== */
.features-section {
  max-width: 960px; margin: -40px auto 40px; padding: 0 20px;
  position: relative; z-index: 10;
}
.feature-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  padding: 28px 24px; text-align: center; transition: all 0.25s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; margin-bottom: 16px;
}
.feature-icon-purple { background: linear-gradient(135deg,#667eea,#764ba2); }
.feature-icon-orange { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.feature-icon-green  { background: linear-gradient(135deg,#10b981,#059669); }
.feature-card h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.feature-card p  { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.6; }

/* ======================== 布局 ======================== */
.main-container { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px; }
.content-grid {
  display: flex; gap: 24px; align-items: stretch; padding-top: 24px;
}
.content-sidebar-left,
.content-sidebar-right { flex: 0 0 240px; min-width: 0; }
.content-main { flex: 1; min-width: 0; }

/* 新增：左侧边栏sticky支持 */
.sidebar-sticky {
  position: sticky;
  top: 80px;
}

/* ======================== 卡片 ======================== */
.ui-card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  overflow: hidden; transition: box-shadow 0.2s, transform 0.2s;
}
.ui-card:hover { box-shadow: var(--shadow-md); }
.ui-card-body { padding: 20px 24px; }
.ui-card-header {
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: #fafbfc; font-weight: 600; font-size: 15px; color: var(--text);
}
.ui-card-header i { margin-right: 6px; color: var(--primary); }

/* ======================== 侧边栏 ======================== */
.sidebar-widget {
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  margin-bottom: 20px; overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.sidebar-widget:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.sidebar-widget::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.sidebar-widget:hover::after {
  opacity: 0.5;
}
.sidebar-widget .widget-title {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  background: #fafbfc; font-weight: 600; font-size: 14px; color: var(--text);
}
.sidebar-widget .widget-title i { margin-right: 6px; color: var(--primary); }
.sidebar-widget .widget-body { padding: 16px 18px; }
.sidebar-widget .widget-body p { color: var(--text-secondary); font-size: 13px; margin: 0; }

/* 新增：社区统计 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px;
  border-radius: var(--radius);
  background: #f8f9fa;
  transition: all 0.2s;
}
.stat-item:hover {
  background: #f0f4ff;
  transform: translateY(-2px);
}
.stat-item i {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 2px;
}
.stat-item span {
  font-size: 11px;
  color: var(--text-secondary);
}
.stat-item b {
  font-size: 15px;
  color: var(--text);
  font-weight: 700;
}

/* 新增：快速导航（供左侧边栏使用） */
.quick-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quick-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.quick-nav-item:hover {
  background: linear-gradient(90deg, #f0f4ff, transparent);
  color: var(--primary);
  text-decoration: none;
  padding-left: 14px;
}
.quick-nav-item i {
  color: var(--primary-light);
  font-size: 12px;
  transition: transform 0.2s;
}
.quick-nav-item:hover i {
  transform: translateX(2px);
}

/* 新增：标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-cloud .tag-badge {
  cursor: default;
}

/* ======================== 文章列表 ======================== */
.article-card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  padding: 20px 24px; margin-bottom: 14px; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: block; text-decoration: none; color: inherit;
  position: relative;
  overflow: hidden;
}
.article-card:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-2px);
  color: inherit; text-decoration: none; border-color: var(--primary-light);
}
.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity 0.3s;
}
.article-card:hover::before {
  opacity: 1;
}
.article-card h3 {
  font-size: 18px; font-weight: 600; margin: 0 0 8px; color: var(--text); line-height: 1.4;
}
.article-card:hover h3 { color: var(--primary); }
.article-card .article-desc {
  color: var(--text-secondary); font-size: 14px; margin: 0 0 10px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card .article-meta { font-size: 12px; color: #9ca3af; }
.article-card .article-meta b { color: var(--primary); font-weight: 500; }

/* ======================== 标签栏 ======================== */
.nav-tabs-modern {
  display: flex; gap: 6px; margin-bottom: 20px;
  border-bottom: 2px solid var(--border); flex-wrap: wrap;
}
.nav-tabs-modern a {
  display: inline-block; padding: 10px 20px; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.2s; border-radius: 6px 6px 0 0;
}
.nav-tabs-modern a:hover { color: var(--primary); background: #f0f4ff; }
.nav-tabs-modern a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ======================== 按钮 ======================== */
.btn-modern {
  border-radius: 6px; font-weight: 500; font-size: 14px; padding: 8px 20px;
  transition: all 0.2s; border: none; cursor: pointer; display: inline-block; text-decoration: none;
}
.btn-modern:hover { text-decoration: none; }
.btn-modern:active { transform: scale(0.98); }
.btn-modern-primary { background: var(--primary); color: #fff; }
.btn-modern-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,0.4); text-decoration: none; }
.btn-modern-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-modern-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-modern-success { background: var(--success); color: #fff; }
.btn-modern-success:hover { background: var(--success-dark); color: #fff; }
.btn-modern-danger { background: var(--danger); color: #fff; }
.btn-modern-danger:hover { background: var(--danger-dark); color: #fff; }
.btn-modern-accent { background: var(--accent); color: #fff; }
.btn-modern-accent:hover { background: #d97706; color: #fff; }
.btn-block { width: 100%; text-align: center; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-full {
  width: 100%; padding: 12px; border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.25s; margin-top: 6px;
  display: block; text-align: center; color: #fff; text-decoration: none;
}
.btn-full:hover { transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn-full:active { transform: scale(0.98); }
.btn-full-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.btn-full-primary:hover { box-shadow: 0 4px 14px rgba(37,99,235,0.4); }
.btn-full-success {
  background: linear-gradient(135deg, var(--success), var(--success-dark));
}
.btn-full-success:hover { box-shadow: 0 4px 14px rgba(16,185,129,0.4); }

/* ======================== 表单 ======================== */
.input-modern {
  border: 1.5px solid var(--border); border-radius: 6px;
  padding: 10px 14px; font-size: 14px; transition: all 0.2s;
  box-shadow: none; width: 100%; background: #fff;
}
.input-modern:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.1); outline: none;
}
textarea.input-modern { resize: vertical; min-height: 120px; }
.form-label {
  font-weight: 500; font-size: 14px; color: var(--text); margin-bottom: 6px; display: block;
}
.form-group-modern { margin-bottom: 18px; }
.form-divider { border: none; border-top: 1px dashed var(--border); margin: 20px 0; }
.radio-modern label, .checkbox-modern label {
  font-weight: 400; font-size: 14px; padding-left: 4px;
}
.radio-modern input[type="radio"], .checkbox-modern input[type="checkbox"] { margin-right: 4px; }
.radio-group-row { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-group-row .radio-modern { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.form-actions { display: flex; gap: 10px; margin-top: 10px; }

/* ======================== 输入框（登录/注册） ======================== */
.input-field {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 11px 14px; font-size: 14px; transition: all 0.2s;
  box-shadow: none; height: auto; width: 100%; background: #fff;
}
.input-field:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.1); outline: none;
}
.input-icon-wrap { position: relative; }
.input-icon-wrap i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #9ca3af; font-size: 16px; pointer-events: none;
}
.input-icon-wrap input { padding-left: 42px; }

/* ======================== 标签 ======================== */
.tag-badge {
  display: inline-block; padding: 3px 10px; background: #eff6ff;
  color: var(--primary); border-radius: 20px; font-size: 12px;
  font-weight: 500; margin: 2px 4px 2px 0; transition: all 0.15s;
}
.tag-badge:hover { background: var(--primary); color: #fff; text-decoration: none; }


.tag-badge-active {
  display: inline-block; padding: 3px 10px; background: #d4d4d4;
  color: var(--primary); border-radius: 20px; font-size: 12px;
  font-weight: 500; margin: 2px 4px 2px 0; transition: all 0.15s;
}
/* ======================== 提示框 ======================== */
.alert-modern {
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 14px; border: none; margin-bottom: 16px;
}
.alert-modern i { margin-right: 6px; }
.alert-error { background: #fef2f2; color: #dc2626; }

/* ======================== 快速入口图标 ======================== */
.quick-entry { text-align: center; }
.quick-entry-item { display: block; text-decoration: none; color: inherit; margin-bottom: 12px; }
.quick-entry-item:hover { text-decoration: none; color: inherit; }
.quick-entry-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 8px; font-size: 22px; color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}
.quick-entry-item:hover .quick-entry-icon {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.quick-entry-icon-purple { background: linear-gradient(135deg,#667eea,#764ba2); }
.quick-entry-icon-orange { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.quick-entry-icon-green  { background: linear-gradient(135deg,#10b981,#059669); }
.quick-entry-icon-blue   { background: linear-gradient(135deg,#2563eb,#1d4ed8); }
.quick-entry-label { font-size: 13px; font-weight: 500; color: #374151; }

/* ======================== 评论 ======================== */
.comment-item {
  background: #f9fafb; border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 10px; border: 1px solid #f0f0f0;
  transition: all 0.2s;
}
.comment-item:hover {
  border-color: #e5e7eb;
  box-shadow: var(--shadow-sm);
}
.comment-item h4 {
  font-size: 14px; font-weight: 600; color: var(--primary); margin: 0 0 6px;
}
.comment-item p { font-size: 14px; margin: 0; color: var(--text); }
.comment-item .comment-time { font-size: 12px; color: #9ca3af; margin-top: 6px; }
.comment-input-row { display: flex; gap: 10px; }
.comment-input-row .input-modern { flex: 1; }

/* ======================== 文章详情 ======================== */
.article-detail-header h1 { font-size: 28px; font-weight: 700; margin: 0 0 10px; line-height: 1.3; }
.article-detail-meta { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.article-detail-meta i { margin-right: 4px; }
.article-detail-content {
  font-size: 16px; line-height: 1.85; color: #374151;
  padding: 12px 0 24px;
}
.article-detail-content h1,
.article-detail-content h2,
.article-detail-content h3,
.article-detail-content h4 {
  font-weight: 700; line-height: 1.35;
  margin: 32px 0 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.article-detail-content h1 { font-size: 26px; }
.article-detail-content h2 { font-size: 22px; border-bottom: 2px solid var(--border); }
.article-detail-content h3 { font-size: 18px; border-bottom: none; margin-top: 28px; }
.article-detail-content p {
  margin: 0 0 18px;
}
.article-detail-content img {
  max-width: 100%; border-radius: var(--radius);
  margin: 16px 0; display: block;
  box-shadow: var(--shadow-sm);
}
.article-detail-content pre {
  background: #f8f9fa; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  overflow-x: auto; margin: 16px 0; font-size: 13px; line-height: 1.6;
}
.article-detail-content code {
  background: #f0f2f5; padding: 2px 6px; border-radius: 4px;
  font-size: 13px; color: #e11d48;
}
.article-detail-content pre code {
  background: none; padding: 0; color: inherit; font-size: 13px;
}
.article-detail-content blockquote {
  border-left: 4px solid var(--primary-light);
  background: #f0f4ff; padding: 14px 20px;
  margin: 16px 0; border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary); font-style: italic;
}
.article-detail-content ul,
.article-detail-content ol {
  padding-left: 24px; margin: 12px 0;
}
.article-detail-content li { margin-bottom: 8px; }
.article-detail-content table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.article-detail-content th,
.article-detail-content td {
  border: 1px solid var(--border); padding: 10px 14px; text-align: left;
}
.article-detail-content th {
  background: #f8f9fa; font-weight: 600;
}
.article-actions {
  display: flex; gap: 10px; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin: 24px 0;
}
.article-actions .like-count { font-size: 14px; color: var(--text-secondary); margin-right: 6px; }

/* ======================== 链接卡片 ======================== */
.link-card {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  padding: 20px 24px; margin-bottom: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none; color: inherit;
  width: calc(32% - 9px);
  box-sizing: border-box;
}
.link-card:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-2px);
  color: inherit; text-decoration: none; border-color: var(--primary-light);
}
.link-card-icon {
  flex-shrink: 0; width: 48px; height: 48px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
}
.link-card-body { flex: 1; min-width: 0; }
.link-card-body h3 {
  font-size: 17px; font-weight: 600; margin: 0 0 6px;
  color: var(--text); line-height: 1.4;
}
.link-card:hover .link-card-body h3 { color: var(--primary); }
.link-card-desc {
  font-size: 14px; color: var(--text-secondary); margin: 0 0 10px;
  line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.link-card-meta { font-size: 12px; color: #9ca3af; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-card-meta .tag-badge { font-size: 11px; }
.link-card-author i { margin-right: 3px; }

/* 新增：链接卡片网格布局（推荐用法） */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.link-grid .link-card {
  width: auto;
  margin-bottom: 0;
}

/* ======================== 空状态 ======================== */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-secondary);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
  margin: 20px 0;
}
.empty-state i { font-size: 48px; color: #d1d5db; margin-bottom: 16px; display: block; }
.empty-state-sm { padding: 30px; }

/* ======================== 页面标题 ======================== */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 700; margin: 0; color: var(--text); }
.page-header h1 i { margin-right: 8px; color: var(--primary); }

/* ======================== 登录/注册页 ======================== */
.auth-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: stretch; margin: 0;
}
.auth-topnav { padding: 20px 30px; }
.auth-topnav a {
  color: rgba(255,255,255,0.85); font-size: 15px; font-weight: 500;
  text-decoration: none; transition: color 0.2s;
}
.auth-topnav a:hover { color: #fff; }
.auth-topnav i { margin-right: 6px; }
.auth-wrapper {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-card {
  background: #fff; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); width: 100%;
  max-width: 420px; padding: 40px 36px;
  animation: fadeInUp 0.5s ease-out;
}
.auth-card-register { max-width: 480px; max-height: none; }
.auth-card .auth-icon { text-align: center; margin-bottom: 8px; }
.auth-card .auth-icon .icon-circle {
  width: 64px; height: 64px; border-radius: var(--radius-xl);
  display: inline-flex; align-items: center; justify-content: center;
}
.auth-card .auth-icon i { font-size: 28px; color: #fff; }
.icon-circle-purple { background: linear-gradient(135deg, #667eea, #764ba2); }
.icon-circle-green  { background: linear-gradient(135deg, var(--success), var(--success-dark)); }
.auth-card h2 {
  text-align: center; font-weight: 700; font-size: 24px;
  margin: 12px 0 6px; color: var(--text);
}
.auth-card .subtitle {
  text-align: center; font-size: 14px; color: var(--text-secondary); margin-bottom: 28px;
}
.auth-card .form-group { margin-bottom: 16px; }
.auth-card .form-group label {
  font-weight: 500; font-size: 14px; color: #374151; margin-bottom: 6px; display: block;
}
.auth-card-footer {
  text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-secondary);
}
.auth-card-footer a { color: var(--primary); font-weight: 500; text-decoration: none; }
.auth-card-footer a:hover { text-decoration: underline; }
.section-divider { border: none; border-top: 1px dashed var(--border); margin: 20px 0; }
.section-label {
  font-size: 12px; font-weight: 600; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px;
}
.section-label i { margin-right: 4px; }
.row-2col { display: flex; gap: 12px; }
.row-2col .form-group { flex: 1; }

/* ======================== 页脚 ======================== */
.site-footer {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  color: rgba(255,255,255,0.6);
  padding: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}
.footer-brand h4 {
  color: #fff;
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.footer-brand h4 i {
  margin-right: 8px;
  color: var(--primary-light);
}
.footer-brand p {
  color: rgba(255,255,255,0.55);
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
}
.footer-links h5 {
  color: rgba(255,255,255,0.9);
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-links a::before {
  content: '›';
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s;
  color: var(--primary-light);
  font-size: 14px;
}
.footer-links a:hover {
  color: #fff;
  transform: translateX(2px);
}
.footer-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 0;
  padding: 24px 20px;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  background: rgba(0,0,0,0.15);
}

/* ======================== 回到顶部 ======================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35), 0 0 0 1px rgba(255,255,255,0.1) inset;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}
.back-to-top:active {
  transform: translateY(-1px) scale(0.97);
}

/* ======================== 响应式 ======================== */
@media (max-width: 991px) {
  .content-sidebar-left,
  .content-sidebar-right { display: none; }
  .content-grid { gap: 0; padding-top: 16px; }
  .content-main { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 767px) {
  .hero-banner { padding: 30px 0 24px; }
  .hero-banner h1 { font-size: 24px; }
  .article-card { padding: 16px; }
  .navbar-main .nav > li > a { padding: 12px 10px; font-size: 13px; }
  .landing-hero { padding: 50px 0 40px; }
  .landing-hero h1 { font-size: 28px; }
  .landing-hero p { font-size: 15px; }
  .auth-card { padding: 28px 20px; }
  .row-2col { flex-direction: column; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 32px 20px 24px; }
  .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 14px; }
  .link-card { width: 100%; }

  /* 新增：移动端导航栏折叠优化 */
  .navbar-main .navbar-collapse {
    background: rgba(30, 58, 95, 0.98);
    border-top: 1px solid rgba(255,255,255,0.1);
    max-height: none;
  }
  .navbar-main .nav > li > a {
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .navbar-main .nav > li.nav-publish > a {
    margin: 8px 16px;
    text-align: center;
  }
}