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

/* ========== 主题变量（默认：深空蓝）========== */
:root,
[data-theme="deepblue"] {
  --primary: #4f6df5;
  --primary-light: #6c83f8;
  --primary-dark: #3a56d4;
  --primary-rgb: 79, 109, 245;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 30px rgba(79, 109, 245, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --hero-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --bubble-gradient: linear-gradient(135deg, #667eea, #764ba2);
  --hero-text: #ffffff;
  --hero-subtext: rgba(255,255,255,0.85);
  --tag-bg: #eef2ff;
  --guestbook-bg: rgba(102, 126, 234, 0.04);
  --guestbook-border: rgba(102, 126, 234, 0.15);
}

/* 主题2：极光绿 */
[data-theme="aurora"] {
  --primary: #059669;
  --primary-light: #34d399;
  --primary-dark: #047857;
  --primary-rgb: 5, 150, 105;
  --bg: #f0fdf4;
  --card-bg: #ffffff;
  --text: #1a2e1a;
  --text-secondary: #4b7c5f;
  --border: #d1fae5;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 30px rgba(5, 150, 105, 0.15);
  --hero-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --bubble-gradient: linear-gradient(135deg, #11998e, #38ef7d);
  --hero-text: #ffffff;
  --hero-subtext: rgba(255,255,255,0.9);
  --tag-bg: #d1fae5;
  --guestbook-bg: rgba(17, 153, 142, 0.04);
  --guestbook-border: rgba(17, 153, 142, 0.15);
}

/* 主题3：日落橙 */
[data-theme="sunset"] {
  --primary: #ea580c;
  --primary-light: #fb923c;
  --primary-dark: #c2410c;
  --primary-rgb: 234, 88, 12;
  --bg: #fff7ed;
  --card-bg: #ffffff;
  --text: #2e1a0f;
  --text-secondary: #9a6544;
  --border: #fed7aa;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 30px rgba(234, 88, 12, 0.15);
  --hero-gradient: linear-gradient(135deg, #f12711 0%, #f5af19 100%);
  --bubble-gradient: linear-gradient(135deg, #f12711, #f5af19);
  --hero-text: #ffffff;
  --hero-subtext: rgba(255,255,255,0.9);
  --tag-bg: #ffedd5;
  --guestbook-bg: rgba(241, 39, 17, 0.03);
  --guestbook-border: rgba(241, 39, 17, 0.12);
}

/* 主题4：暗夜紫 */
[data-theme="midnight"] {
  --primary: #a78bfa;
  --primary-light: #c4b5fd;
  --primary-dark: #8b5cf6;
  --primary-rgb: 167, 139, 250;
  --bg: #0f0f1e;
  --card-bg: #1a1a2e;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --border: #2d2d44;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(167, 139, 250, 0.2);
  --hero-gradient: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #6d28d9 100%);
  --bubble-gradient: linear-gradient(135deg, #6d28d9, #a78bfa);
  --hero-text: #f0f0ff;
  --hero-subtext: rgba(200, 200, 255, 0.7);
  --tag-bg: rgba(167, 139, 250, 0.15);
  --guestbook-bg: rgba(167, 139, 250, 0.06);
  --guestbook-border: rgba(167, 139, 250, 0.15);
}

/* 主题5：白蓝渐变（官方专业） */
[data-theme="sky"] {
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --primary-rgb: 59, 130, 246;
  --bg: #f4f8fb;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 28px rgba(59, 130, 246, 0.13);
  --hero-gradient: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 30%, #93c5fd 60%, #3b82f6 100%);
  --bubble-gradient: linear-gradient(135deg, #3b82f6, #60a5fa);
  --hero-text: #1e3a5f;
  --hero-subtext: rgba(30, 58, 95, 0.72);
  --tag-bg: #dbeafe;
  --guestbook-bg: rgba(59, 130, 246, 0.03);
  --guestbook-border: rgba(59, 130, 246, 0.1);
}

/* 主题6：深海商务（企业稳重） */
[data-theme="ocean"] {
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --primary-rgb: 30, 64, 175;
  --bg: #f0f4fa;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --border: #e2e8f0;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 30px rgba(30, 64, 175, 0.12);
  --hero-gradient: linear-gradient(135deg, #0c1445 0%, #1e3a8a 40%, #2563eb 100%);
  --bubble-gradient: linear-gradient(135deg, #1e3a8a, #2563eb);
  --hero-text: #ffffff;
  --hero-subtext: rgba(191, 219, 254, 0.85);
  --tag-bg: #dbeafe;
  --guestbook-bg: rgba(30, 64, 175, 0.03);
  --guestbook-border: rgba(30, 64, 175, 0.1);
}

/* 主题7：学术墨绿（典雅稳重） */
[data-theme="ivy"] {
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --primary-dark: #115e59;
  --primary-rgb: 15, 118, 110;
  --bg: #f2f7f5;
  --card-bg: #ffffff;
  --text: #1a2a28;
  --text-secondary: #5c7c76;
  --border: #d1e8e2;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 30px rgba(15, 118, 110, 0.12);
  --hero-gradient: linear-gradient(135deg, #0a2e2a 0%, #134e4a 40%, #0f766e 100%);
  --bubble-gradient: linear-gradient(135deg, #0f766e, #14b8a6);
  --hero-text: #f0fdfa;
  --hero-subtext: rgba(204, 251, 241, 0.82);
  --tag-bg: #ccfbf1;
  --guestbook-bg: rgba(15, 118, 110, 0.03);
  --guestbook-border: rgba(15, 118, 110, 0.1);
}

/* 主题8：素净灰（极简专业） */
[data-theme="slate"] {
  --primary: #475569;
  --primary-light: #64748b;
  --primary-dark: #334155;
  --primary-rgb: 71, 85, 105;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 28px rgba(71, 85, 105, 0.1);
  --hero-gradient: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
  --bubble-gradient: linear-gradient(135deg, #475569, #64748b);
  --hero-text: #f8fafc;
  --hero-subtext: rgba(226, 232, 240, 0.8);
  --tag-bg: #f1f5f9;
  --guestbook-bg: rgba(71, 85, 105, 0.03);
  --guestbook-border: rgba(71, 85, 105, 0.1);
}

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

a { text-decoration: none; color: inherit; }

/* ========== 顶部区域 ========== */
.hero {
  background: var(--hero-gradient);
  padding: 32px 20px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, -20px); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
}

.logo-icon img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.25), 0 4px 20px rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.1);
}

.logo-text {
  text-align: left;
}

.hero h1 {
  color: var(--hero-text);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.28),
    0 2px 0 rgba(0,0,0,0.18),
    0 3px 0 rgba(0,0,0,0.1),
    0 4px 12px rgba(0,0,0,0.14),
    0 8px 28px rgba(0,0,0,0.08);
}

.hero p {
  color: var(--hero-subtext);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 4px;
  margin-top: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ========== 搜索栏（悬浮于 Banner 上方）========== */
.search-bar {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  max-width: 88%;
  z-index: 10;
}

.search-input-wrap {
  position: relative;
  background: var(--card-bg);
  border-radius: 50px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 56px;
  transition: box-shadow 0.3s;
}

.search-input-wrap:focus-within {
  box-shadow: 0 4px 30px rgba(var(--primary-rgb), 0.3);
}

/* 无Banner时的搜索栏（独立居中） */
.search-bar--standalone {
  position: static;
  transform: none;
  margin: 24px auto;
  width: 580px;
  max-width: 88%;
}

.search-bar--standalone .search-input-wrap {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.search-input-wrap .search-icon {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-right: 12px;
}

.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  height: 100%;
}

.search-input-wrap input::placeholder { color: #bbb; }

.search-clear {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 4px 8px;
  display: none;
  transition: color 0.2s;
}
.search-clear:hover { color: var(--text); }

/* ========== 搜索结果 ========== */
.search-results {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 20px;
  display: none;
}

.search-results.active { display: block; }

.search-results h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  transition: all 0.25s;
  cursor: pointer;
}

.search-result-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
}

.search-result-item .icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-result-item:hover .icon {
  transform: scale(1.1) rotate(-5deg);
}

.search-result-item .info { flex: 1; min-width: 0; }
.search-result-item .info .title { font-weight: 600; font-size: 0.95rem; }
.search-result-item .info .desc { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-item .cat-tag {
  font-size: 0.72rem;
  background: var(--tag-bg);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ========== 主内容区域 ========== */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px 30px;
}

.main-content.hidden { display: none; }

/* ========== 分类区块 ========== */
.category-section {
  margin-bottom: 16px;
  animation: fadeInUp 0.5s ease-out;
}

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

.category-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding-left: 2px;
}

.category-header .cat-icon {
  font-size: 1.1rem;
}

.category-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.category-header .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ========== 链接卡片网格 ========== */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.link-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--card-bg);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

/* 悬浮时顶部流光条 */
.link-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

/* 悬浮时背景光晕 */
.link-card::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08), transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  pointer-events: none;
}

.link-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(var(--primary-rgb), 0.15);
  border-color: rgba(var(--primary-rgb), 0.2);
}

.link-card:hover::before {
  transform: scaleX(1);
  animation: shimmer 1.5s linear infinite;
}

.link-card:hover::after {
  width: 200%; height: 200%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 首字母渐变头像 */
.link-card .card-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.link-card:hover .card-avatar {
  transform: scale(1.12) rotate(-5deg);
}

.link-card .card-body {
  flex: 1;
  min-width: 0;
}

.link-card .card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s;
}

.link-card:hover .card-title {
  color: var(--primary);
}

.link-card .card-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  margin-bottom: 3px;
}

.link-card .card-domain {
  font-size: 0.65rem;
  color: var(--text-secondary);
  opacity: 0.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.25s;
}

.link-card:hover .card-domain {
  opacity: 1;
}

.link-card .card-arrow {
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 0.85rem;
  font-weight: 700;
}

.link-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
  transform: translateX(0);
}

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

.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 1rem; }

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 20px 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer a {
  color: var(--primary);
  font-weight: 500;
  transition: opacity 0.2s;
}
.footer a:hover { opacity: 0.8; }

