/**
 * 红花会论坛 - 全新响应式样式
 * 红色黑客科技风 | 手机+电脑完美适配
 */

/* ========== 设计令牌 ========== */
:root {
  /* 主色调 */
  --red-900: #1a0000;
  --red-800: #330000;
  --red-700: #4d0000;
  --red-600: #660000;
  --red-500: #8b0000;
  --red-400: #b30000;
  --red-300: #cc0000;
  --red-200: #ff1a1a;
  --red-100: #ff4d4d;
  
  /* 背景 */
  --bg-primary: #0a0a12;
  --bg-secondary: #12121f;
  --bg-tertiary: #1a1a2e;
  --bg-card: rgba(26, 26, 46, 0.85);
  --bg-card-hover: rgba(40, 40, 70, 0.95);
  
  /* 文字 */
  --text-primary: #ffffff;
  --text-secondary: #b0b0c0;
  --text-muted: #6a6a80;
  
  /* 边框与效果 */
  --border-color: rgba(255, 0, 0, 0.12);
  --border-glow: rgba(255, 0, 0, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(255, 0, 0, 0.15);
  
  /* 尺寸 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  
  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ========== 全局重置 ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

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

/* 自定义滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--red-500); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-400); }

/* ========== 背景效果 ========== */
.matrix-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.08;
  pointer-events: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(ellipse at 15% 15%, rgba(139, 0, 0, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 85%, rgba(139, 0, 0, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.02) 2px,
    rgba(0, 0, 0, 0.02) 4px
  );
}

/* ========== 链接 ========== */
a {
  color: var(--red-200);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--red-100); }

/* ========== 导航栏 ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--red-700) 0%, var(--red-800) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glow);
  box-shadow: 0 2px 20px rgba(255, 0, 0, 0.25);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Orbitron', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 15px var(--red-400);
  letter-spacing: 0.5px;
}

.nav-logo i {
  font-size: 1.4rem;
  color: var(--red-200);
  animation: flicker 3s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
  52% { opacity: 1; }
  54% { opacity: 0.9; }
}

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

.nav-menu > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-menu > li > a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-menu > li > a i { font-size: 0.85rem; opacity: 0.85; }

/* 搜索框 */
.nav-search .search-form {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 5px 12px;
  transition: all var(--transition-fast);
}

.nav-search .search-form:focus-within {
  border-color: var(--red-400);
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.2);
}

.nav-search .search-input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 100px;
  outline: none;
}

.nav-search .search-input::placeholder { color: var(--text-muted); }
.nav-search .search-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px;
}

/* 用户菜单 */
.nav-user { position: relative; }

.user-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.user-toggle:hover { background: rgba(255, 255, 255, 0.1); }

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--red-400);
  object-fit: cover;
}

.user-name {
  font-weight: 500;
  font-size: 0.9rem;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-width: 180px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-lg);
}

.nav-user:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.user-dropdown li a:hover { background: var(--bg-card-hover); }
.user-dropdown li a i { width: 18px; color: var(--red-300); }

/* 登录按钮 */
.nav-auth { display: flex; gap: 6px; }

/* 移动端菜单 */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 6px;
}

/* ========== 主内容 ========== */
.main-content {
  min-height: calc(100vh - 58px);
  padding: 20px 12px;
}

.container { max-width: 1400px; margin: 0 auto; }

/* ========== 欢迎横幅 ========== */
.welcome-banner {
  background: linear-gradient(135deg, var(--red-700) 0%, var(--red-500) 50%, var(--red-400) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.welcome-content { position: relative; z-index: 1; }

.welcome-content h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.welcome-content h1 i { margin-right: 8px; }
.welcome-content p { opacity: 0.9; font-size: 1rem; }

/* ========== 内容网格 ========== */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 18px;
}

/* ========== 面板卡片 ========== */
.sections-panel,
.threads-panel,
.sidebar-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
}

.sections-panel:hover,
.threads-panel:hover,
.sidebar-panel:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.panel-header {
  background: linear-gradient(90deg, var(--red-700), var(--red-600));
  padding: 12px 16px;
}

.panel-header h2,
.panel-header h3 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-header h2 i,
.panel-header h3 i { color: var(--red-200); }

/* ========== 板块列表 ========== */
.sections-list { padding: 8px; }

.section-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  margin-bottom: 4px;
}

.section-card:hover {
  background: var(--bg-card-hover);
  transform: translateX(3px);
}

