/* ========================================
   精灵社区 - 完整样式表
   ======================================== */

/* === 默认主题（深色） === */
:root {
  --primary: #6c5ce7;
  --primary-dark: #5a4bd1;
  --primary-light: #a29bfe;
  --secondary: #00cec9;
  --accent: #fd79a8;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e17055;
  --info: #74b9ff;

  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-card-hover: #1c2a4a;
  --bg-nav: rgba(15, 15, 26, 0.95);
  --bg-input: #1a1a2e;
  --bg-overlay: rgba(0,0,0,0.6);

  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6c6c8a;
  --text-link: #a29bfe;

  --border-color: #2a2a4a;
  --border-light: #1e1e3a;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.3);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;

  --transition: all 0.3s ease;
}

/* === 多主题系统 === */
[data-theme="light"] {
  --primary: #6c5ce7;
  --primary-dark: #5a4bd1;
  --primary-light: #8b7cf7;
  --secondary: #00b894;
  --accent: #e84393;
  --success: #00b894;
  --warning: #f39c12;
  --danger: #e17055;
  --info: #0984e3;

  --bg-primary: #f5f6fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9ff;
  --bg-nav: rgba(255, 255, 255, 0.95);
  --bg-input: #f5f6fa;
  --bg-overlay: rgba(0,0,0,0.4);

  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-muted: #b2bec3;
  --text-link: #6c5ce7;

  --border-color: #dfe6e9;
  --border-light: #f0f0f0;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.2);
}

[data-theme="ocean"] {
  --primary: #0984e3;
  --primary-dark: #0768b5;
  --primary-light: #74b9ff;
  --secondary: #00cec9;
  --accent: #fd79a8;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e17055;
  --info: #74b9ff;

  --bg-primary: #0c1a2e;
  --bg-secondary: #0f2240;
  --bg-card: #132a4a;
  --bg-card-hover: #1a3560;
  --bg-nav: rgba(12, 26, 46, 0.95);
  --bg-input: #0f2240;
  --bg-overlay: rgba(0,0,0,0.6);

  --text-primary: #e0f0ff;
  --text-secondary: #8ab4e8;
  --text-muted: #5a7fa0;
  --text-link: #74b9ff;

  --border-color: #1a3a5a;
  --border-light: #152a45;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(9, 132, 227, 0.3);
}

[data-theme="midnight"] {
  --primary: #e17055;
  --primary-dark: #c0392b;
  --primary-light: #fab1a0;
  --secondary: #00cec9;
  --accent: #fd79a8;
  --success: #55efc4;
  --warning: #ffeaa7;
  --danger: #ff7675;
  --info: #74b9ff;

  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a25;
  --bg-card-hover: #222230;
  --bg-nav: rgba(10, 10, 15, 0.97);
  --bg-input: #12121a;
  --bg-overlay: rgba(0,0,0,0.7);

  --text-primary: #e0e0e8;
  --text-secondary: #9090a0;
  --text-muted: #505060;
  --text-link: #fab1a0;

  --border-color: #2a2a35;
  --border-light: #1a1a25;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(225, 112, 85, 0.3);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
}

/* === 滚动条 === */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* === 导航栏 === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

.navbar-brand:hover {
  color: var(--primary-light);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.navbar-menu li a {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-menu li a:hover,
.navbar-menu li a.active {
  color: var(--text-primary);
  background: rgba(108, 92, 231, 0.15);
}

.navbar-menu li a i {
  font-size: 1rem;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* === 用户头像 === */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.avatar-sm {
  width: 28px;
  height: 28px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  border-width: 3px;
}

.avatar-xl {
  width: 96px;
  height: 96px;
  border-width: 4px;
}

.avatar-default {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  border-radius: 50%;
}

/* === 身份铭牌 === */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.role-badge.super-admin {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #3d2b00;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
  animation: gold-shimmer 2s ease-in-out infinite;
}

.role-badge.admin {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.3);
}

.role-badge.vip {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  box-shadow: 0 0 8px rgba(243, 156, 18, 0.3);
}

.role-badge.user {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

@keyframes gold-shimmer {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.7); }
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: var(--font-sans);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--text-primary);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #00a381);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #d63031);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #f9ca24);
  color: #2d2d2d;
}

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

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

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
  transition: 0.5s;
}

.btn-glow:hover::after {
  left: 100%;
}

