/* ===================================================
   软件吐槽社区 — 全局样式系统
   清新小圆角主题 | Noto Sans SC | 蓝绿配色
=================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* ==================== CSS 变量 ==================== */
:root {
  --primary: #3DBDB1;
  --primary-dark: #2a9d91;
  --primary-light: #e8f8f7;
  --primary-mid: #b2e8e4;
  --accent: #FF7B54;
  --accent-light: #fff0eb;

  --bg: #f4f7f9;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-sidebar: #f9fbfc;

  --text-primary: #1a2332;
  --text-secondary: #5a6a7a;
  --text-muted: #9aa6b3;
  --text-link: #3DBDB1;

  --border: #e6edf3;
  --border-light: #f0f4f7;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 8px 24px rgba(61, 189, 177, 0.18);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  --header-h: 64px;
  --sidebar-w: 300px;
  --max-w: 1200px;
}

/* ==================== Reset ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text-link); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: var(--font); outline: none; }

/* ==================== 布局 ==================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

.page-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 24px;
  padding: 24px 0 40px;
}

@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ==================== Header ==================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, #45C9BF 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.logo-text { color: var(--text-primary); }
.logo-text span { color: var(--primary); }

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

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #45C9BF 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(61, 189, 177, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(61, 189, 177, 0.4);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-ghost {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--border);
  color: var(--text-primary);
}

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
}
.btn-danger:hover { transform: translateY(-1px); filter: brightness(1.05); color: white; }

.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ==================== 导航栏 ==================== */
.nav-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}
.nav-bar-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-bar-inner::-webkit-scrollbar { display: none; }

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-tab:hover { color: var(--primary); }
.nav-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ==================== 卡片 ==================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--primary-mid);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 20px; }

/* ==================== 帖子卡片 ==================== */
.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: 20px;
  margin-bottom: 12px;
  transition: var(--transition);
  position: relative;
}
.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--primary-mid);
}
.post-card.pinned {
  border-left: 3px solid var(--accent);
  background: linear-gradient(to right, #fff8f5, white);
}

.post-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.post-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-title:hover { color: var(--primary); }

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==================== 标签 ==================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
}
.tag-primary { background: var(--primary-light); color: var(--primary-dark); }
.tag-accent { background: var(--accent-light); color: var(--accent); }
.tag-gray { background: var(--border); color: var(--text-secondary); }
.tag-pin { background: #fff3e0; color: #e67e22; }

/* ==================== 头像 ==================== */
.avatar {
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--primary);
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.85rem; }
.avatar-md { width: 40px; height: 40px; font-size: 1rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.3rem; }

/* ==================== 用户下拉菜单 ==================== */
.user-menu { position: relative; }

.user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  color: var(--text-primary);
}
.user-trigger:hover { border-color: var(--primary); background: var(--primary-light); }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 200;
}
.dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: var(--transition);
  cursor: pointer;
}
.dropdown-item:hover { background: var(--bg); color: var(--primary); }
.dropdown-item.danger { color: #e74c3c; }
.dropdown-item.danger:hover { background: #fff5f5; }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

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

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

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: white;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61, 189, 177, 0.15);
}
.form-control.error { border-color: #e74c3c; }

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

.char-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}
.char-count.warn { color: var(--accent); }
.char-count.over { color: #e74c3c; }

.form-error {
  font-size: 0.82rem;
  color: #e74c3c;
  margin-top: 4px;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96) translateY(8px);
  transition: var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 1.1rem;
}
.modal-close:hover { background: var(--border); color: var(--text-primary); }

/* ==================== 分页 ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 0;
}

.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  color: var(--text-secondary);
  font-size: 0.875rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== 侧边栏 ==================== */
.sidebar { display: flex; flex-direction: column; gap: 16px; }