.section-card:last-child { margin-bottom: 0; }

.section-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-icon i { font-size: 1.1rem; color: var(--text-primary); }

.section-info h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 3px; }
.section-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.section-stats { font-size: 0.75rem; color: var(--text-muted); }
.section-stats i { margin-right: 3px; color: var(--red-400); }

/* ========== 帖子列表 ========== */
.threads-list { padding: 8px; }

.thread-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  margin-bottom: 4px;
}

.thread-item:hover {
  background: var(--bg-card-hover);
  border-left-color: var(--red-400);
}

.thread-item:last-child { margin-bottom: 0; }

.thread-avatar { flex-shrink: 0; }
.thread-avatar img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--red-500);
  object-fit: cover;
}

.thread-content { flex: 1; min-width: 0; }

.thread-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.thread-author { font-weight: 600; font-size: 0.85rem; }
.thread-section a {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
}

.thread-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 5px;
  line-height: 1.35;
}

.thread-title a { color: var(--text-primary); }
.thread-title a:hover { color: var(--red-200); }

.thread-meta {
  display: flex;
  gap: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.thread-meta span { display: flex; align-items: center; gap: 4px; }

/* ========== 侧边栏 ========== */
.sidebar-panel { margin-bottom: 16px; }
.sidebar-panel:last-child { margin-bottom: 0; }

.hot-threads { padding: 8px; }

.hot-thread-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.hot-thread-item:hover { background: var(--bg-card-hover); }

.hot-rank {
  width: 22px;
  height: 22px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hot-rank.top {
  background: linear-gradient(135deg, var(--red-500), var(--red-400));
  color: var(--text-primary);
}

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

/* 快捷操作 */
.quick-actions {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(255, 0, 0, 0.35);
  color: var(--text-primary);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--red-600), var(--red-400));
  color: var(--text-primary);
  box-shadow: 0 3px 12px rgba(255, 0, 0, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 20px rgba(255, 0, 0, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--red-400);
  color: var(--red-200);
}

.btn-outline:hover {
  background: rgba(255, 0, 0, 0.1);
  color: var(--text-primary);
}

.btn-block { width: 100%; }

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

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--red-400);
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.15);
}

.form-input::placeholder { color: var(--text-muted); }
.required { color: var(--red-400); }

/* ========== 认证页面 ========== */
.auth-page {
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

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

.auth-header {
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  padding: 24px 20px;
  text-align: center;
}

.auth-header h1 {
  font-family: 'Orbitron', monospace;
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.auth-header h1 i { margin-right: 8px; }
.auth-header p { opacity: 0.9; font-size: 0.95rem; }

.auth-form { padding: 24px 20px; }
.auth-footer {
  padding: 16px 20px 24px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}
.auth-footer p { margin-bottom: 8px; }
.auth-footer p:last-child { margin-bottom: 0; }

.form-actions { margin-top: 20px; }

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

.alert-error {
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid var(--red-500);
  color: var(--red-200);
}

.alert-success {
  background: rgba(0, 230, 80, 0.1);
  border: 1px solid rgba(0, 230, 80, 0.3);
  color: #00e650;
}

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

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

/* ========== Footer ========== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 36px 12px 24px;
  margin-top: 32px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.footer-section h4 {
  font-family: 'Orbitron', monospace;
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--red-300);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 8px; }
.footer-section ul li a { color: var(--text-secondary); font-size: 0.85rem; }
.footer-section ul li a:hover { color: var(--red-200); }
.footer-section p { color: var(--text-secondary); font-size: 0.85rem; }

.footer-bottom {
  max-width: 1400px;
  margin: 24px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ========== 回到顶部 ========== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--red-600), var(--red-400));
  border: none;
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all var(--transition-normal);
  box-shadow: 0 4px 18px rgba(255, 0, 0, 0.35);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 25px rgba(255, 0, 0, 0.5);
}

/* ========== 广告 ========== */
.ad-banner-top {
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ad-banner-top img,
.ad-sidebar-link img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

/* ========== 动画 ========== */
.fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

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

.fade-in-up:nth-child(1) { animation-delay: 0s; }
.fade-in-up:nth-child(2) { animation-delay: 0.08s; }
.fade-in-up:nth-child(3) { animation-delay: 0.16s; }

/* ========== 联系我们弹窗 ========== */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 20px;
}

.contact-modal.active {
  opacity: 1;
  visibility: visible;
}

.contact-modal-content {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 0, 0, 0.15);
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-normal);
}