/* === 导航下拉菜单 === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 100;
  overflow: hidden;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a,
.dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: var(--transition);
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: rgba(108, 92, 231, 0.1);
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* === 卡片 === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.2);
}

/* === 帖子卡片 === */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.post-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.post-card-image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
}

.post-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.post-card-meta .author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
}

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

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

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

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

.form-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

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

/* === 布局 === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
  padding-bottom: 40px;
}

/* === 网格 === */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* === 侧边栏布局 === */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

/* === 主流板块 === */
.sidebar-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

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

.sidebar-section-body {
  padding: 14px 18px;
}

/* === 热门帖子 === */
.hot-post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.hot-post-item:last-child {
  border-bottom: none;
}

.hot-post-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hot-post-rank.top1 {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #3d2b00;
}

.hot-post-rank.top2 {
  background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
  color: #1a1a1a;
}

.hot-post-rank.top3 {
  background: linear-gradient(135deg, #cd7f32, #b8860b);
  color: white;
}

.hot-post-rank.other {
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.hot-post-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-post-title:hover {
  color: var(--primary-light);
}

/* === 统计信息 === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-item {
  text-align: center;
  padding: 8px;
}

.stat-number {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* === 新用户 === */
.new-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.new-user-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* === 页面标题 === */
.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* === 筛选栏 === */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
}

/* === 分页 === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.page-item {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.page-item:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

.page-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.page-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === 登录/注册页面 === */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
}

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

.auth-card h2 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.8rem;
}

.auth-card .auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.9rem;
}

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

/* === 帖子详情页 === */
.post-detail-header {
  margin-bottom: 24px;
}

.post-detail-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}

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

.post-detail-meta .author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-detail-software {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.software-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.software-screenshot {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  margin-bottom: 16px;
}

.software-desc {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.download-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.download-link .link-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.download-link .link-value {
  font-size: 0.9rem;
  color: var(--text-link);
  word-break: break-all;
}

.download-link.vip-link {
  border-color: #f39c12;
  background: rgba(243, 156, 18, 0.1);
}

/* === 评论区 === */
.comments-section {
  margin-top: 32px;
}

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

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

.comment-item:last-child {
  border-bottom: none;
}

.comment-content {
  flex: 1;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-author {
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.comment-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 20px;
}

/* === 个人主页 === */
.profile-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0.3;
}

.profile-avatar {
  position: relative;
  margin: 0 auto 16px;
  width: fit-content;
}

.profile-username {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.profile-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 16px;
}

.profile-stat-item {
  text-align: center;
}

.profile-stat-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-exp-bar {
  max-width: 400px;
  margin: 12px auto 0;
}

.exp-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.exp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.exp-bar-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === 签到页面 === */
.checkin-container {
  max-width: 600px;
  margin: 0 auto;
}

.checkin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
}

.checkin-streak {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--warning), #f9ca24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.checkin-streak-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.checkin-btn {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 4px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkin-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

.checkin-btn.checked {
  border-color: var(--success);
  background: rgba(0, 184, 148, 0.1);
  cursor: default;
}

.checkin-btn i {
  font-size: 2.5rem;
}

.checkin-calendar {
  margin-top: 24px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
}

.calendar-day.checked {
  background: rgba(0, 184, 148, 0.2);
  color: var(--success);
  border: 1px solid rgba(0, 184, 148, 0.3);
}

.calendar-day.today {
  border: 2px solid var(--primary);
  color: var(--primary-light);
  font-weight: 700;
}

/* === 充值页面 === */
.recharge-container {
  max-width: 500px;
  margin: 0 auto;
}

.recharge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
}

.recharge-coins-display {
  text-align: center;
  margin-bottom: 24px;
}

.recharge-coins-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--warning);
}

.recharge-coins-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* === 管理后台 - 全新现代设计 === */

/* 布局 */
.admin-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

/* 顶部栏 */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 64px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.admin-menu-btn:hover { color: var(--text-primary); background: rgba(108,92,231,0.1); }

.admin-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-topbar-icon { font-size: 1.3rem; }

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-topbar-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.admin-topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 主体布局 */
.admin-body {
  display: flex;
  flex: 1;
}

/* 侧边栏 */
.admin-sidebar-modern {
  width: 220px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: 16px 0;
  flex-shrink: 0;
  overflow-y: auto;
  height: calc(100vh - 120px);
  position: sticky;
  top: 120px;
}