/* ========== 右上角操作区（主题切换 + 后台入口）========== */
.hero-actions {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
}

/* 主题切换器 */
.theme-switcher {
  position: relative;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}

.theme-switcher:hover {
  background: rgba(255,255,255,0.35);
  transform: scale(1.08);
}

.theme-current {
  line-height: 1;
}

.theme-dropdown {
  display: none;
  position: absolute;
  top: 50px;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 8px;
  min-width: 140px;
  z-index: 101;
  animation: fadeIn 0.2s;
}

.theme-switcher.active .theme-dropdown {
  display: block;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #333;
  transition: background 0.2s;
  white-space: nowrap;
}

.theme-option:hover {
  background: #f3f4f6;
}

.theme-option.active {
  background: #eef2ff;
  font-weight: 600;
}

.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 后台入口按钮 */
.admin-entry {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  color: #fff;
  font-size: 1.1rem;
  text-decoration: none;
}

.admin-entry:hover {
  background: rgba(255,255,255,0.35);
  transform: scale(1.08);
}

/* 深浅切换按钮 */
.dark-toggle {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.1rem;
  color: #fff;
  border: none;
  font-family: inherit;
  line-height: 1;
}
.dark-toggle:hover {
  background: rgba(255,255,255,0.35);
  transform: scale(1.08);
}

/* 全局暗色模式覆盖 */
body[data-mode="dark"] {
  --bg: #1a1a2e;
  --card-bg: #252540;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --border: #3d3d5c;
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.4);
  --tag-bg: rgba(255,255,255,0.08);
  --guestbook-bg: rgba(255,255,255,0.04);
  --guestbook-border: rgba(255,255,255,0.1);
}