.contact-modal.active .contact-modal-content {
  transform: scale(1) translateY(0);
}

.contact-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  line-height: 1;
}

.contact-modal-close:hover { color: var(--red-200); }

.contact-modal-content h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  margin-bottom: 6px;
  color: var(--red-200);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.contact-modal-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.contact-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  color: var(--text-primary) !important;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  box-shadow: 0 3px 12px rgba(255, 0, 0, 0.2);
}

.contact-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 0, 0, 0.4);
  color: var(--text-primary) !important;
}

.contact-option i {
  font-size: 1.3rem;
}

/* 联系弹窗 - 手机适配 */
@media (max-width: 479px) {
  .contact-modal-content {
    padding: 24px 18px;
    max-width: 100%;
  }
  
  .contact-modal-content h2 { font-size: 1.2rem; }
  
  .contact-option {
    padding: 16px;
    font-size: 0.95rem;
  }
}

/* ========== 验证码样式 ========== */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.captcha-question {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  color: var(--text-primary);
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: 2px;
  min-width: 120px;
  text-align: center;
  user-select: none;
  border: 1px solid var(--red-400);
}

.captcha-row .form-input {
  flex: 1;
}

@media (max-width: 479px) {
  .captcha-row { flex-direction: column; gap: 8px; }
  .captcha-question { min-width: unset; width: 100%; }
}

/* ========== 管理后台样式 ========== */
.admin-page { padding: 10px 0; }
.admin-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-glow);
}
.admin-header h1 {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-header h1 i { color: var(--red-200); }
.admin-header p { color: var(--text-muted); }

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition-fast);
}
.stat-card:hover { border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.stat-card .stat-value {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--red-200);
}
.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}
.stat-card .stat-icon {
  float: right;
  font-size: 1.8rem;
  opacity: 0.3;
  color: var(--red-400);
}