.admin-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: all 0.2s ease;
  text-decoration: none;
}
.admin-nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}
.admin-nav-item:hover {
  background: rgba(108, 92, 231, 0.1);
  color: var(--text-primary);
}
.admin-nav-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}
.admin-nav-item.active:hover {
  background: var(--primary-dark);
  color: #fff;
}

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

.admin-nav-section-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 14px 4px;
  font-weight: 600;
}

/* 主内容区 */
.admin-content {
  flex: 1;
  padding: 24px;
  overflow-x: hidden;
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}
.admin-page-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 徽章 */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
.admin-badge-success {
  background: rgba(0, 184, 148, 0.15);
  color: var(--success);
  border: 1px solid rgba(0, 184, 148, 0.3);
}
.admin-badge-success::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

/* 按钮 */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: var(--font-sans);
}
.admin-btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.admin-btn-ghost {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.admin-btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}
.admin-btn-primary {
  background: var(--primary);
  color: #fff;
}
.admin-btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108,92,231,0.3);
}
.admin-btn-danger {
  background: rgba(225, 112, 85, 0.15);
  color: var(--danger);
  border: 1px solid rgba(225, 112, 85, 0.3);
}
.admin-btn-danger:hover {
  background: var(--danger);
  color: #fff;
}
.admin-btn-warning {
  background: rgba(253, 203, 110, 0.15);
  color: var(--warning);
  border: 1px solid rgba(253, 203, 110, 0.3);
}
.admin-btn-warning:hover {
  background: var(--warning);
  color: #2d2d2d;
}
.admin-btn-success {
  background: rgba(0, 184, 148, 0.15);
  color: var(--success);
  border: 1px solid rgba(0, 184, 148, 0.3);
}
.admin-btn-success:hover {
  background: var(--success);
  color: #fff;
}

/* 统计卡片网格 */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.admin-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.admin-stat-purple::before { background: var(--primary); }
.admin-stat-green::before { background: var(--success); }
.admin-stat-blue::before { background: var(--info); }
.admin-stat-orange::before { background: var(--accent); }
.admin-stat-pink::before { background: #fd79a8; }
.admin-stat-cyan::before { background: var(--secondary); }

.admin-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.admin-stat-purple .admin-stat-icon { background: rgba(108,92,231,0.15); color: var(--primary-light); }
.admin-stat-green .admin-stat-icon { background: rgba(0,184,148,0.15); color: var(--success); }
.admin-stat-blue .admin-stat-icon { background: rgba(116,185,255,0.15); color: var(--info); }
.admin-stat-orange .admin-stat-icon { background: rgba(253,121,168,0.15); color: var(--accent); }
.admin-stat-pink .admin-stat-icon { background: rgba(253,121,168,0.15); color: #fd79a8; }
.admin-stat-cyan .admin-stat-icon { background: rgba(0,206,201,0.15); color: var(--secondary); }

.admin-stat-info { flex: 1; }
.admin-stat-number { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); }
.admin-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.admin-stat-trend {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  background: var(--bg-secondary);
  color: var(--text-muted);
  white-space: nowrap;
}
.admin-stat-trend.up { color: var(--success); background: rgba(0,184,148,0.1); }
.admin-stat-trend.down { color: var(--danger); background: rgba(225,112,85,0.1); }

/* 卡片 */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-card-body {
  padding: 0;
  overflow-x: auto;
}

/* 表格网格 */
.admin-table-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 1200px) {
  .admin-table-grid { grid-template-columns: 1fr; }
}

/* 现代化表格 */
.admin-table-modern {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.admin-table-modern thead th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}
.admin-table-modern tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}
.admin-table-modern tbody tr:last-child td {
  border-bottom: none;
}
.admin-table-modern tbody tr:hover td {
  background: rgba(108, 92, 231, 0.04);
}
.admin-table-modern tbody tr {
  transition: background 0.2s ease;
}

