/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #0f0a1e;
  --bg-secondary: #1a1230;
  --bg-card: rgba(30, 22, 56, 0.85);
  --bg-card-hover: rgba(40, 28, 72, 0.9);
  --border: rgba(138, 99, 255, 0.15);
  --border-hover: rgba(138, 99, 255, 0.35);
  --text-primary: #f0ecff;
  --text-secondary: #a89dd4;
  --text-muted: #6b5f99;
  --accent: #8a63ff;
  --accent-light: #b491ff;
  --accent-glow: rgba(138, 99, 255, 0.3);
  --pink: #ff6b9d;
  --pink-glow: rgba(255, 107, 157, 0.3);
  --teal: #2dd4bf;
  --orange: #fb923c;
  --red: #f87171;
  --green: #34d399;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========== 导航栏 ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 10, 30, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.nav-logo-img {
  height: 36px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
}
.nav-title {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-light), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-actions { display: flex; gap: 12px; }
.btn-ghost {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-ghost:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn-admin {
  padding: 8px 20px;
  background: rgba(138, 99, 255, 0.15);
  border: 1px solid var(--border);
  color: var(--accent-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-admin:hover {
  background: var(--accent);
  color: #fff;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  padding: 80px 24px 60px;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 30% 20%, var(--accent-glow), transparent),
    radial-gradient(ellipse 500px 300px at 70% 60%, var(--pink-glow), transparent);
  opacity: 0.6;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-logo {
  width: 160px;
  height: auto;
  margin: 0 auto 24px;
  display: block;
  filter: drop-shadow(0 0 30px var(--accent-glow)) drop-shadow(0 0 60px var(--pink-glow));
}
.hero-title {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 30%, var(--accent-light) 70%, var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.8;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1;
}
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 6px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ========== 发帖区域 ========== */
.post-section { max-width: 720px; margin: 0 auto 32px; padding: 0 24px; }

/* 社区公约横幅 */
.notice-banner {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 0 24px;
}
.notice-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 10px;
  font-size: 13px;
  color: #f5d47a;
  line-height: 1.7;
}
.notice-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
/* 趣味公告横幅 */
.funny-banner {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 0 24px;
}
.funny-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.1), rgba(255, 107, 157, 0.06));
  border: 1px solid rgba(255, 71, 87, 0.3);
  border-left: 3px solid #ff4757;
  border-radius: 10px;
  font-size: 13px;
  color: #ffa8b0;
  line-height: 1.7;
  animation: funnyPulse 2s ease-in-out infinite;
}
@keyframes funnyPulse {
  0%, 100% { border-left-color: #ff4757; }
  50% { border-left-color: #ff6b81; }
}
.funny-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  animation: funnyZap 1.5s ease-in-out infinite;
}
@keyframes funnyZap {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}
.funny-text strong {
  color: #ff6b81;
  font-size: 14px;
}

.notice-text strong {
  color: #ffcc02;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.post-header { margin-bottom: 20px; }
.post-header h2 { font-size: 20px; margin-bottom: 4px; }
.post-hint { font-size: 13px; color: var(--text-muted); }
.form-row { margin-bottom: 16px; }
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 10, 30, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }

.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(15, 10, 30, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s;
}
.form-textarea:focus { outline: none; border-color: var(--accent); }
.form-textarea::placeholder { color: var(--text-muted); }
.char-count { text-align: right; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* 分类选择 */
.category-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-btn {
  padding: 8px 18px;
  background: rgba(15, 10, 30, 0.6);
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.cat-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.cat-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

/* 标签选择 */
.tag-label { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.tag-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.tag-btn:hover { border-color: var(--accent); }
.tag-btn.active {
  background: rgba(138, 99, 255, 0.2);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ========== 上传区域 ========== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(15, 10, 30, 0.4);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(138, 99, 255, 0.08);
}
.upload-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  pointer-events: none;
}
.upload-icon { font-size: 36px; margin-bottom: 4px; }
.upload-limit { font-size: 12px; color: var(--text-muted); }

.upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-item .preview-video-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  font-size: 32px;
  pointer-events: none;
}
.preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s;
}
.preview-remove:hover { background: var(--red); }
.preview-uploading {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-uploading .mini-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ========== 帖子中的媒体 ========== */
.post-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.post-media-image {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  aspect-ratio: 1;
}
.post-media-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.post-media-image:hover img { transform: scale(1.05); }
.post-media-video {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.post-media-video video {
  width: 100%;
  display: block;
  max-height: 360px;
}
.post-media-video .video-label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.7);
  border-radius: 4px;
  font-size: 11px;
  color: #fff;
}
.post-media-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ========== 图片灯箱 ========== */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-overlay.show { display: flex; }
.lightbox-overlay img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* 提交按钮 */
.form-actions { display: flex; justify-content: flex-end; }
.btn-submit {
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--accent-glow); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 20px; font-size: 14px; }