.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.sidebar-header {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-body { padding: 12px; }

/* 热门帖子列表 */
.hot-item {
  display: flex;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.hot-item:hover { background: var(--bg); }

.hot-rank {
  width: 22px; height: 22px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  background: var(--bg);
}
.hot-item:nth-child(1) .hot-rank { background: linear-gradient(135deg, #FF6B6B, #ee5a24); color: white; }
.hot-item:nth-child(2) .hot-rank { background: linear-gradient(135deg, #FFA07A, #f39c12); color: white; }
.hot-item:nth-child(3) .hot-rank { background: linear-gradient(135deg, var(--primary), #45C9BF); color: white; }

.hot-title {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
}
.stat-item { text-align: center; padding: 12px 8px; }
.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); }

/* 广告位 */
.ad-card {
  border-radius: var(--radius);
  overflow: hidden;
}
.ad-image-link img {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  transition: var(--transition);
}
.ad-image-link:hover img { transform: scale(1.02); }
.ad-text-content {
  padding: 14px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #f0f9ff 100%);
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-mid);
}
.ad-text-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--primary-dark); }
.ad-text-desc { font-size: 0.82rem; color: var(--text-secondary); }

/* ==================== 帖子详情页 ==================== */
.post-detail-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.post-detail-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border-light);
}

.post-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.post-detail-body { padding: 24px 28px; }

/* Markdown 内容样式 */
.md-content { line-height: 1.8; color: var(--text-primary); }
.md-content h1, .md-content h2, .md-content h3,
.md-content h4, .md-content h5, .md-content h6 {
  font-weight: 700; margin: 1.5em 0 0.5em; color: var(--text-primary);
}
.md-content h1 { font-size: 1.6rem; }
.md-content h2 { font-size: 1.3rem; }
.md-content h3 { font-size: 1.1rem; }
.md-content p { margin-bottom: 1em; }
.md-content ul, .md-content ol { margin: 1em 0 1em 1.5em; }
.md-content li { margin-bottom: 0.3em; }
.md-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 10px 16px;
  margin: 1em 0;
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}
.md-content code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent);
  font-family: 'Consolas', 'Monaco', monospace;
}
.md-content pre {
  background: #1a2332;
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  margin: 1em 0;
}
.md-content pre code {
  background: none;
  color: #e8f0fe;
  padding: 0;
}
.md-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 0.5em 0;
}
.md-content a { color: var(--primary); }
.md-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5em 0;
}
.md-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}
.md-content th, .md-content td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}
.md-content th { background: var(--bg); font-weight: 600; }
.md-content tr:nth-child(even) td { background: var(--border-light); }

/* 点赞区域 */
.post-actions {
  padding: 16px 28px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.like-btn:hover, .like-btn.liked {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.like-btn.liked .like-icon { transform: scale(1.2); }
.like-icon { font-size: 1.1rem; transition: var(--transition); }

/* ==================== 评论区 ==================== */
.comments-section {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
}

.comments-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-editor {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.comment-item:last-child { border-bottom: none; }

.comment-body { flex: 1; min-width: 0; }
.comment-author { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.comment-time { font-size: 0.78rem; color: var(--text-muted); margin-left: 8px; font-weight: 400; }
.comment-text { font-size: 0.9rem; color: var(--text-primary); line-height: 1.6; margin-bottom: 8px; }

.comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.comment-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 0;
  transition: var(--transition);
}
.comment-action-btn:hover { color: var(--primary); }

/* 回复列表 */
.replies { margin-top: 12px; margin-left: 44px; }
.reply-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.reply-editor {
  margin-top: 10px;
  margin-left: 44px;
  padding: 12px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  display: none;
}
.reply-editor.open { display: block; }

/* ==================== 登录/注册页 ==================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f8f7 0%, #f0f9ff 50%, #f4f7f9 100%);
  padding: 24px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .logo-icon {
  width: 52px; height: 52px;
  font-size: 1.5rem;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), #45C9BF);
  border-radius: var(--radius);
  color: white;
}
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { color: var(--text-secondary); font-size: 0.9rem; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ==================== Toast 通知 ==================== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
  max-width: 360px;
  animation: slideIn 0.3s ease;
  background: white;
  border: 1px solid var(--border);
}
.toast.success { border-left: 3px solid var(--primary); }
.toast.error { border-left: 3px solid #e74c3c; }
.toast.info { border-left: 3px solid #3498db; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ==================== 空状态 ==================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.empty-desc { font-size: 0.875rem; }

/* ==================== 加载状态 ==================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== 个人中心页 ==================== */
.profile-page { padding: 32px 0; }
.profile-header-card {
  background: linear-gradient(135deg, var(--primary) 0%, #45C9BF 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: white;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.profile-avatar {
  width: 72px; height: 72px;
  background: rgba(255,255,255,0.3);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-name { font-size: 1.5rem; font-weight: 700; }
.profile-username { opacity: 0.85; font-size: 0.9rem; margin-top: 2px; }

.profile-tabs {
  display: flex;
  gap: 4px;
  background: white;
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.profile-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}
.profile-tab.active { background: var(--primary); color: white; }

/* ==================== 排序控制 ==================== */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sort-label { font-size: 0.85rem; color: var(--text-muted); }
.sort-btn {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: white;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.sort-btn.active, .sort-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* 发帖按钮浮动 */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #45C9BF);
  color: white;
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(61,189,177,0.45);
  cursor: pointer;
  transition: var(--transition);
  z-index: 50;
  border: none;
}
.fab:hover { transform: scale(1.08) rotate(45deg); box-shadow: 0 6px 28px rgba(61,189,177,0.6); }

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .container { padding: 0 12px; }
  .post-card { padding: 14px; }
  .post-detail-header, .post-detail-body { padding: 16px; }
  .auth-card { padding: 28px 20px; }
  .profile-header-card { flex-direction: column; text-align: center; }
  .comments-section { padding: 16px; }
  .modal { padding: 20px; }
  .page-layout { padding: 16px 0 32px; }
}

@media (max-width: 480px) {
  .post-meta { gap: 10px; }
  .nav-actions { gap: 6px; }
  .btn { padding: 7px 14px; }
}