.admin-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.admin-username {
  font-weight: 600;
  color: var(--text-primary);
}
.admin-link {
  color: var(--text-link);
  font-weight: 600;
  text-decoration: none;
}
.admin-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}
.admin-coins {
  color: var(--warning);
  font-weight: 600;
}
.admin-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* 标签 */
.admin-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}
.admin-tag-warning {
  background: rgba(253, 203, 110, 0.15);
  color: var(--warning);
  border-color: rgba(253, 203, 110, 0.3);
}
.admin-tag-success {
  background: rgba(0, 184, 148, 0.15);
  color: var(--success);
  border-color: rgba(0, 184, 148, 0.3);
}
.admin-tag-danger {
  background: rgba(225, 112, 85, 0.15);
  color: var(--danger);
  border-color: rgba(225, 112, 85, 0.3);
}

/* 分页（管理后台） */
.admin-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 20px;
}
.admin-page-item {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.admin-page-item:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}
.admin-page-item.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 响应式管理后台 */
@media (max-width: 768px) {
  .admin-topbar { padding: 0 12px; top: 56px; }
  .admin-menu-btn { display: block; }
  .admin-topbar-time { display: none; }
  .admin-sidebar-modern {
    position: fixed;
    top: 112px;
    left: -220px;
    width: 220px;
    height: calc(100vh - 112px);
    z-index: 99;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
  }
  .admin-sidebar-modern.show { left: 0; }
  .admin-content { padding: 16px; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .admin-stat-card { padding: 14px; flex-direction: column; gap: 10px; }
  .admin-stat-number { font-size: 1.3rem; }
  .admin-table-grid { grid-template-columns: 1fr; }
  .admin-page-header { flex-direction: column; align-items: flex-start; }
  .admin-table-modern { font-size: 0.75rem; }
  .admin-table-modern thead th,
  .admin-table-modern tbody td { padding: 8px 10px; }
}

@media (max-width: 480px) {
  .admin-stat-grid { grid-template-columns: 1fr; }
  .admin-topbar-user span { display: none; }
}

/* === 通知消息 === */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success {
  background: rgba(0, 184, 148, 0.15);
  border: 1px solid rgba(0, 184, 148, 0.3);
  color: var(--success);
}

.alert-danger {
  background: rgba(225, 112, 85, 0.15);
  border: 1px solid rgba(225, 112, 85, 0.3);
  color: var(--danger);
}

.alert-info {
  background: rgba(116, 185, 255, 0.15);
  border: 1px solid rgba(116, 185, 255, 0.3);
  color: var(--info);
}

.alert-warning {
  background: rgba(253, 203, 110, 0.15);
  border: 1px solid rgba(253, 203, 110, 0.3);
  color: var(--warning);
}

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

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  animation: slideInRight 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

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

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

.toast.info {
  border-left: 4px solid var(--info);
}

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

/* === 提示工具 === */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: var(--transition);
  pointer-events: none;
  z-index: 10;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

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

.empty-state i {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* === 加载动画 === */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* === 页脚 === */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: var(--primary-light);
}

/* === 响应式 === */
@media (max-width: 1024px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .post-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
    height: 56px;
  }
  .navbar-menu {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    z-index: 999;
    overflow-y: auto;
  }
  .navbar-menu.show {
    display: flex;
  }
  .navbar-menu li a {
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--radius-md);
    width: 100%;
  }
  .navbar-menu li {
    width: 100%;
  }
  .navbar-brand span {
    font-size: 1.1rem;
  }
  .mobile-menu-btn {
    display: block !important;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .post-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .post-card-image {
    height: 180px;
  }
  .profile-stats {
    gap: 16px;
  }
  .profile-header {
    padding: 24px 16px;
  }
  .profile-username {
    font-size: 1.4rem;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 998;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 16px 0;
    overflow-y: auto;
  }
  .admin-sidebar.show {
    display: block;
  }
  .admin-main {
    margin-left: 0;
    padding: 16px;
  }
  .admin-table {
    font-size: 0.75rem;
  }
  .admin-table th, .admin-table td {
    padding: 8px 6px;
  }
  .post-detail-title {
    font-size: 1.4rem;
  }
  .auth-card {
    padding: 24px 20px;
  }
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-card {
    padding: 14px;
  }
  .stat-card-number {
    font-size: 1.4rem;
  }
  .checkin-container {
    padding: 0 12px;
  }
  .checkin-btn {
    width: 150px;
    height: 150px;
    font-size: 1rem;
  }
  .checkin-btn i {
    font-size: 2rem;
  }
  .checkin-streak {
    font-size: 2.5rem;
  }
  .hero-section h1 {
    font-size: 1.8rem;
  }
  .hero-section p {
    font-size: 0.95rem;
  }
  .download-link {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .comment-item {
    flex-direction: column;
  }
  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .recharge-container {
    padding: 0 12px;
  }
  .recharge-card {
    padding: 20px;
  }
  .calendar-grid {
    gap: 4px;
  }
  .calendar-day {
    font-size: 0.7rem;
  }
  .sidebar-section {
    margin-bottom: 16px;
  }
  .toast {
    min-width: unset;
    max-width: calc(100vw - 40px);
    font-size: 0.85rem;
  }
  .page-title {
    font-size: 1.4rem;
  }
  .page-subtitle {
    font-size: 0.85rem;
  }
  .card-body {
    padding: 14px;
  }
  .card-header {
    padding: 12px 14px;
  }
  .post-card-body {
    padding: 12px;
  }
  .post-detail-software {
    padding: 16px;
  }
  .software-screenshot {
    max-height: 250px;
  }
  .comments-section {
    margin-top: 20px;
  }
  .comment-form {
    padding: 14px;
  }
  .gallery-item img {
    height: 120px !important;
  }
  #imageGrid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 8px !important;
  }
  .admin-sidebar-toggle {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0 0.75rem;
    height: 52px;
  }
  .navbar-menu {
    top: 52px;
  }
  .navbar-brand span {
    display: none;
  }
  .stat-cards {
    grid-template-columns: 1fr;
  }
  .post-card-image {
    height: 160px;
  }
  .post-grid {
    gap: 12px;
  }
  .checkin-btn {
    width: 130px;
    height: 130px;
  }
  .checkin-btn i {
    font-size: 1.6rem;
  }
  .btn {
    padding: 6px 14px;
    font-size: 0.85rem;
  }
  .btn-lg {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  .form-control {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  .auth-card {
    padding: 20px 16px;
  }
  .auth-card h2 {
    font-size: 1.4rem;
  }
  .avatar-xl {
    width: 72px;
    height: 72px;
  }
  .profile-stats {
    gap: 12px;
  }
  .profile-stat-number {
    font-size: 1.1rem;
  }
  .admin-table {
    font-size: 0.7rem;
  }
  .admin-table th, .admin-table td {
    padding: 6px 4px;
  }
  .admin-table td .btn-sm {
    padding: 2px 6px;
    font-size: 0.65rem;
  }
  #imageGrid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
  }
  .gallery-item img {
    height: 90px !important;
  }
}

/* === 主题切换按钮 === */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1rem;
}
.theme-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  box-shadow: var(--shadow-glow);
  transform: rotate(30deg);
}