/* ========== 筛选区 ========== */
.filter-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 20px;
  position: sticky;
  top: 59px;
  z-index: 50;
  background: var(--bg-primary);
  padding-top: 20px;
  padding-bottom: 16px;
}
.filter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tab {
  padding: 7px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.filter-tab:hover { color: var(--text-primary); border-color: var(--border-hover); }
.filter-tab.active {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent-light);
}
.sort-toggle { display: flex; gap: 4px; background: var(--bg-card); border-radius: 30px; padding: 3px; }
.sort-btn {
  padding: 6px 16px;
  background: transparent;
  border: none;
  border-radius: 30px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.sort-btn.active { background: var(--accent); color: #fff; }

/* ========== 帖子列表 ========== */
.posts-container { max-width: 960px; margin: 0 auto; padding: 0 24px 60px; }
.posts-list { display: flex; flex-direction: column; gap: 16px; }

.post-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
  animation: fadeInUp 0.4s ease;
}
.post-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }

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

.post-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.post-info { flex: 1; }
.post-nickname { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.post-time { font-size: 12px; color: var(--text-muted); }

.post-category {
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.cat-complaint { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.cat-suggestion { background: rgba(251, 146, 60, 0.15); color: var(--orange); }
.cat-praise { background: rgba(52, 211, 153, 0.15); color: var(--green); }
.cat-question { background: rgba(45, 212, 191, 0.15); color: var(--teal); }

.post-content {
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 14px;
  word-break: break-word;
  white-space: pre-wrap;
}

.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.post-tag {
  padding: 3px 10px;
  background: rgba(138, 99, 255, 0.1);
  border-radius: 6px;
  font-size: 12px;
  color: var(--accent-light);
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* 帖子卡片上的最新回复 */
.last-reply {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}
.last-reply-normal {
  background: rgba(15, 10, 30, 0.5);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
}
.last-reply-admin {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(217, 119, 6, 0.04));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 3px solid #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.06);
}
.last-reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.admin-reply-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}
.last-reply-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.last-reply-time {
  font-size: 11px;
  color: var(--text-muted);
}
.last-reply-content {
  color: var(--text-secondary);
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
}
.last-reply-admin .last-reply-content {
  color: var(--text-primary);
  font-weight: 500;
}
.post-action {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
  user-select: none;
}
.post-action:hover { color: var(--accent-light); }
.post-action.liked { color: var(--pink); }
.post-action .action-icon { font-size: 18px; }

/* ========== 分页 ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0 16px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-btn:hover:not(:disabled):not(.active) {
  border-color: var(--accent);
  color: var(--text-primary);
}
.page-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--pink));
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.page-ellipsis {
  color: var(--text-muted);
  font-size: 14px;
  padding: 0 4px;
}
.page-info {
  margin-left: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* 状态标签（管理员视角） */
.post-status {
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.status-new { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.status-reading { background: rgba(251, 146, 60, 0.15); color: var(--orange); }
.status-processing { background: rgba(138, 99, 255, 0.15); color: var(--accent-light); }
.status-resolved { background: rgba(52, 211, 153, 0.15); color: var(--green); }

/* ========== 加载/空状态 ========== */
.loading-msg, .empty-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-msg p { margin-bottom: 20px; }

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

/* ========== 弹窗 ========== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-admin { max-width: 720px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 1;
}
.modal-header h3 { font-size: 18px; }
.modal-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--bg-card); color: var(--text-primary); }

/* 回复弹窗 */
.modal-original {
  padding: 16px 24px;
  background: rgba(15, 10, 30, 0.5);
  border-bottom: 1px solid var(--border);
}
.modal-original .post-content { font-size: 14px; margin-bottom: 0; }
.modal-original .post-meta { margin-bottom: 8px; }
.modal-replies { padding: 16px 24px; }
.reply-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.reply-item:last-child { border-bottom: none; }
.reply-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: var(--bg-card);
}
.reply-body { flex: 1; }
.reply-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.reply-name { font-size: 13px; font-weight: 600; }
.reply-time { font-size: 11px; color: var(--text-muted); }
.reply-text { font-size: 14px; color: var(--text-primary); line-height: 1.6; word-break: break-word; white-space: pre-wrap; }

.modal-reply-form {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-reply-form .form-input { font-size: 14px; }
.modal-reply-form .form-textarea { min-height: 70px; font-size: 14px; }
.reply-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-reply-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  transition: all 0.2s;
}
.admin-reply-toggle:hover {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}
.admin-reply-toggle input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}
.modal-reply-form .btn-submit { align-self: flex-end; }
.modal-reply-form .btn-submit.btn-sm { align-self: flex-end; }

/* ========== 管理员面板 ========== */
.admin-login {
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 360px;
  margin: 0 auto;
}
.admin-hint { color: var(--text-secondary); font-size: 14px; }
.admin-login .form-input { text-align: center; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  padding: 20px 24px;
}
.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.admin-stat-card .num { font-size: 28px; font-weight: 800; color: var(--accent-light); }
.admin-stat-card .label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.admin-tags { padding: 0 24px 16px; }
.admin-tags-title { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.admin-tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tag {
  padding: 4px 12px;
  background: rgba(138, 99, 255, 0.1);
  border-radius: 8px;
  font-size: 13px;
  color: var(--accent-light);
}

.admin-actions {
  padding: 0 24px 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-admin-action {
  padding: 10px 20px;
  background: rgba(138, 99, 255, 0.15);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-admin-action:hover { background: var(--accent); color: #fff; }

.admin-post-list { padding: 0 24px 24px; }
.admin-post-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.admin-post-text { flex: 1; }
.admin-post-text .summary { font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.admin-post-text .sub { font-size: 12px; color: var(--text-muted); }
.admin-post-list-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.btn-delete-post {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-delete-post:hover {
  background: rgba(255, 71, 87, 0.15);
  border-color: var(--red);
  transform: scale(1.1);
}

/* 封禁/解封按钮 */
.admin-post-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.btn-ban-ip {
  padding: 4px 10px;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  border-radius: 6px;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-ban-ip:hover {
  background: rgba(255, 71, 87, 0.25);
  border-color: var(--red);
}

/* 已封禁IP列表 */
.admin-banned-section {
  margin-top: 20px;
}
.admin-banned-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 10px;
}
.admin-banned-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-banned-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 71, 87, 0.06);
  border: 1px solid rgba(255, 71, 87, 0.15);
  border-radius: 8px;
}
.admin-banned-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.admin-banned-text code {
  font-size: 13px;
  color: var(--red);
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: rgba(255, 71, 87, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}
.admin-banned-meta {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-banned-time {
  font-size: 11px;
  color: var(--text-muted);
}
.btn-unban-ip {
  padding: 4px 10px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 6px;
  color: #4ade80;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}
.btn-unban-ip:hover {
  background: rgba(74, 222, 128, 0.25);
  border-color: #4ade80;
}
.btn-unban-ip:disabled,
.btn-ban-ip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-status-select {
  padding: 4px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }

/* ========== 响应式 ========== */
@media (max-width: 640px) {
  .hero-logo { width: 120px; margin-bottom: 16px; }
  .nav-logo-img { height: 28px; }
  .nav-title { font-size: 16px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 15px; }
  .hero-stats { gap: 20px; }
  .stat-num { font-size: 28px; }
  .post-card { padding: 20px; }
  .nav-inner { padding: 12px 16px; }
  .nav-title { font-size: 17px; }
  .filter-section { top: 55px; padding-left: 16px; padding-right: 16px; }
  .posts-container { padding: 0 16px 40px; }
  .post-section { padding: 0 16px; }
  .modal-content { max-height: 90vh; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