/* 管理后台表格 */
.admin-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-table th {
  background: linear-gradient(90deg, var(--red-700), var(--red-600));
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.admin-table tbody tr:hover {
  background: var(--bg-card-hover);
}
.admin-table .user-link {
  font-weight: 600;
  color: var(--text-primary);
}
.admin-table .user-link:hover { color: var(--red-200); }
.admin-table .phone-display {
  color: var(--red-200);
  font-family: monospace;
  font-size: 0.9rem;
}

/* 角色选择器 */
.role-select {
  padding: 4px 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
}
.role-select.admin { color: var(--red-200); font-weight: 600; }
.role-select.mod { color: #f0c040; }

/* 状态标签 */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-badge.active {
  background: rgba(0, 200, 80, 0.15);
  color: #00e650;
}
.status-badge.banned {
  background: rgba(255, 0, 0, 0.15);
  color: var(--red-200);
}

/* 操作按钮 */
.action-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-sm {
  padding: 6px 12px !important;
  font-size: 0.8rem !important;
  border-radius: 4px !important;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.btn-danger { background: var(--red-500); color: #fff; }
.btn-danger:hover { background: var(--red-400); }
.btn-success { background: #2d7a3a; color: #fff; }
.btn-success:hover { background: #359244; }
.btn-warning { background: #8b6d00; color: #fff; }
.btn-warning:hover { background: #b8910a; }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.page-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}
.page-link:hover { border-color: var(--red-400); color: var(--red-200); }
.page-link.active {
  background: var(--red-600);
  border-color: var(--red-400);
  color: #fff;
}

/* Toast 通知 */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 500;
  z-index: 3000;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-md);
}
.toast.show { transform: translateX(0); }
.toast-success { background: linear-gradient(135deg, #1a5c2a, #2d8a3e); }
.toast-error { background: linear-gradient(135deg, var(--red-700), var(--red-500)); }

/* ========== 验证码样式 ========== */
.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-question {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 46px;
  padding: 0 18px;
  background: linear-gradient(135deg, #1a0505, #2d0a0a);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  font-family: 'Orbitron', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--red-200);
  letter-spacing: 4px;
  text-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
  user-select: none;
  animation: captchaPulse 3s ease-in-out infinite;
}
@keyframes captchaPulse {
  0%, 100% { border-color: rgba(255, 0, 0, 0.3); }
  50% { border-color: rgba(255, 0, 0, 0.7); box-shadow: 0 0 12px rgba(255, 0, 0, 0.2); }
}
.captcha-row .form-input { flex: 1; }

/* ========== 安全问题样式 ========== */
.form-divider, .auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.form-divider::before, .form-divider::after,
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}
.form-divider span, .auth-divider span {
  padding: 0 12px;
}

.form-info {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.form-info i { margin-right: 8px; color: var(--red-200); }

/* ========== 登录链接 ========== */
.login-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.link-btn {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}
.link-btn:hover { color: var(--red-200); }
.link-btn i { margin-right: 4px; }

/* ========== 找回密码 - 用户ID查询 ========== */
.lookup-row { display: flex; gap: 8px; }
.lookup-row .form-input { flex: 1; }
.lookup-result { margin-top: 10px; font-size: 0.9rem; }
.text-success { color: #00e650; }
.text-error { color: var(--red-200); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ========== 找回密码 - 找到的用户卡片 ========== */
.found-user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.found-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--red-400);
}
.found-info h3 { margin: 0; font-size: 1.1rem; color: var(--text-primary); }

/* ========== 个人主页样式 ========== */
.profile-header {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.profile-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--red-400);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}
.avatar-edit-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 32px;
  height: 32px;
  background: var(--red-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid var(--bg-card);
}
.avatar-edit-btn:hover { background: var(--red-400); transform: scale(1.1); }
.avatar-edit-btn i { color: #fff; font-size: 0.8rem; }

.profile-info { flex: 1; min-width: 200px; }
.profile-info h1 {
  font-size: 1.5rem;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-id { margin-bottom: 10px; }
.uid-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: monospace;
  color: #fff;
  font-weight: 600;
}
.profile-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.profile-meta i { margin-right: 4px; }
.profile-stats {
  display: flex;
  gap: 24px;
}
.stat-item { text-align: center; }
.stat-item .stat-value {
  display: block;
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  color: var(--red-200);
  font-weight: 700;
}
.stat-item .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-actions { align-self: flex-start; }

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.role-badge.admin { background: var(--red-500); color: #fff; }
.role-badge.mod { background: #b8910a; color: #fff; }

/* ========== 编辑资料弹窗 ========== */
.edit-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 20px;
}
.edit-modal.active { opacity: 1; visibility: visible; }
.edit-modal-content {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 0, 0, 0.15);
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}
.edit-modal.active .edit-modal-content { transform: scale(1); }
.edit-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.edit-modal-close:hover { color: var(--red-200); }
.edit-modal-content h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--red-200);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========== 拉黑功能样式 ========== */
.blocked-notice {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
}
.blocked-notice i { font-size: 2rem; color: var(--red-400); margin-bottom: 10px; display: block; }
.blocked-notice p { margin: 0; }

/* ========== 找回密码-被限流页面 ========== */
.blocked-page-content { text-align: center; padding: 30px 20px; }
.blocked-icon {
  width: 80px; height: 80px; margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  animation: blockedPulse 2s infinite;
}
@keyframes blockedPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}
.blocked-icon i { font-size: 2.5rem; color: #fff; }
.blocked-text { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 20px; line-height: 1.6; }
.blocked-text strong { color: var(--red-200); }
.blocked-timer {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; background: rgba(255, 0, 0, 0.1);
  border: 1px solid var(--border-glow); border-radius: var(--radius-md); margin-bottom: 24px;
}
.blocked-timer i { color: var(--red-200); font-size: 1.1rem; }
.blocked-timer strong { color: var(--red-200); }
.blocked-tips {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 16px; text-align: left; margin-bottom: 20px;
}
.blocked-tips p { color: var(--text-muted); margin-bottom: 10px; font-size: 0.9rem; }
.blocked-tips p i { margin-right: 6px; color: #f0c040; }
.blocked-tips ul { margin: 0; padding-left: 20px; color: var(--text-muted); font-size: 0.85rem; }
.blocked-tips li { margin-bottom: 6px; }

/* ========== 响应式 ========== */
@media (max-width: 767px) {
  .profile-header { flex-direction: column; align-items: center; text-align: center; }
  .profile-info h1 { justify-content: center; }
  .profile-meta { justify-content: center; }
  .profile-stats { justify-content: center; }
  .profile-actions { width: 100%; }
  .profile-actions .btn { width: 100%; }
  .edit-modal-content { padding: 20px 16px; }
  .login-links { flex-direction: column; align-items: center; }
}

/* 管理后台 - 手机适配 */
@media (max-width: 767px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-value { font-size: 1.5rem; }
  .admin-header h1 { font-size: 1.2rem; }
  .admin-table { font-size: 0.8rem; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
  .phone-display { font-size: 0.78rem; }
  .action-buttons { flex-direction: column; }
  .btn-sm { width: 100%; text-align: center; }
}

/* ========== 页面加载条 ========== */
.page-loader { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 10000; background: var(--bg-tertiary); }
.loader-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--red-700), var(--red-400), var(--red-200)); animation: loading 0.7s ease-out forwards; }
@keyframes loading { to { width: 100%; } }

/* ==========================================
   响应式设计
   ========================================== */

/* 平板 (768px+) */
@media (min-width: 768px) {
  .nav-container { padding: 0 16px; }
  .nav-search .search-input { width: 140px; }
  .main-content { padding: 24px 16px; }
  .welcome-banner { padding: 32px 24px; }
}

/* 桌面 (1024px+) */
@media (min-width: 1024px) {
  .content-grid { grid-template-columns: 260px 1fr 260px; }
  .user-name { display: inline; }
}

/* ==========================================
   移动端 (< 768px)
   ========================================== */
@media (max-width: 767px) {
  /* 导航 */
  .nav-container { height: 52px; padding: 0 10px; }
  .nav-logo { font-size: 1rem; }
  .nav-logo span { display: none; }
  .nav-toggle { display: block; }
  
  .nav-menu {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-primary);
    padding: 12px;
    gap: 4px;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    overflow-y: auto;
    z-index: 999;
  }
  
  .nav-menu.active { transform: translateX(0); }
  
  .nav-menu > li > a {
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
  }
  
  .nav-search { order: -1; margin: 10px 0; }
  .nav-search .search-input { width: 100%; flex: 1; }
  
  .nav-auth { flex-direction: column; gap: 4px; }
  .nav-auth .btn { width: 100%; }
  
  .user-toggle {
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    justify-content: space-between;
  }
  
  .user-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: var(--bg-tertiary);
    margin-top: 4px;
    border-radius: var(--radius-sm);
  }
  
  /* 内容 */
  .content-grid { grid-template-columns: 1fr; gap: 14px; }
  .main-content { padding: 14px 10px; }
  
  .welcome-banner {
    padding: 20px 14px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
  }
  
  .welcome-content h1 { font-size: 1.15rem; }
  .welcome-content p { font-size: 0.9rem; }
  
  /* 板块 */
  .section-card { padding: 10px; }
  .section-icon { width: 38px; height: 38px; }
  .section-icon i { font-size: 1rem; }
  .section-info h3 { font-size: 0.9rem; }
  .section-info p { font-size: 0.78rem; }
  
  /* 帖子 */
  .thread-item { padding: 10px; }
  .thread-avatar img { width: 34px; height: 34px; }
  .thread-title { font-size: 0.9rem; }
  .thread-meta { flex-wrap: wrap; gap: 10px; font-size: 0.72rem; }
  
  /* 侧边栏 */
  .sidebar { order: 3; }
  
  /* 认证 */
  .auth-card { margin: 0 6px; border-radius: var(--radius-lg); }
  .auth-header { padding: 20px 16px; }
  .auth-header h1 { font-size: 1.35rem; }
  .auth-form { padding: 20px 16px; }
  
  /* 按钮 */
  .btn { padding: 12px 16px; font-size: 0.88rem; }
  .form-input { padding: 12px 14px; }
  
  /* Footer */
  .footer { padding: 28px 10px 18px; }
  .footer-container { grid-template-columns: 1fr 1fr; gap: 20px; }
  
  /* 回到顶部 */
  .back-to-top {
    bottom: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
  }
}

/* 小屏手机 (< 480px) */
@media (max-width: 479px) {
  .thread-header { flex-direction: column; align-items: flex-start; gap: 4px; }
  .thread-section { display: none; }
  .hot-rank { width: 18px; height: 18px; font-size: 0.7rem; }
  .footer-container { grid-template-columns: 1fr; }
}

/* 大屏 (1400px+) */
@media (min-width: 1400px) {
  .content-grid { grid-template-columns: 280px 1fr 280px; }
}

/* 横屏手机 */
@media (max-width: 767px) and (orientation: landscape) {
  .nav-menu { top: 52px; max-height: calc(100vh - 52px); }
  .auth-page { min-height: auto; padding: 30px 0; }
}