/* === 移动端管理侧边栏切换按钮 === */
.admin-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 997;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}
.admin-sidebar-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

/* === 页面过渡动画 === */
.page-transition {
  animation: pageIn 0.4s ease;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === 卡片悬停增强 === */
.card, .post-card, .sidebar-section, .checkin-card, .recharge-card, .auth-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover, .post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

/* === 玻璃态效果 === */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* === 渐变文字 === */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === 加载骨架屏 === */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === 徽章脉冲动画 === */
.badge-pulse {
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* === 工具类 === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-1 { gap: 8px; }
.flex-gap-2 { gap: 16px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

.w-full { width: 100%; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === 动画 === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease;
}

/* === 徽章动画 === */
.badge-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* === 代码块 === */
code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* === 内容样式 === */
.post-content {
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-content p {
  margin-bottom: 12px;
}

.post-content img {
  border-radius: var(--radius-md);
  max-width: 100%;
}

/* === 回复框 === */
.reply-box {
  display: none;
  margin-top: 12px;
}

.reply-box.show {
  display: block;
}

/* === 首页英雄区 === */
.hero-section {
  padding: 40px 0;
  text-align: center;
  position: relative;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 24px;
}

/* === 帖子卡片网格 === */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* === 模态框 === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-close {
  float: right;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

/* === VIP标签 === */
.vip-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  margin-left: 4px;
}

/* === 复制按钮 === */
.copy-btn {
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: var(--transition);
}

.copy-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

/* === 移动端菜单按钮 === */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .navbar-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    display: none;
  }

  .navbar-menu.show {
    display: flex;
  }

  .navbar-menu li {
    width: 100%;
  }

  .navbar-menu li a {
    width: 100%;
    padding: 12px 16px;
  }
}