body[data-mode="dark"] .announcement-bar {
  background: linear-gradient(90deg, #2d2d44, #252540, #2d2d44);
  border-bottom-color: #3d3d5c;
}
body[data-mode="dark"] .announcement-label {
  background: linear-gradient(90deg, #3d3d5c, #252540);
  color: #c4b5fd;
  border-right-color: #3d3d5c;
}
body[data-mode="dark"] .announcement-item { color: #94a3b8; }
body[data-mode="dark"] .announcement-item .ann-title { color: #c4b5fd; }
body[data-mode="dark"] .announcement-item:hover { background: rgba(255,255,255,0.05); }
body[data-mode="dark"] .search-input-wrap input::placeholder { color: #6b7280; }
body[data-mode="dark"] .contact-modal { background: #252540; }
body[data-mode="dark"] .cm-form-group input,
body[data-mode="dark"] .cm-form-group textarea {
  background: #1a1a2e; color: #e2e8f0;
}
body[data-mode="dark"] .cm-form-group input:focus,
body[data-mode="dark"] .cm-form-group textarea:focus {
  background: #1e1e36;
}
body[data-mode="dark"] .cm-form-group input::placeholder,
body[data-mode="dark"] .cm-form-group textarea::placeholder { color: #6b7280; }
body[data-mode="dark"] .announcement-list-card { background: #252540; }
body[data-mode="dark"] .ann-list-header { border-bottom-color: #3d3d5c; }
body[data-mode="dark"] .ann-list-item { border-bottom-color: #3d3d5c; }
body[data-mode="dark"] .ann-list-item:hover { background: rgba(255,255,255,0.03); }
body[data-mode="dark"] .ann-list-close { background: rgba(255,255,255,0.1); color: #94a3b8; }
body[data-mode="dark"] .ann-list-close:hover { background: rgba(255,255,255,0.2); }
body[data-mode="dark"] .theme-dropdown { background: #252540; }
body[data-mode="dark"] .theme-option { color: #e2e8f0; }
body[data-mode="dark"] .theme-option:hover { background: rgba(255,255,255,0.08); }
body[data-mode="dark"] .theme-option.active { background: rgba(167,139,250,0.2); }
body[data-mode="dark"] .banner-wrapper { background: #1a1a2e; }
body[data-mode="dark"] .search-input-wrap { background: #252540; }
@media (max-width: 768px) {
  /* === Hero 区域 === */
  .hero { padding: 44px 16px 28px; }
  .logo-block { gap: 10px; }
  .logo-icon { font-size: 2rem; }
  .logo-icon img { width: 56px; height: 56px; }
  .hero h1 { font-size: 1.7rem; letter-spacing: 1px; }
  .hero p { font-size: 0.95rem; letter-spacing: 2px; margin-top: 6px; }

  /* === 右上角操作区 === */
  .hero-actions { top: 12px; right: 12px; gap: 6px; }
  .theme-switcher, .admin-entry, .dark-toggle { width: 36px; height: 36px; font-size: 0.9rem; }

  /* === 公告栏 === */
  .announcement-bar { height: 38px; }
  .announcement-label { padding: 0 10px; font-size: 0.85rem; }
  .announcement-item { font-size: 0.88rem; }

  /* === Banner + 搜索栏 === */
  .banner-wrapper { aspect-ratio: 16 / 9; }
  .banner-arrow { width: 34px; height: 34px; font-size: 1rem; }
  .banner-arrow.prev { left: 10px; }
  .banner-arrow.next { right: 10px; }
  .search-bar { bottom: 8px; width: 92%; }
  .search-bar--standalone { width: 92%; margin: 16px auto; }
  .search-input-wrap { height: 48px; padding: 0 16px; }
  .search-input-wrap input { font-size: 1rem; }
  .search-input-wrap .search-icon { font-size: 1.1rem; margin-right: 8px; }

  /* === 快捷入口 === */
  .quick-entries-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .quick-entries-section { padding: 0 12px; }
  .quick-entry-card {
    padding: 10px 6px;
    border-radius: 10px;
    border: 1px solid var(--border);
    gap: 3px;
    min-height: 44px;
    min-width: 0;
    overflow: hidden;
  }
  .qe-title { font-size: 0.84rem; }
  .qe-url { font-size: 0.64rem; }
  .quick-entries-title h3 { font-size: 0.95rem; }

  /* === 弹幕 === */
  .danmaku-wrapper { padding: 18px 0 22px; }
  .danmaku-section { padding: 0 12px; }
  .danmaku-header h2 { font-size: 1.2rem; }
  .dm-header-icon { font-size: 1.5rem; }
  .dm-header-count { font-size: 0.75rem; padding: 4px 12px; }
  .dm-view-all { font-size: 0.78rem; }
  .dm-desc { font-size: 0.72rem; }
  .danmaku-stage { height: 180px; border-radius: 14px; }
  .danmaku-item { padding: 7px 10px; margin: 3px 8px; gap: 8px; }
  .dm-avatar { width: 28px; height: 28px; min-width: 28px; font-size: 0.7rem; }
  .dm-name { font-size: 0.78rem; max-width: 80px; }
  .dm-content { font-size: 0.74rem; }

  /* === 链接卡片 === */
  .links-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 8px; }
  .link-card { padding: 10px 8px; gap: 8px; }
  .link-card .card-avatar { width: 34px; height: 34px; min-width: 34px; font-size: 1rem; border-radius: 8px; }
  .link-card .card-title { font-size: 0.85rem; }
  .link-card .card-desc { font-size: 0.72rem; }
  .link-card .card-domain { font-size: 0.62rem; }
  .category-header h2 { font-size: 0.95rem; }
  .category-header .cat-icon { font-size: 1.05rem; }

  /* === 主内容 === */
  .main-content { padding: 14px 14px 30px; }

  /* === 留言板 === */
  .guestbook-wrapper { padding: 20px 0 32px; }
  .guestbook-section { max-width: 100%; padding: 0 12px; }
  .guestbook-header { flex-direction: column; align-items: flex-start; }
  .guestbook-header h2 { font-size: 1.2rem; }
  .gb-header-left { flex-wrap: wrap; }
  .gb-header-right { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .guestbook-card { padding: 14px; border-radius: 12px; }
  .guestbook-card.pinned { padding: 14px; margin: 0; border-radius: 12px; }
  .gb-content { font-size: 0.88rem; }
  .gb-avatar { width: 38px; height: 38px; font-size: 0.88rem; }
  .gb-reply-avatar { width: 24px; height: 24px; font-size: 0.68rem; }
  .gb-reply-content { font-size: 0.84rem; }
  .gb-reply-btn-sm { font-size: 0.72rem; }
  .gb-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 14px; }
  .gb-cat-tab { padding: 5px 12px; font-size: 0.76rem; }
  .gb-cat-badge { font-size: 0.68rem; padding: 1px 6px; }
  .gb-inline-reply textarea { font-size: 0.84rem; }
  .guestbook-post-btn { padding: 8px 18px; font-size: 0.84rem; }
  .gb-like-btn, .gb-fav-btn, .gb-reply-btn { padding: 4px 12px; font-size: 0.78rem; }

  /* === 联系气泡 === */
  .contact-bubble { right: 14px; bottom: 60px; }
  .contact-bubble .bubble-icon { width: 50px; height: 50px; font-size: 1.3rem; }
  .contact-bubble .bubble-label { font-size: 0.72rem; padding: 4px 12px; }

  /* === 页脚 === */
  .footer { font-size: 0.82rem; padding: 16px 16px; }

  /* === 广告位 === */
  .ad-section { margin-bottom: 14px; padding: 0 14px; }
  .banner-section { padding: 0 14px; }
  .quick-entries-section { padding: 0 14px; }
  .guestbook-section { padding: 0 12px; }
  .search-results { padding: 0 14px; }
}

@media (max-width: 480px) {
  /* === Hero === */
  .hero { padding: 40px 12px 24px; }
  .logo-block { gap: 8px; }
  .logo-icon { font-size: 1.7rem; }
  .logo-icon img { width: 48px; height: 48px; }
  .hero h1 { font-size: 1.25rem; letter-spacing: 0.5px; }
  .hero p { font-size: 0.82rem; letter-spacing: 1.5px; }

  /* === 右上角操作区 === */
  .hero-actions { top: 10px; right: 10px; gap: 5px; }
  .theme-switcher, .admin-entry, .dark-toggle { width: 34px; height: 34px; font-size: 0.85rem; }
  .theme-dropdown { right: 0; left: auto; min-width: 130px; }

  /* === 搜索栏 === */
  .search-bar { width: 94%; bottom: 6px; }
  .search-bar--standalone { width: 94%; }
  .search-input-wrap { height: 44px; padding: 0 12px; }
  .search-input-wrap input { font-size: 0.9rem; }
  .search-input-wrap .search-icon { font-size: 1rem; margin-right: 6px; }

  /* === 链接卡片 === */
  .links-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .link-card { padding: 10px 8px; gap: 8px; }
  .link-card .card-avatar { width: 32px; height: 32px; min-width: 32px; font-size: 0.95rem; border-radius: 8px; }
  .link-card .card-title { font-size: 0.82rem; }
  .link-card .card-desc { font-size: 0.68rem; }
  .link-card .card-domain { display: none; }

  /* === 快捷入口 === */
  .quick-entries-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .quick-entries-section { padding: 0 8px; }
  .quick-entry-card {
    padding: 10px 6px;
    border-radius: 8px;
    border: 1px solid var(--border);
    gap: 2px;
    min-height: 44px;
    min-width: 0;
    overflow: hidden;
  }
  .qe-title { font-size: 0.82rem; }
  .qe-url { display: none; }
  /* === 弹幕 === */
  .danmaku-wrapper { padding: 14px 0 18px; }
  .danmaku-section { padding: 0 8px; }
  .danmaku-header h2 { font-size: 1.1rem; }
  .dm-header-icon { font-size: 1.3rem; }
  .dm-header-count { font-size: 0.7rem; padding: 3px 10px; }
  .dm-view-all { font-size: 0.74rem; }
  .dm-desc { font-size: 0.68rem; }
  .danmaku-stage { height: 150px; border-radius: 12px; }
  .danmaku-item { padding: 6px 8px; margin: 2px 6px; gap: 6px; }
  .dm-avatar { width: 26px; height: 26px; min-width: 26px; font-size: 0.65rem; }
  .dm-name { font-size: 0.74rem; max-width: 70px; }
  .dm-content { font-size: 0.7rem; }

  /* === 留言板 === */
  .guestbook-wrapper { padding: 16px 0 24px; }
  .guestbook-section { padding: 0 8px; }
  .guestbook-header h2 { font-size: 1.05rem; }
  .gb-header-icon { font-size: 1.3rem; }
  .gb-header-count { font-size: 0.72rem; padding: 3px 10px; }
  .guestbook-post-btn { padding: 7px 14px; font-size: 0.8rem; }
  .guestbook-card { padding: 12px; border-radius: 10px; }
  .guestbook-card.pinned { padding: 12px; margin: 0; border-radius: 10px; }
  .gb-avatar { width: 34px; height: 34px; font-size: 0.78rem; }
  .gb-content { font-size: 0.84rem; }
  .gb-like-btn, .gb-fav-btn, .gb-reply-btn { padding: 3px 10px; font-size: 0.74rem; }
  .gb-reply-thread.gb-reply-flat { margin-left: 0; }
  .gb-inline-reply .btn-submit { padding: 5px 12px; font-size: 0.76rem; }
  .gb-toolbar { padding: 8px 10px; }

  /* === 联系气泡 === */
  .contact-bubble { right: 10px; bottom: 50px; }
  .contact-bubble .bubble-icon { width: 46px; height: 46px; font-size: 1.2rem; }
  .contact-bubble .bubble-label { font-size: 0.68rem; padding: 3px 10px; }

  /* === Banner === */
  .banner-arrow { width: 28px; height: 28px; font-size: 0.85rem; }
  .banner-arrow.prev { left: 6px; }
  .banner-arrow.next { right: 6px; }
  .banner-dots { bottom: 8px; gap: 5px; }
  .banner-dot { width: 8px; height: 8px; }

  /* === 公告 === */
  .announcement-bar { height: 36px; }
  .announcement-label { padding: 0 8px; font-size: 0.72rem; }
  .announcement-item { font-size: 0.76rem; }

  /* === 弹窗 === */
  .contact-modal { border-radius: 16px; }
  .contact-modal .cm-header { padding: 22px 20px 18px; }
  .contact-modal .cm-body { padding: 18px 20px; }
  .announcement-list-card { border-radius: 16px 16px 0 0; max-height: 88vh; }

  /* === 页脚 === */
  .footer { font-size: 0.76rem; padding: 14px 12px; }
}

/* ========== 公告栏（滚动）========== */
.announcement-bar {
  background: linear-gradient(90deg, #fff8e1, #fffde7, #fff8e1);
  border-bottom: 1px solid #ffe082;
  overflow: hidden;
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
}

.announcement-bar.empty { display: none; }

.announcement-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 100%;
  font-size: 0.85rem;
  font-weight: 700;
  color: #e65100;
  background: linear-gradient(90deg, #ffe082, #fff8e1);
  border-right: 1px solid #ffe082;
  white-space: nowrap;
  z-index: 2;
  cursor: pointer;
  transition: background 0.2s;
}

.announcement-label:hover {
  background: linear-gradient(90deg, #ffd54f, #fff8e1);
}

.announcement-marquee {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.announcement-track {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  animation: marquee 50s linear infinite;
  padding-left: 100%;
}

.announcement-track:hover { animation-play-state: paused; }

.announcement-item {
  font-size: 0.86rem;
  color: #5d4037;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}

.announcement-item:hover {
  background: rgba(230, 81, 0, 0.08);
}

.announcement-item .ann-title {
  font-weight: 700;
  color: #e65100;
}

.announcement-item .ann-sep {
  color: #ffcc02;
  font-size: 1rem;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ========== 广告位 ========== */
.ad-section {
  max-width: 1100px;
  margin: 0 auto 16px;
  padding: 0 20px;
}

.ad-section.empty { display: none; }

.ad-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 60px;
}

.ad-container :is(img, a, div, p, span, iframe) { max-width: 100%; }

/* ========== Banner 轮播图 ========== */
.banner-section {
  max-width: 1100px;
  margin: 14px auto 16px;
  padding: 0 20px;
  position: relative;
}

.banner-section.empty { display: none; }

.banner-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card-bg);
  aspect-ratio: 1100 / 280;
  cursor: pointer;
}

.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-slide .banner-ad {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.banner-slide .banner-ad img { max-width: 100%; }

/* 轮播箭头 */
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  z-index: 5;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  opacity: 0;
}

.banner-wrapper:hover .banner-arrow { opacity: 1; }

.banner-arrow:hover {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateY(-50%) scale(1.1);
}

.banner-arrow.prev { left: 16px; }
.banner-arrow.next { right: 16px; }

/* 轮播指示器 */
.banner-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: 2px solid rgba(255,255,255,0.8);
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.banner-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* ========== AI 智能搜索 — 专业风格 ========== */
:root {
  --ai-accent: #1e3a5f;
  --ai-accent-hover: #152d4a;
  --ai-accent-light: #2c5282;
  --ai-bg: #ffffff;
  --ai-border: #e2e8f0;
  --ai-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --ai-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  --ai-radius: 12px;
  --ai-radius-sm: 8px;
}

.ai-search-wrapper {
  max-width: 1100px;
  margin: 12px auto 0;
  padding: 0 20px;
}
.ai-search-wrapper.empty { display: none; }

.ai-search-section {
  background: var(--ai-bg);
  border: 1px solid var(--ai-border);
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: var(--ai-shadow);
  transition: box-shadow 0.3s ease;
}
.ai-search-section:hover {
  box-shadow: var(--ai-shadow-lg);
}

/* 头部 */
.ai-search-header {
  margin-bottom: 14px;
}
.ai-search-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-search-title-row.title-center,
.ai-search-title-row.subtitle-center {
  justify-content: center;
}
.ai-search-title-row.title-center .ai-search-brand-icon,
.ai-search-title-row.title-center .ai-search-badge {
  display: none;
}
.ai-search-title-row.title-center .ai-search-title-group {
  flex: 0 1 auto;
}
.ai-search-brand-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--ai-accent);
  color: #fff;
}
.ai-search-brand-icon svg {
  width: 18px;
  height: 18px;
}
.ai-search-title-group {
  flex: 1;
  min-width: 0;
}
.ai-search-title-group h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.ai-search-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin: 2px 0 0;
  font-weight: 400;
  line-height: 1.4;
}
/* 副标题居中 */
.ai-search-title-row.subtitle-center .ai-search-subtitle {
  text-align: center;
}
.ai-search-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--ai-accent);
  background: rgba(30, 58, 95, 0.06);
  border: 1px solid rgba(30, 58, 95, 0.12);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* 搜索栏 */
.ai-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.ai-search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.ai-search-input-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
  transition: color 0.25s;
}
.ai-search-input-wrap:focus-within .ai-search-input-icon {
  color: var(--ai-accent);
}
.ai-search-input {
  width: 100%;
  height: 40px;
  padding: 0 100px 0 38px;
  border: 1.5px solid var(--ai-border);
  border-radius: var(--ai-radius);
  font-size: 0.9rem;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  transition: all 0.25s ease;
  font-family: inherit;
}
.ai-search-input:focus {
  border-color: var(--ai-accent);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
  background: #fff;
}
.ai-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}
.ai-search-clear {
  position: absolute;
  right: 84px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
  padding: 0;
}
.ai-search-clear svg {
  width: 14px;
  height: 14px;
}
.ai-search-clear:hover {
  background: rgba(0,0,0,0.06);
  color: #475569;
}
.ai-search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: 6px;
  background: var(--ai-accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  font-family: inherit;
  z-index: 2;
}
.ai-search-btn:hover {
  background: var(--ai-accent-hover);
}
.ai-search-btn:active {
  background: #16304d;
}
.ai-search-btn-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* 平台标签分隔 */
.ai-platforms-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ai-platforms-label-line {
  flex: 1;
  height: 1px;
  background: var(--ai-border);
}
.ai-platforms-label-text {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* 平台网格 */
.ai-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

/* 平台卡片 — 统一专业风格 */
.ai-plat-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--ai-radius-sm);
  background: #f8fafc;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
}
.ai-plat-card:hover {
  background: #fff;
  border-color: var(--ai-border);
  box-shadow: var(--ai-shadow);
}
.ai-plat-card.active {
  background: #fff;
  border-color: var(--ai-accent);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.06), var(--ai-shadow);
}
.ai-plat-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(30, 58, 95, 0.06);
  flex-shrink: 0;
  transition: background 0.2s;
}
.ai-plat-card.active .ai-plat-icon-wrap {
  background: rgba(30, 58, 95, 0.1);
}
.ai-plat-info {
  flex: 1;
  min-width: 0;
}
.ai-plat-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
  transition: color 0.2s;
}
.ai-plat-card.active .ai-plat-name {
  color: var(--ai-accent);
}
.ai-plat-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.ai-plat-check {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ai-accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-plat-card.active .ai-plat-check {
  display: flex;
  animation: aiCheckIn 0.25s ease;
}
@keyframes aiCheckIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* 暗色模式 */
body[data-mode="dark"] .ai-search-section {
  background: #1e1e32;
  border-color: #2d2d44;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
body[data-mode="dark"] .ai-search-section:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
body[data-mode="dark"] .ai-search-title-group h2 { color: #e2e8f0; }
body[data-mode="dark"] .ai-search-subtitle { color: #94a3b8; }
body[data-mode="dark"] .ai-search-badge {
  color: #93c5fd;
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.15);
}
body[data-mode="dark"] .ai-search-input {
  background: #16162a;
  border-color: #2d2d44;
  color: #e2e8f0;
}
body[data-mode="dark"] .ai-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
  background: #1a1a30;
}
body[data-mode="dark"] .ai-search-input::placeholder { color: #64748b; }
body[data-mode="dark"] .ai-search-input-icon { color: #64748b; }
body[data-mode="dark"] .ai-search-input-wrap:focus-within .ai-search-input-icon { color: #60a5fa; }
body[data-mode="dark"] .ai-search-clear { color: #64748b; }
body[data-mode="dark"] .ai-search-clear:hover { background: rgba(255,255,255,0.08); color: #94a3b8; }
body[data-mode="dark"] .ai-search-btn {
  background: #3b82f6;
}
body[data-mode="dark"] .ai-search-btn:hover {
  background: #2563eb;
}
body[data-mode="dark"] .ai-platforms-label-line { background: #2d2d44; }
body[data-mode="dark"] .ai-platforms-label-text { color: #64748b; }
body[data-mode="dark"] .ai-plat-card { background: #16162a; }
body[data-mode="dark"] .ai-plat-card:hover { background: #1a1a30; border-color: #2d2d44; }
body[data-mode="dark"] .ai-plat-card.active {
  background: #1a1a30;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.08), 0 1px 3px rgba(0,0,0,0.2);
}
body[data-mode="dark"] .ai-plat-icon-wrap { background: rgba(255,255,255,0.06); }
body[data-mode="dark"] .ai-plat-card.active .ai-plat-icon-wrap { background: rgba(59,130,246,0.12); }
body[data-mode="dark"] .ai-plat-name { color: #cbd5e1; }
body[data-mode="dark"] .ai-plat-card.active .ai-plat-name { color: #93c5fd; }
body[data-mode="dark"] .ai-plat-desc { color: #64748b; }
body[data-mode="dark"] .ai-plat-check { background: #3b82f6; }

/* 移动端适配 */
@media (max-width: 768px) {
  .ai-search-wrapper { padding: 0 12px; }
  .ai-search-section { padding: 14px 14px; border-radius: 10px; }
  .ai-search-title-row { gap: 10px; }
  .ai-search-brand-icon { width: 30px; height: 30px; border-radius: 7px; }
  .ai-search-brand-icon svg { width: 15px; height: 15px; }
  .ai-search-title-group h2 { font-size: 1.05rem; }
  .ai-search-subtitle { font-size: 0.74rem; }
  .ai-search-badge { padding: 3px 8px; font-size: 0.66rem; }
  .ai-search-bar { gap: 6px; }
  .ai-search-input { height: 38px; font-size: 0.87rem; padding: 0 90px 0 34px; }
  .ai-search-btn { height: 30px; padding: 0 12px; font-size: 0.82rem; }
  .ai-search-clear { right: 76px; }
  .ai-platform-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
  .ai-plat-card { padding: 8px 10px; }
  .ai-plat-icon-wrap { width: 28px; height: 28px; border-radius: 6px; font-size: 0.9rem; }
  .ai-plat-name { font-size: 0.76rem; }
  .ai-plat-desc { font-size: 0.64rem; }
}

@media (max-width: 480px) {
  .ai-search-wrapper { padding: 0 8px; }
  .ai-search-section { padding: 12px 10px; border-radius: 8px; }
  .ai-search-title-row { gap: 8px; }
  .ai-search-brand-icon { width: 28px; height: 28px; border-radius: 6px; }
  .ai-search-brand-icon svg { width: 14px; height: 14px; }
  .ai-search-title-group h2 { font-size: 0.95rem; }
  .ai-search-subtitle { font-size: 0.7rem; }
  .ai-search-badge { padding: 3px 7px; font-size: 0.63rem; }
  .ai-search-bar { gap: 6px; }
  .ai-search-input { height: 38px; padding: 0 82px 0 34px; font-size: 0.83rem; }
  .ai-search-btn { height: 28px; padding: 0 10px; font-size: 0.78rem; right: 3px; }
  .ai-search-input-icon { left: 10px; width: 14px; height: 14px; }
  .ai-search-clear { right: 70px; width: 22px; height: 22px; }
  .ai-search-clear svg { width: 12px; height: 12px; }
  .ai-platform-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 5px; }
  .ai-plat-card { padding: 7px 8px; border-radius: 7px; }
  .ai-plat-icon-wrap { width: 24px; height: 24px; border-radius: 5px; font-size: 0.8rem; }
  .ai-plat-name { font-size: 0.7rem; }
  .ai-plat-desc { display: none; }
}

/* ========== 快捷入口 ========== */
.quick-entries-section {
  max-width: 1100px;
  margin: 12px auto 0;
  padding: 0 20px;
}

.quick-entries-section.empty { display: none; }

.quick-entries-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-left: 2px;
}

.quick-entries-title .qe-title-icon {
  font-size: 1rem;
}

.quick-entries-title h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.quick-entries-title .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

.quick-entries-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.quick-entry-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  min-width: 0;
  overflow: hidden;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.quick-entry-card:hover {
  background: rgba(79, 109, 245, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.qe-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.3;
}

.qe-url {
  font-size: 0.68rem;
  font-weight: 400;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.2;
}



/* ========== 最新留言 — 纵向向上翻滚 ========== */
/* ========== 最新留言 — 与留言板风格一致 ========== */
.danmaku-wrapper {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(var(--primary-rgb), 0.015) 8%, rgba(var(--primary-rgb), 0.03) 50%, var(--bg) 100%);
  padding: 24px 0 28px;
  margin-top: 0;
  position: relative;
}
.danmaku-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.3;
}
#latestMsgSection.empty,
.danmaku-wrapper:has(#latestMsgSection.empty) { display: none; }

.danmaku-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部 — 匹配留言板头部 */
.danmaku-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.dm-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dm-header-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.danmaku-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0;
}
.dm-header-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--bubble-gradient);
  padding: 5px 14px;
  border-radius: 20px;
}
.dm-view-all {
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  transition: opacity 0.2s;
}
.dm-view-all:hover { opacity: 0.7; }

/* 描述提示 — 位于头部右侧 */
.dm-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-left: auto;
  white-space: nowrap;
}

/* 弹幕舞台 — 卡片风格 */
.danmaku-stage {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  height: 200px;
  --dm-paused: running;
}

/* 弹幕滚动轨道 */
.danmaku-track {
  animation: dm-scroll-up linear infinite;
  animation-duration: var(--dm-dur, 30s);
  animation-play-state: var(--dm-paused, running);
}

.danmaku-stage:hover {
  --dm-paused: paused;
}

@keyframes dm-scroll-up {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* 弹幕条目 — 仿留言卡片 */
.danmaku-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin: 4px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  background: transparent;
}
.danmaku-item:first-child { margin-top: 6px; }
.danmaku-item:last-child { margin-bottom: 6px; }

.danmaku-item:hover {
  background: rgba(var(--primary-rgb), 0.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 头像 — 匹配留言板风格 */
.dm-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 信息区 */
.dm-info {
  flex: 1;
  min-width: 0;
}

.dm-info-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dm-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.dm-time {
  font-size: 0.7rem;
  color: #aaa;
  white-space: nowrap;
  flex-shrink: 0;
}

.dm-content {
  font-size: 0.82rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* 弹幕颜色主题 — 头像渐变 */
.dm-rose  .dm-avatar { background: linear-gradient(135deg, #e11d48, #fb7185); }
.dm-teal  .dm-avatar { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.dm-amber .dm-avatar { background: linear-gradient(135deg, #d97706, #fbbf24); }
.dm-blue  .dm-avatar { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.dm-green .dm-avatar { background: linear-gradient(135deg, #059669, #34d399); }
.dm-violet .dm-avatar { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

/* 暗色模式 */
body.dark .danmaku-wrapper {
  background: linear-gradient(180deg, #0f172a 0%, rgba(99,102,241,0.03) 8%, rgba(99,102,241,0.05) 50%, #0f172a 100%);
}
body.dark .danmaku-stage {
  background: #1e293b;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.15);
  border-color: rgba(255,255,255,0.06);
}
body.dark .danmaku-item:hover {
  background: rgba(129,140,248,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
body.dark .dm-name { color: #e2e8f0; }
body.dark .dm-content { color: #94a3b8; }
body.dark .dm-desc { color: #64748b; }
body[data-mode="dark"] .danmaku-view-all {
  color: #818cf8;
}

/* 留言高亮闪烁动画 */
.guestbook-card.lm-highlight-flash {
  animation: lm-flash 2s ease;
}

/* ========== 关注 & 私信按钮 ========== */
.gb-follow-btn, .gb-pm-btn {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  line-height: 1.4;
  flex-shrink: 0;
}
.gb-follow-btn {
  color: #1976d2;
  background: rgba(25,118,210,0.06);
  border-color: rgba(25,118,210,0.2);
}
.gb-follow-btn:hover {
  background: #1976d2;
  color: #fff;
}
.gb-follow-btn.followed {
  color: #43a047;
  background: rgba(67,160,71,0.08);
  border-color: rgba(67,160,71,0.25);
}
.gb-follow-btn.followed:hover {
  background: #e53935;
  color: #fff;
  border-color: #e53935;
}
.gb-pm-btn {
  color: #7b1fa2;
  background: rgba(123,31,162,0.06);
  border-color: rgba(123,31,162,0.2);
}
.gb-pm-btn:hover {
  background: #7b1fa2;
  color: #fff;
}

/* ========== 私信弹窗 ========== */
.pm-modal-overlay {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  align-items: center; justify-content: center;
}
.pm-modal-overlay.active { display: flex; }
.pm-modal {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  animation: pmSlideIn 0.3s ease;
}
@keyframes pmSlideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.pm-header {
  padding: 20px 24px 14px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
}
.pm-icon { font-size: 2rem; }
.pm-header h3 { margin: 8px 0 4px; font-size: 1.1rem; color: #333; }
.pm-receiver-label { font-size: 0.82rem; color: #888; margin: 0; }
.pm-receiver-label span { color: #1976d2; font-weight: 600; }
.pm-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none;
  font-size: 1.2rem; color: #999; cursor: pointer;
  padding: 4px 6px; border-radius: 50%;
  transition: all 0.2s;
}
.pm-close:hover { color: #333; background: #f0f0f0; }
.pm-body { padding: 18px 24px 24px; }
.pm-form-group { position: relative; margin-bottom: 14px; }
.pm-form-group textarea {
  width: 100%; border: 1.5px solid #e0e0e0; border-radius: 10px;
  padding: 12px 14px; font-size: 0.92rem; resize: vertical;
  outline: none; font-family: inherit; transition: border-color 0.2s;
}
.pm-form-group textarea:focus { border-color: #1976d2; }
.pm-char-count {
  position: absolute; bottom: 8px; right: 12px;
  font-size: 0.72rem; color: #bbb;
}
.pm-submit-btn {
  width: 100%; padding: 10px 0;
  background: linear-gradient(135deg, #1976d2, #1565c0);
  color: #fff; border: none; border-radius: 10px;
  font-size: 0.95rem; font-weight: 700; cursor: pointer;
  transition: all 0.25s;
}
.pm-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.pm-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.pm-success {
  display: none; text-align: center; padding: 20px 0;
}
.pm-success-icon { font-size: 2.5rem; margin-bottom: 8px; }
.pm-success p { color: #43a047; font-size: 0.95rem; font-weight: 600; }

/* 暗色模式适配 */
body.dark .pm-modal { background: #1e1e2f; }
body.dark .pm-header { border-bottom-color: #2a2a3d; }
body.dark .pm-header h3 { color: #e0e0e0; }
body.dark .pm-receiver-label { color: #aaa; }
body.dark .pm-receiver-label span { color: #90caf9; }
body.dark .pm-form-group textarea {
  background: #2a2a3d; border-color: #3a3a4d; color: #e0e0e0;
}
body.dark .pm-form-group textarea:focus { border-color: #90caf9; }
body.dark .pm-success p { color: #66bb6a; }
body.dark .gb-follow-btn { color: #90caf9; background: rgba(144,202,249,0.08); border-color: rgba(144,202,249,0.2); }
body.dark .gb-follow-btn:hover { background: #1976d2; color: #fff; }
body.dark .gb-follow-btn.followed { color: #66bb6a; background: rgba(102,187,106,0.08); border-color: rgba(102,187,106,0.25); }
body.dark .gb-pm-btn { color: #ce93d8; background: rgba(206,147,216,0.08); border-color: rgba(206,147,216,0.2); }

@keyframes lm-flash {
  0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 99, 102, 241), 0.5); }
  30% { box-shadow: 0 0 0 8px rgba(var(--primary-rgb, 99, 102, 241), 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 99, 102, 241), 0); }
}

/* ========== 心跳气泡（联系管理员）—— 重新美化 ========== */
.contact-bubble {
  position: fixed;
  right: 28px;
  bottom: 80px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

/* 外层光晕 */
.contact-bubble::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.12) 0%, transparent 70%);
  animation: bubbleGlow 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bubbleGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.contact-bubble .bubble-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bubble-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.45), 0 0 0 6px rgba(var(--primary-rgb), 0.08);
  position: relative;
  animation: bubbleBeat 2.2s ease-in-out infinite;
  transition: transform 0.3s, box-shadow 0.3s;
}

.contact-bubble:hover .bubble-icon {
  transform: scale(1.12);
  box-shadow: 0 8px 36px rgba(var(--primary-rgb), 0.55), 0 0 0 10px rgba(var(--primary-rgb), 0.12);
}

.contact-bubble:hover .bubble-icon::before,
.contact-bubble:hover .bubble-icon::after {
  animation-play-state: paused;
}

/* 双层脉冲圆环 */
.contact-bubble .bubble-icon::before,
.contact-bubble .bubble-icon::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(var(--primary-rgb), 0.4);
  animation: pulseRingOut 2.2s ease-out infinite;
  pointer-events: none;
}

.contact-bubble .bubble-icon::after {
  animation-delay: 0.55s;
}

@keyframes bubbleBeat {
  0%, 20%, 100% { transform: scale(1); }
  8% { transform: scale(1.08); }
  14% { transform: scale(1); }
}

@keyframes pulseRingOut {
  0% { transform: scale(1); opacity: 0.7; }
  50% { opacity: 0.15; }
  100% { transform: scale(2); opacity: 0; }
}

.contact-bubble .bubble-label {
  margin-top: 10px;
  background: rgba(30, 30, 46, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 0.78rem;
  padding: 6px 16px;
  border-radius: 24px;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

.contact-bubble:hover .bubble-label {
  background: rgba(var(--primary-rgb), 0.9);
  box-shadow: 0 6px 24px rgba(var(--primary-rgb), 0.35);
  transform: translateY(-2px);
}

/* ========== 联系管理员弹窗 ========== */
.contact-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s;
}

.contact-modal-overlay.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.contact-modal {
  background: #fff;
  border-radius: 20px;
  width: 440px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: contactSlide 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

@keyframes contactSlide {
  from { opacity: 0; transform: translateY(-30px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.contact-modal .cm-header {
  background: var(--bubble-gradient);
  padding: 28px 28px 22px;
  border-radius: 20px 20px 0 0;
  position: relative;
}

.contact-modal .cm-header .cm-icon { font-size: 2rem; margin-bottom: 8px; }
.contact-modal .cm-header h3 { color: #fff; font-size: 1.2rem; font-weight: 700; }
.contact-modal .cm-header p { color: rgba(255,255,255,0.8); font-size: 0.85rem; margin-top: 4px; }

.contact-modal .cm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.contact-modal .cm-close:hover { background: rgba(255,255,255,0.35); }

.contact-modal .cm-body { padding: 24px 28px; }

.cm-form-group { margin-bottom: 16px; }
.cm-form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.cm-form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
.cm-form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.08);
  background: var(--card-bg);
}
.cm-form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}
.cm-form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.08), 0 4px 16px rgba(var(--primary-rgb), 0.06);
  background: var(--card-bg);
}
.cm-form-group textarea::placeholder {
  color: #aaa;
  transition: color 0.25s;
}
.cm-form-group textarea:focus::placeholder {
  color: #ccc;
}

.cm-submit-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--bubble-gradient);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  font-family: inherit;
}
.cm-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.cm-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.cm-success {
  text-align: center;
  padding: 20px 0;
  display: none;
}
.cm-success.active { display: block; }
.cm-success .success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: bounceIn 0.5s ease-out;
}
.cm-success p { color: var(--text); font-size: 0.95rem; }

@keyframes bounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ========== 移动端适配补充 ========== */
/* 768px 以下主要规则已在上方统一定义，此处仅补充局部细节 */

/* ========== 留言本 — 大气全宽风格 ========== */

/* 外层全宽容器 */
.guestbook-wrapper {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(var(--primary-rgb), 0.02) 8%, rgba(var(--primary-rgb), 0.04) 50%, var(--bg) 100%);
  padding: 32px 0 48px;
  margin-top: 0;
  position: relative;
}
.guestbook-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.3;
}
.guestbook-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部 */
.guestbook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.gb-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gb-header-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.guestbook-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.gb-header-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--bubble-gradient);
  padding: 5px 14px;
  border-radius: 20px;
}
.gb-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gb-user-name-display {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card-bg);
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 写留言按钮 */
.guestbook-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: 24px;
  background: var(--bubble-gradient);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
  letter-spacing: 0.02em;
}
.guestbook-post-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(var(--primary-rgb), 0.4);
}

/* 工具栏 */
.gb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  background: var(--card-bg);
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
}

/* 分类标签 */
.gb-category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gb-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  font-family: inherit;
}
.gb-cat-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.04);
}
.gb-cat-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}
.gb-cat-count {
  font-size: 0.65rem;
  background: rgba(255,255,255,0.3);
  padding: 1px 6px;
  border-radius: 8px;
}

/* 排序栏 */
.gb-sort-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg);
  border-radius: 14px;
  padding: 3px;
  border: 1px solid var(--border);
}
.gb-sort-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  font-weight: 600;
}
.gb-sort-tab:hover { color: var(--primary); }
.gb-sort-tab.active {
  color: #fff;
  background: var(--bubble-gradient);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.2);
}

/* ====== 留言卡片（现代化卡片风格） ====== */
.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guestbook-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid rgba(128,128,128,0.06);
  transition: all 0.3s;
  cursor: pointer;
}
.guestbook-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  border-color: rgba(var(--primary-rgb), 0.15);
  transform: translateY(-2px);
}
.guestbook-card.pinned {
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), var(--card-bg));
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.08);
}

/* 头像 */
.gb-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bubble-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(var(--primary-rgb), 0.2);
}

/* 右侧内容区 */
.gb-card-body {
  flex: 1;
  min-width: 0;
}

/* 用户行 */
.gb-user-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.gb-user-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.gb-pin-badge {
  font-size: 0.7rem;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(245,158,11,0.2);
}
.gb-cat-badge {
  font-size: 0.72rem;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.gb-time {
  font-size: 0.75rem;
  color: #aaa;
  margin-left: auto;
  flex-shrink: 0;
}

/* 留言正文 */
.gb-content {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
  word-break: break-word;
  margin-bottom: 12px;
}

/* 底部操作栏 */
.gb-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(128,128,128,0.06);
}

.gb-like-btn, .gb-fav-btn, .gb-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.25s;
  color: var(--text-secondary);
}
.gb-like-btn:hover {
  color: #ff4757;
  border-color: #ff4757;
  background: rgba(255,71,87,0.04);
}
.gb-like-btn.liked {
  color: #ff4757;
  border-color: #ff4757;
  background: rgba(255,71,87,0.06);
}
.gb-fav-btn:hover {
  color: #f59e0b;
  border-color: #f59e0b;
  background: rgba(245,158,11,0.04);
}
.gb-fav-btn.favored {
  color: #f59e0b;
  border-color: #f59e0b;
  background: rgba(245,158,11,0.06);
}
.gb-reply-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.04);
}
.gb-like-icon, .gb-fav-icon {
  font-size: 0.95rem;
}
.gb-like-btn.liked .gb-like-icon,
.gb-fav-btn.favored .gb-fav-icon {
  animation: gbLikePop 0.35s ease;
}
@keyframes gbLikePop {
  0% { transform: scale(1); }
  30% { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.gb-reply-count {
  font-size: 0.7rem;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  border-radius: 10px;
  padding: 0 7px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
  line-height: 1.6;
}
.gb-views-info {
  font-size: 0.75rem;
  color: #bbb;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ====== 管理员回复 ====== */
.gb-reply.gb-reply-admin {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.04), rgba(var(--primary-rgb), 0.01));
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  margin-bottom: 8px;
  border-left: 4px solid var(--primary);
}
.gb-reply-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.gb-reply-admin-content {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.55;
}

/* ====== 公开评论（扁平对齐） ====== */
.gb-reply-thread.gb-reply-flat {
  margin-top: 8px;
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}
.gb-reply.gb-reply-public {
  padding: 10px 0;
  display: flex;
  gap: 10px;
  background: none;
}
.gb-reply-public + .gb-reply-public {
  border-top: 1px solid rgba(128,128,128,0.05);
}
.gb-reply-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.gb-reply-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.gb-reply-body { flex: 1; min-width: 0; }
.gb-reply-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}
.gb-reply-author {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.gb-reply-to {
  font-size: 0.72rem;
  color: #aaa;
  font-weight: 400;
}
.gb-reply-to strong { color: var(--primary); font-weight: 600; }
.gb-reply-time {
  font-size: 0.7rem;
  color: #bbb;
  margin-left: auto;
  flex-shrink: 0;
}
.gb-reply-content {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
}
.gb-reply-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.gb-reply-btn-sm {
  background: none;
  border: none;
  color: #999;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.2s;
  font-family: inherit;
}
.gb-reply-btn-sm:hover { color: var(--primary); }

/* 回复点赞 */
.gb-reply-like-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color 0.2s, transform 0.15s;
  font-family: inherit;
}
.gb-reply-like-btn:hover { color: #e74c3c; transform: scale(1.08); }
.gb-reply-like-btn.liked { color: #e74c3c; }
.gb-reply-like-btn.liked .gb-reply-like-icon { animation: replyLikePop 0.35s ease; }
@keyframes replyLikePop {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.gb-reply-like-icon { font-size: 0.84rem; display: inline-block; transition: transform 0.2s; }
.gb-reply-like-count { font-size: 0.7rem; color: inherit; }

/* 展开更多回复 */
.gb-expand-replies {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 2px;
  font-family: inherit;
}
.gb-expand-replies:hover { text-decoration: underline; }
.gb-expand-arrow { font-size: 0.65rem; transition: transform 0.2s; }
.gb-expand-arrow.open { transform: rotate(180deg); }

/* ====== 内联回复表单 ====== */
.gb-inline-reply {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(var(--primary-rgb), 0.02);
  border-radius: 12px;
  border: 1px solid rgba(128,128,128,0.06);
  display: none;
}
.gb-inline-reply.active { display: block; }
.gb-inline-reply .form-group {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.gb-inline-reply textarea {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 52px;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.gb-inline-reply textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.08);
  background: var(--card-bg);
}
.gb-inline-reply textarea::placeholder { color: #bbb; transition: color 0.25s; }
.gb-inline-reply-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}
.gb-inline-reply .btn-cancel {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.gb-inline-reply .btn-cancel:hover { background: var(--tag-bg); }
.gb-inline-reply .btn-submit {
  background: var(--bubble-gradient);
  border: none;
  color: #fff;
  padding: 6px 18px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}
.gb-inline-reply .btn-submit:hover { opacity: 0.85; transform: translateY(-1px); }
.gb-inline-reply .btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.gb-inline-login-hint {
  text-align: center;
  padding: 8px 0;
}
.gb-inline-login-hint span { font-size: 0.84rem; color: var(--text-secondary); }
.gb-inline-login-hint a {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-left: 4px;
}
.gb-inline-login-hint a:hover { text-decoration: underline; }

/* 空状态 */
.guestbook-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.guestbook-empty .icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.guestbook-empty p { font-size: 0.95rem; }

/* 用户认证弹窗 */
.user-auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.user-auth-switch a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}
.user-auth-switch a:hover { text-decoration: underline; }

/* 用户按钮 */
.gb-user-area { display: flex; align-items: center; gap: 6px; }
.gb-user-center-link {
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}
.gb-user-center-link:hover { color: var(--primary); }
.gb-user-btn {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark, #3b5bdb));
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}
.gb-user-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,109,245,0.3);
}
.gb-user-btn.gb-user-logout {
  background: var(--tag-bg);
  color: var(--text-secondary);
}
.gb-user-btn.gb-user-logout:hover {
  background: #ffcdd2;
  color: #c62828;
}

/* ====== 暗色模式适配 ====== */
body.dark .guestbook-wrapper {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(var(--primary-rgb), 0.03) 8%, rgba(var(--primary-rgb), 0.02) 50%, var(--bg) 100%);
}
body.dark .guestbook-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.05);
}
body.dark .guestbook-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  border-color: rgba(var(--primary-rgb), 0.2);
}
body.dark .gb-toolbar {
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  border-color: rgba(255,255,255,0.05);
}
body.dark .gb-user-name-display {
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
body.dark .guestbook-post-btn {
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.2);
}
body.dark .gb-action-row {
  border-top-color: rgba(255,255,255,0.04);
}
body.dark .gb-reply-public + .gb-reply-public {
  border-top-color: rgba(255,255,255,0.04);
}
body.dark .gb-inline-reply {
  background: rgba(var(--primary-rgb), 0.04);
  border-color: rgba(255,255,255,0.05);
}
body.dark .gb-inline-reply textarea:focus {
  background: rgba(255,255,255,0.04);
}
body.dark .guestbook-card.pinned {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.06), var(--card-bg));
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.12);
}
body.dark .gb-cat-tab { background: rgba(255,255,255,0.03); }
body.dark .gb-sort-bar { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.05); }
body.dark .gb-header-count { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
/* ========== 表情选择器 ========== */
.emoji-textarea-wrap {
  position: relative;
}

.emoji-textarea-wrap textarea {
  width: 100%;
  padding-right: 42px;
}

.emoji-trigger {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 1;
}

.emoji-trigger:hover {
  transform: scale(1.15);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

/* 前台表情面板 */
.emoji-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
}

.emoji-picker-overlay.active { display: block; }

.emoji-picker {
  position: fixed;
  width: 320px;
  max-height: 300px;
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: ep-slide-in 0.2s ease;
}

.emoji-picker.active { display: flex; }

@keyframes ep-slide-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ep-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.ep-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.ep-close {
  border: none;
  background: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.15s;
}

.ep-close:hover {
  background: var(--bg);
  color: var(--text);
}

.ep-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.ep-tabs::-webkit-scrollbar { display: none; }

.ep-tab {
  padding: 4px 10px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.ep-tab:hover {
  background: var(--bg);
  color: var(--text);
}

.ep-tab.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.ep-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ep-grid::-webkit-scrollbar { width: 6px; }
.ep-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.ep-item {
  font-size: 1.25rem;
  text-align: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s;
  user-select: none;
}

.ep-item:hover {
  background: var(--bg);
  transform: scale(1.25);
}

/* ========== 后台最新待回复留言面板 ========== */
.latest-msg-admin-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.lma-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.lma-icon { font-size: 1.2rem; }

.lma-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
}

.lma-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  animation: lma-count-pulse 2s ease-in-out infinite;
}

@keyframes lma-count-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.lma-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 1px;
  opacity: 0.2;
}

.lma-view-all {
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  transition: all 0.2s;
}

.lma-view-all:hover {
  opacity: 0.8;
  transform: translateX(2px);
}

.lma-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lma-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.lma-item:hover {
  border-color: rgba(var(--primary-rgb, 99, 102, 241), 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.lma-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.lma-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light, var(--primary)));
}

.lma-item-info {
  flex: 1;
  min-width: 0;
}

.lma-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lma-item-time {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.lma-contact {
  margin-left: 6px;
  color: var(--text-secondary);
}

.lma-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 500;
  background: var(--tag-bg, rgba(99, 102, 241, 0.1));
  color: var(--primary);
}

.lma-tag-pin { background: rgba(255, 107, 53, 0.12); color: #ff6b35; }
.lma-tag-warn { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.lma-item-content {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lma-item-actions {
  display: flex;
  gap: 8px;
}

/* 后台表情面板（复用前台样式） */
.admin-emoji-picker {
  width: 320px;
  max-height: 300px;
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  flex-direction: column;
  overflow: hidden;
  animation: ep-slide-in 0.2s ease;
}

.admin-emoji-picker .ep-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.admin-emoji-picker .ep-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.admin-emoji-picker .ep-close {
  border: none;
  background: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.15s;
}

.admin-emoji-picker .ep-close:hover {
  background: var(--bg);
  color: var(--text);
}

.admin-emoji-picker .ep-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-emoji-picker .ep-tabs::-webkit-scrollbar { display: none; }

.admin-emoji-picker .ep-tab {
  padding: 4px 10px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.admin-emoji-picker .ep-tab:hover {
  background: var(--bg);
  color: var(--text);
}

.admin-emoji-picker .ep-tab.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.admin-emoji-picker .ep-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.admin-emoji-picker .ep-grid::-webkit-scrollbar { width: 6px; }
.admin-emoji-picker .ep-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.admin-emoji-picker .ep-item {
  font-size: 1.25rem;
  text-align: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s;
  user-select: none;
}

.admin-emoji-picker .ep-item:hover {
  background: var(--bg);
  transform: scale(1.25);
}

/* ========== 暗夜紫主题特殊适配 ========== */
[data-theme="midnight"] .announcement-bar {
  background: linear-gradient(90deg, #2d2d44, #1a1a2e, #2d2d44);
  border-bottom-color: var(--border);
}

[data-theme="midnight"] .announcement-label {
  background: linear-gradient(90deg, var(--border), var(--card-bg));
  color: var(--primary-light);
  border-right-color: var(--border);
}

[data-theme="midnight"] .announcement-item {
  color: var(--text-secondary);
}

[data-theme="midnight"] .announcement-item .ann-title {
  color: var(--primary-light);
}

[data-theme="midnight"] .search-input-wrap input::placeholder {
  color: #6b7280;
}

[data-theme="midnight"] .contact-modal {
  background: var(--card-bg);
}

[data-theme="midnight"] .cm-form-group input,
[data-theme="midnight"] .cm-form-group textarea {
  background: var(--bg);
  color: var(--text);
}

[data-theme="midnight"] .cm-form-group input::placeholder,
[data-theme="midnight"] .cm-form-group textarea::placeholder {
  color: #6b7280;
}

/* ========== 全部公告列表弹窗 ========== */
.announcement-detail-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s;
}

.announcement-detail-overlay.active { display: flex; }

.announcement-list-card {
  background: #fff;
  border-radius: 16px;
  width: 620px;
  max-width: 94vw;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: contactSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ann-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  position: relative;
}

.ann-list-header-icon {
  font-size: 1.5rem;
}

.ann-list-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.ann-list-count {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--tag-bg);
  padding: 2px 10px;
  border-radius: 12px;
  margin-left: 4px;
}

.ann-list-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0,0,0,0.06);
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.ann-list-close:hover { background: rgba(0,0,0,0.15); }

.ann-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
}

/* 每条公告 */
.ann-list-item {
  padding: 16px 24px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s;
}

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

.ann-list-item:hover {
  background: #fafafa;
}

.ann-list-item-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.ann-list-item-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ann-list-item-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.ann-list-item-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  margin-left: 8px;
}

.ann-list-item-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 32px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ann-list-item-footer {
  padding-left: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ann-list-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  background: var(--bubble-gradient);
  color: #fff;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.ann-list-link:hover { opacity: 0.85; transform: translateY(-1px); }
.ann-list-link.hidden { display: none; }

/* 暗夜紫公告列表适配 */
[data-theme="midnight"] .announcement-list-card {
  background: var(--card-bg);
}
[data-theme="midnight"] .ann-list-header {
  border-bottom-color: var(--border);
}
[data-theme="midnight"] .ann-list-item {
  border-bottom-color: var(--border);
}
[data-theme="midnight"] .ann-list-item:hover {
  background: rgba(255,255,255,0.03);
}
[data-theme="midnight"] .ann-list-close {
  background: rgba(255,255,255,0.1);
  color: var(--text-secondary);
}
[data-theme="midnight"] .ann-list-close:hover { background: rgba(255,255,255,0.2); }

/* 移动端公告列表适配 — 已在上方 480px 块中处理 */

/* theme-dropdown 移动端 — 已在上方统一 480px 块中处理 */

/* 移动端搜索栏 — 已在上方 768px/480px 块中统一处理 */
