/* BJNO5EXCSW 主样式 - 红白配色 · 华丽庄重 · 动态几何背景 */
/* 字体由 layout.ejs 的 link 预加载 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --crimson-deep: #8b0000;
  --crimson: #b71c1c;
  --crimson-light: #d32f2f;
  --crimson-pale: #ffcdd2;
  --snow: #fffafa;
  --ivory: #fffff0;
  --shadow-soft: rgba(139, 0, 0, 0.08);
  --shadow-mid: rgba(139, 0, 0, 0.15);
  --shadow-strong: rgba(139, 0, 0, 0.25);
}

body.page-body {
  margin: 0;
  font-family: 'Noto Serif SC', 'ZCOOL XiaoWei', 'PingFang SC', 'Microsoft YaHei', serif;
  /* 红白主背景：白底 + 红色渐变块 */
  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 15%, #ffebee 35%, #ffe0e0 50%, #ffebee 70%, #fff5f5 85%, #ffffff 100%);
  color: #1a0a0a;
  overflow-x: hidden;
  position: relative;
}

/* 动态几何背景层 - 红白交织 */
body.page-body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 50% 40% at 10% 20%, rgba(183, 28, 28, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 90% 80%, rgba(211, 47, 47, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, transparent 40%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.6) 0px, rgba(255,255,255,0.6) 1px, transparent 1px, transparent 60px),
    repeating-linear-gradient(-45deg, rgba(255,235,238,0.5) 0px, rgba(255,235,238,0.5) 1px, transparent 1px, transparent 80px);
  animation: bgShift 20s ease-in-out infinite alternate;
}

body.page-body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 200px 150px at 15% 20%, rgba(255, 205, 210, 0.4) 0%, transparent 70%),
    radial-gradient(ellipse 180px 200px at 85% 80%, rgba(255, 224, 224, 0.35) 0%, transparent 65%),
    radial-gradient(circle 120px at 50% 50%, rgba(255, 250, 250, 0.5) 0%, transparent 60%);
  animation: bgFloat 25s ease-in-out infinite;
}

@keyframes bgShift {
  0% { opacity: 0.7; transform: scale(1) rotate(0deg); }
  100% { opacity: 1; transform: scale(1.02) rotate(0.5deg); }
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, 1%) rotate(0.3deg); }
  66% { transform: translate(-1%, 2%) rotate(-0.2deg); }
}

/* 几何装饰元素 - 浮动动画 */
.geom-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.geom-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(183, 28, 28, 0.08);
  animation: geomFloat 18s ease-in-out infinite;
}

.geom-1 { width: 320px; height: 320px; top: -80px; right: -80px; animation-delay: 0s; }
.geom-2 { width: 200px; height: 200px; bottom: 10%; left: -60px; animation-delay: -6s; }
.geom-3 { width: 120px; height: 120px; top: 40%; right: 15%; animation-delay: -12s; }

.geom-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(183, 28, 28, 0.06), transparent);
  animation: geomLineMove 22s linear infinite;
}

.geom-l1 { width: 60%; top: 25%; left: -20%; transform: rotate(-15deg); animation-delay: 0s; }
.geom-l2 { width: 50%; bottom: 30%; right: -15%; transform: rotate(10deg); animation-delay: -11s; }

.geom-hex {
  position: absolute;
  width: 80px;
  height: 46px;
  background: transparent;
  border: 1px solid rgba(211, 47, 47, 0.05);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: geomRotate 25s linear infinite;
}

.geom-h1 { top: 60%; left: 5%; animation-delay: 0s; }
.geom-h2 { bottom: 20%; right: 8%; animation-delay: -8s; }

@keyframes geomFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  25% { transform: translate(15px, -10px) scale(1.02); opacity: 0.8; }
  50% { transform: translate(-10px, 15px) scale(0.98); opacity: 0.5; }
  75% { transform: translate(-5px, -5px) scale(1.01); opacity: 0.7; }
}

@keyframes geomLineMove {
  0% { transform: translateX(-100%) rotate(-15deg); }
  100% { transform: translateX(100vw) rotate(-15deg); }
}

.geom-l2 {
  animation-name: geomLineMove2;
}

@keyframes geomLineMove2 {
  0% { transform: translateX(100vw) rotate(10deg); }
  100% { transform: translateX(-100%) rotate(10deg); }
}

@keyframes geomRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.page-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* 顶部导航 - 庄重红，滚动时透明度变化 */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--crimson-deep) 0%, var(--crimson) 50%, #a01515 100%);
  color: #fff;
  box-shadow: 0 6px 24px var(--shadow-strong), 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: hidden;
  transition: background 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
  opacity: var(--header-opacity, 1);
}

.site-header.header-scrolled {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.95) 0%, rgba(183, 28, 28, 0.95) 50%, rgba(160, 21, 21, 0.95) 100%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
  animation: headerShine 4s ease-in-out infinite;
}

@keyframes headerShine {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.logo {
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 3px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from { text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
  to { text-shadow: 0 2px 12px rgba(255,255,255,0.15), 0 2px 8px rgba(0,0,0,0.2); }
}

.main-nav a,
.main-nav span.nav-user {
  color: #ffecec;
  margin-left: 16px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0.6));
  transition: width 0.3s ease;
}

.main-nav a:hover {
  opacity: 1;
  transform: translateY(-2px);
  color: #fff;
}

.main-nav a:hover::after {
  width: 100%;
}

.site-main {
  flex: 1;
  padding: 28px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  scroll-margin-top: 70px;
}

/* 卡片 - 优雅入场 */
.card {
  background: linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(255,250,250,0.99) 100%);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 16px 48px var(--shadow-soft), 0 4px 16px rgba(139,0,0,0.04);
  animation: cardReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  border: 1px solid rgba(255, 235, 238, 0.8);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--crimson-light), transparent);
  opacity: 0.6;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 排版层级 - clamp 动态字号 + 紧凑字间距 */
.card h2,
.page-title {
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 3px;
  color: var(--crimson-deep);
}

.card h3,
.section-title {
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-weight: 600;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  letter-spacing: 2px;
  color: var(--crimson);
  position: relative;
  padding-left: 14px;
}

.card h3::before,
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, var(--crimson-light), var(--crimson));
  border-radius: 2px;
}

.subtitle-deco {
  position: relative;
  display: inline-block;
}

.subtitle-deco::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--crimson-light), transparent);
  border-radius: 1px;
}

/* 首页英雄区 */
.hero-card {
  background: linear-gradient(135deg, rgba(255, 235, 238, 0.95) 0%, rgba(255, 255, 255, 0.98) 50%, rgba(255, 245, 245, 0.95) 100%);
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 24px 64px var(--shadow-mid), 0 8px 24px rgba(139,0,0,0.08);
  color: var(--crimson-deep);
  border: 1px solid rgba(255, 205, 210, 0.6);
  position: relative;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(211,47,47,0.1), transparent, rgba(183,28,28,0.08));
  z-index: -1;
  animation: heroBorderPulse 4s ease-in-out infinite;
}

@keyframes heroBorderPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.hero-card h1 {
  margin-top: 0;
  font-size: 36px;
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-weight: 700;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--crimson-deep), var(--crimson-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleReveal 1s ease-out forwards;
}

@keyframes titleReveal {
  from {
    opacity: 0;
    letter-spacing: 8px;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    letter-spacing: 4px;
    transform: translateY(0);
  }
}

.hero-card p,
.hero-subtitle {
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 3px;
  animation: textFadeIn 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.hero-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--crimson-light), var(--crimson));
  margin: 20px 0;
  border-radius: 2px;
  animation: dividerReveal 1s ease-out 0.4s forwards;
  opacity: 0;
  transform-origin: left;
}

@keyframes dividerReveal {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 0.9; transform: scaleX(1); }
}

@keyframes textFadeIn {
  to { opacity: 1; }
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2px;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, background 0.35s ease;
}

.btn:active,
.btn.btn-active {
  transform: scale(0.94);
  transition-duration: 0.1s;
}

.btn.primary {
  background: linear-gradient(135deg, var(--crimson-light), var(--crimson));
  color: #fff;
  box-shadow: 0 8px 24px rgba(211, 47, 47, 0.4);
}

.btn.primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(211, 47, 47, 0.5);
}

.btn.primary:active,
.btn.primary.btn-active {
  transform: translateY(-1px) scale(0.96);
}

.btn.ghost {
  background: rgba(255,255,255,0.9);
  color: var(--crimson);
  border: 2px solid rgba(211, 47, 47, 0.4);
}

.btn.ghost:hover {
  background: rgba(255, 245, 245, 0.98);
  transform: translateY(-2px);
  border-color: var(--crimson-light);
}

.btn.ghost:active,
.btn.ghost.btn-active {
  transform: scale(0.96);
}

/* 表单 */
.form-vertical label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--crimson-deep);
}

.form-vertical input,
.form-vertical select,
.form-vertical textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(139, 0, 0, 0.12);
  outline: none;
  transition: all 0.3s ease;
  font-size: 15px;
  font-family: inherit;
}

.form-vertical input:focus,
.form-vertical select:focus,
.form-vertical textarea:focus {
  border-color: var(--crimson-light);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.form-horizontal {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.form-horizontal input {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(139, 0, 0, 0.12);
}

/* 提示框 - 状态专属微交互 */
.alert {
  padding: 12px 16px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 14px;
  letter-spacing: 0.5px;
  animation: alertIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes alertIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.alert.error {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  color: var(--crimson-deep);
  border: 1px solid rgba(183, 28, 28, 0.2);
}

.alert.success {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  color: #1b5e20;
}

.alert.info {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #0d47a1;
}

/* 空状态 - 图标摇摆 */
.empty-state {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.empty-state.empty-visible {
  opacity: 1;
  transform: translateY(0);
}

.empty-state-icon {
  font-size: 48px;
  display: inline-block;
  margin-bottom: 12px;
  animation: emptySway 2.5s ease-in-out infinite;
}

@keyframes emptySway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* 加载中 - 逐字出现 */
.loading-text {
  overflow: hidden;
}

.loading-text span {
  display: inline-block;
  opacity: 0;
  animation: charReveal 0.3s ease forwards;
}

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

/* 滚动分层渐显 */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 列表项逐项延迟 - 父级 revealed 时子项按 data-stagger 依次出现 */
.post-list.revealed .post-item,
.record-list.revealed .record-item,
.link-grid.revealed .link-card,
.banner-list.revealed .banner-item {
  opacity: 1;
  transform: translateY(0);
}

.post-item,
.record-item,
.link-card,
.banner-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

.post-item.revealed,
.record-item.revealed,
.link-card.revealed,
.banner-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 卡片/链接点击弹性 */
.link-card:active,
.link-card.btn-active,
.banner-item:active,
.banner-item.btn-active,
.admin-link:active,
.admin-link.btn-active {
  transform: scale(0.98);
}

/* 保密号展示 */
.secret-code-display {
  font-size: 28px;
  font-family: 'ZCOOL XiaoWei', monospace;
  letter-spacing: 6px;
  padding: 16px 24px;
  border-radius: 20px;
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  color: #ffeb3b;
  display: inline-block;
  margin: 14px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  animation: secretPulse 2s ease-in-out infinite;
}

@keyframes secretPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1); }
  50% { box-shadow: 0 12px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.15); }
}

/* 轮播/链接卡片 */
.home-banners h2,
.home-links h2 {
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--crimson-deep);
  margin-bottom: 16px;
  animation: slideUp 0.5s ease-out forwards;
}

.home-banners .banner-list {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
}

.banner-item {
  min-width: 220px;
  border-radius: 20px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 12px 36px var(--shadow-soft);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px var(--shadow-mid);
}

.banner-item img {
  width: 100%;
  display: block;
}

.banner-title {
  padding: 10px 14px;
  font-weight: 500;
  letter-spacing: 1px;
}

.home-links .link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.link-card {
  display: block;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,250,250,0.98));
  box-shadow: 0 10px 28px var(--shadow-soft);
  text-decoration: none;
  color: var(--crimson);
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 235, 238, 0.8);
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px var(--shadow-mid);
  color: var(--crimson-deep);
}

/* 贴吧 */
.post-list {
  list-style: none;
  padding-left: 0;
}

.post-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(139, 0, 0, 0.06);
  transition: background 0.3s ease;
}

.post-item:hover {
  background: rgba(255, 245, 245, 0.5);
}

.post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(90, 50, 50, 0.7);
  letter-spacing: 0.5px;
}

.post-content {
  margin-top: 6px;
  white-space: pre-line;
  line-height: 1.7;
  letter-spacing: 0.5px;
}

/* 表格 */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(139, 0, 0, 0.06);
}

.table th {
  font-weight: 600;
  color: var(--crimson-deep);
  letter-spacing: 1px;
}

.ding-help img {
  width: 100%;
  max-width: 440px;
  border-radius: 18px;
  box-shadow: 0 16px 40px var(--shadow-mid);
  margin: 14px 0;
}

/* 管理后台 */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.admin-link {
  display: block;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fce4ec, #f8bbd9);
  color: #880e4f;
  text-decoration: none;
  text-align: center;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: 1px solid rgba(136, 14, 79, 0.15);
}

.admin-grid .admin-link {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.45s ease, box-shadow 0.3s ease;
}

.admin-grid.revealed .admin-link {
  opacity: 1;
  transform: translateY(0);
}

.admin-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(136, 14, 79, 0.2);
}

.admin-stats p {
  margin: 5px 0;
  letter-spacing: 0.5px;
}

.admin-dashboard {
  background: linear-gradient(135deg, rgba(255, 247, 250, 0.98), rgba(252, 228, 236, 0.98));
  border-radius: 28px;
  box-shadow: 0 22px 60px var(--shadow-mid), 0 8px 24px rgba(136, 14, 79, 0.15);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-subtitle {
  margin: 0;
  font-size: 14px;
  color: rgba(90, 30, 50, 0.85);
}

.admin-logout-btn {
  white-space: nowrap;
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-stat-card {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(244, 143, 177, 0.5);
  box-shadow: 0 8px 20px rgba(136, 14, 79, 0.08);
}

.admin-stat-label {
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(90, 30, 50, 0.7);
}

.admin-stat-value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  color: #880e4f;
}

/* 入场动画 */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.slide-up {
  opacity: 0;
  transform: translateY(28px);
  animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.slide-up.delay-1 {
  animation-delay: 0.12s;
}

.slide-up.delay-2 {
  animation-delay: 0.24s;
}

.slide-up.delay-3 {
  animation-delay: 0.36s;
}

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

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

/* 炸裂增强 - 抽象/帅气 */
::selection {
  background: rgba(183, 28, 28, 0.25);
  color: #1a0a0a;
}

.card:hover {
  box-shadow: 0 20px 56px var(--shadow-mid), 0 8px 24px rgba(139,0,0,0.06);
  transition: box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-vertical input:focus,
.form-vertical select:focus,
.form-vertical textarea:focus {
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15), 0 0 24px rgba(211, 47, 47, 0.08);
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.link-card {
  position: relative;
}

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

.hero-card h1 {
  position: relative;
  filter: drop-shadow(0 2px 8px rgba(139, 0, 0, 0.15));
}

/* 表格行动效 */
.table tbody tr {
  transition: background 0.25s ease, transform 0.25s ease;
}

.table tbody tr:hover {
  background: rgba(255, 245, 245, 0.6);
}

.error-state-card {
  text-align: center;
}

.error-state-card .empty-state-icon {
  margin-bottom: 16px;
}

/* 个人中心 */
.user-center-card .user-welcome {
  margin-bottom: 20px;
  font-size: 15px;
  letter-spacing: 1px;
  color: #5c3a3a;
}

.user-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.user-info-item {
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 245, 245, 0.8);
  border: 1px solid rgba(255, 205, 210, 0.5);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-info-item.user-info-points .user-info-value {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--crimson);
}

.user-info-label {
  font-size: 12px;
  color: rgba(90, 50, 50, 0.7);
  letter-spacing: 1px;
}

.user-info-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--crimson-deep);
}

.user-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* 首页快捷链接区（内部跳转） */
.home-quick-links {
  margin-bottom: 32px;
}

.home-quick-links h2 {
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--crimson-deep);
  margin-bottom: 16px;
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.home-quick-grid a {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,250,250,0.98));
  box-shadow: 0 8px 24px var(--shadow-soft);
  text-decoration: none;
  color: var(--crimson);
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 235, 238, 0.8);
  text-align: center;
}

.home-quick-grid a:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px var(--shadow-mid);
  color: var(--crimson-deep);
}

/* 动态小方块容器 - 仅首页背景 */
.floating-squares-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-square {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  transition: background-color 1s ease;
}

/* 导航汉堡按钮 - 默认隐藏 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  z-index: 101;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 响应式 - 手机版 */
@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .nav-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  .main-nav {
    order: 3;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    transition: max-height 0.35s ease;
  }

  .main-nav.nav-open {
    max-height: 400px;
  }

  .main-nav[aria-hidden="false"] {
    max-height: 400px;
  }

  .main-nav a,
  .main-nav span.nav-user {
    margin: 10px 0;
    margin-left: 0;
    padding: 8px 0;
    font-size: 15px;
  }

  .logo {
    font-size: 18px;
    letter-spacing: 2px;
  }
}

@media (max-width: 600px) {
  .site-main {
    padding: 16px 14px;
  }

  .hero-card {
    padding: 24px 18px;
  }

  .hero-card h1 {
    font-size: 24px;
    letter-spacing: 2px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .card {
    padding: 20px 16px;
  }

  .home-banners .banner-item {
    min-width: 180px;
  }

  .home-links .link-grid {
    grid-template-columns: 1fr 1fr;
  }

  .link-card {
    padding: 14px 12px;
    font-size: 14px;
  }

  .form-vertical input,
  .form-vertical select,
  .form-vertical textarea {
    padding: 12px 14px;
    font-size: 16px; /* 防止 iOS 缩放 */
  }

  .btn {
    padding: 12px 20px;
    min-height: 44px; /* 触摸友好 */
  }

  .user-info-grid {
    grid-template-columns: 1fr;
  }

  .user-actions {
    flex-direction: column;
  }

  .user-actions .btn {
    width: 100%;
  }

  .home-quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .table {
    font-size: 13px;
  }

  .table th,
  .table td {
    padding: 10px 8px;
  }

  .secret-code-display {
    font-size: 20px;
    letter-spacing: 4px;
    padding: 12px 18px;
  }
}

/* 摸鱼打卡分区样式 */
.tabs {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 245, 245, 0.8);
  border-radius: 16px;
}

.tab {
  padding: 8px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: #8b0000;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.tab:hover {
  background: rgba(211, 47, 47, 0.1);
}

.tab.active {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: #fff;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}

.tag-fishing {
  background: linear-gradient(135deg, #ffd54f, #ffb300);
  color: #5d4037;
}

.tag-section {
  background: rgba(211, 47, 47, 0.1);
  color: #b71c1c;
}

/* 帖子操作按钮 */
.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.post-actions {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(139, 0, 0, 0.06);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #5c3a3a;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: rgba(255, 205, 210, 0.4);
  transform: translateY(-2px);
}

.action-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.action-icon.liked {
  animation: likePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes likePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.action-count {
  font-weight: 600;
  color: #8b0000;
}

.action-text {
  font-size: 13px;
}

/* 评论区样式 */
.comment-section {
  margin-top: 14px;
  padding: 14px;
  background: rgba(255, 245, 245, 0.6);
  border-radius: 16px;
  animation: fadeIn 0.3s ease;
}

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

.comment-input {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.comment-input input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(139, 0, 0, 0.15);
  outline: none;
  font-size: 14px;
}

.comment-input input:focus {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(139, 0, 0, 0.06);
}

.comment-author {
  font-weight: 600;
  color: #8b0000;
  font-size: 13px;
}

.comment-time {
  font-size: 12px;
  color: rgba(90, 50, 50, 0.6);
  margin-left: 8px;
}

.comment-item p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.6;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: modalFadeIn 0.2s ease;
}

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

.modal-content {
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  width: 90%;
  max-width: 420px;
  animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-content h3 {
  margin: 0 0 16px;
  color: #8b0000;
  font-size: 18px;
}

.modal-content textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(139, 0, 0, 0.15);
  outline: none;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.modal-content textarea:focus {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-end;
}

/* 登录页面样式 */
.login-card {
  max-width: 400px;
  margin: 0 auto;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-header h2 {
  margin-bottom: 8px;
}

.login-header p {
  color: rgba(90, 50, 50, 0.7);
  font-size: 14px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #8b0000;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(139, 0, 0, 0.15);
  outline: none;
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-group input:focus {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.attempts-left {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #d32f2f;
}

.login-btn {
  width: 100%;
  margin-top: 8px;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(139, 0, 0, 0.06);
}

.login-footer a {
  color: #d32f2f;
  text-decoration: none;
  font-weight: 500;
}

.login-footer a:hover {
  text-decoration: underline;
}

.funny-error {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2) !important;
  border-color: rgba(255, 152, 0, 0.3) !important;
}

.error-icon {
  margin-right: 8px;
}

.recovery-hint {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint-icon {
  font-size: 16px;
}

/* 个人中心样式 */
.user-center-card {
  max-width: 600px;
  margin: 0 auto;
}

.user-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(139, 0, 0, 0.08);
}

.user-avatar {
  position: relative;
  width: 80px;
  height: 80px;
}

.avatar-icon {
  font-size: 50px;
}

.avatar-badges {
  position: absolute;
  bottom: -4px;
  right: -4px;
}

.badge {
  font-size: 20px;
  animation: badgeBounce 2s ease-in-out infinite;
}

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

.user-name {
  margin: 0;
  font-size: 22px;
  color: #8b0000;
}

.user-title {
  margin: 4px 0 0;
  color: rgba(90, 50, 50, 0.7);
  font-size: 14px;
}

/* 侧栏用户名下的等级称号徽章（侧栏是红色渐变底，故用半透明白 + 白字保证对比度） */
.user-level {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 12px; font-weight: 600;
  cursor: default;
}

.user-level-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  color: #b71c1c;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}

.user-level-name { color: #fff; }

.user-stats {
  display: grid;
  /* 侧栏只展示三项：帖子 / 积分 / 等级 */
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.stat-item {
  text-align: center;
  padding: 14px;
  background: rgba(255, 245, 245, 0.6);
  border-radius: 16px;
}

/* 侧栏三列较窄，避免「积分」这类两字标签被折行 */
.user-stats .stat-label { white-space: nowrap; }

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #8b0000;
}

.stat-label {
  font-size: 12px;
  color: rgba(90, 50, 50, 0.7);
  letter-spacing: 1px;
}

.stat-highlight .stat-value {
  color: #d32f2f;
}

.medal-section {
  margin: 20px 0;
}

.medal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.medal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 245, 245, 0.9));
  border-radius: 16px;
  border: 1px solid rgba(255, 205, 210, 0.6);
  box-shadow: 0 4px 16px rgba(139, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.medal-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(139, 0, 0, 0.1);
}

.medal-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.medal-name {
  font-size: 13px;
  font-weight: 500;
  color: #8b0000;
}

.empty-medals {
  text-align: center;
  padding: 30px;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-medals p {
  margin: 6px 0;
}

.empty-medals .hint {
  font-size: 14px;
  color: rgba(90, 50, 50, 0.6);
}

.achievements-link {
  margin: 16px 0;
}

.btn-block {
  width: 100%;
}

.user-info-section {
  margin-top: 20px;
}

.user-info-section .user-info-grid {
  margin: 14px 0;
}

/* 成就墙样式 */
.achievements-card {
  max-width: 500px;
  margin: 0 auto;
}

.achievements-header {
  text-align: center;
  margin-bottom: 24px;
}

.subtitle {
  color: rgba(90, 50, 50, 0.7);
  font-size: 15px;
  margin-top: 8px;
}

.achievements-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 24px;
}

.stat-badge {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #d32f2f;
}

.stat-desc {
  font-size: 13px;
  color: rgba(90, 50, 50, 0.7);
}

.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.achievement-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 245, 245, 0.95));
  border-radius: 18px;
  border: 1px solid rgba(255, 205, 210, 0.5);
  box-shadow: 0 4px 16px rgba(139, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(10px);
  animation: achievementReveal 0.5s ease forwards;
}

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

.achievement-icon {
  font-size: 32px;
}

.achievement-content {
  flex: 1;
}

.achievement-title {
  margin: 0 0 6px;
  font-size: 16px;
  color: #8b0000;
}

.achievement-desc {
  margin: 0;
  font-size: 14px;
  color: rgba(90, 50, 50, 0.8);
}

.achievement-detail {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(90, 50, 50, 0.6);
  font-style: italic;
}

.achievements-message {
  text-align: center;
  margin: 24px 0;
  padding: 16px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-radius: 16px;
}

.achievements-message p {
  margin: 0;
  color: #8d6e63;
  font-size: 15px;
}

.empty-achievements {
  text-align: center;
  padding: 40px 20px;
}

.empty-achievements .empty-icon {
  font-size: 50px;
  margin-bottom: 16px;
}

.empty-achievements h3 {
  margin: 0 0 8px;
  color: #8b0000;
}

.empty-achievements p {
  color: rgba(90, 50, 50, 0.7);
}

.tips {
  text-align: left;
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 245, 245, 0.8);
  border-radius: 16px;
}

.tips p {
  margin: 0 0 10px;
  font-weight: 600;
  color: #8b0000;
}

.tips ul {
  margin: 0;
  padding-left: 20px;
}

.tips li {
  margin: 6px 0;
  font-size: 14px;
  color: rgba(90, 50, 50, 0.8);
}

.back-link {
  margin-top: 20px;
}

/* 搜索功能样式 */
.search-card {
  max-width: 700px;
  margin: 0 auto;
}

.search-header {
  text-align: center;
  margin-bottom: 20px;
}

.search-box-container {
  position: relative;
  margin-bottom: 20px;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
}

.search-input-wrapper input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 14px 0 0 14px;
  border: 1px solid rgba(139, 0, 0, 0.15);
  border-right: none;
  outline: none;
  font-size: 15px;
  transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.search-btn {
  padding: 14px 20px;
  border-radius: 0 14px 14px 0;
  border: 1px solid rgba(139, 0, 0, 0.15);
  border-left: none;
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-btn:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(211, 47, 47, 0.3);
}

.search-icon {
  font-size: 18px;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(139, 0, 0, 0.1);
  border: 1px solid rgba(139, 0, 0, 0.1);
  z-index: 100;
}

.suggestions-header {
  padding: 10px 14px;
  font-size: 13px;
  color: rgba(90, 50, 50, 0.7);
  border-bottom: 1px solid rgba(139, 0, 0, 0.06);
}

.suggestions-list {
  max-height: 200px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #8b0000;
  transition: background 0.2s ease;
}

.suggestion-item:hover {
  background: rgba(255, 245, 245, 0.8);
}

.recent-searches {
  background: rgba(255, 245, 245, 0.6);
  border-radius: 16px;
  padding: 16px;
}

.recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.recent-title {
  font-weight: 600;
  color: #8b0000;
}

.clear-history-btn {
  background: transparent;
  border: none;
  color: #d32f2f;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.clear-history-btn:hover {
  background: rgba(211, 47, 47, 0.1);
}

.recent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recent-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  text-decoration: none;
  color: #8b0000;
  font-size: 14px;
  border: 1px solid rgba(139, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.recent-tag:hover {
  background: rgba(211, 47, 47, 0.1);
  transform: translateY(-2px);
}

.tag-index {
  font-size: 12px;
  color: rgba(90, 50, 50, 0.6);
}

.search-results {
  margin-top: 24px;
}

.results-header {
  margin-bottom: 16px;
}

.results-count {
  font-size: 15px;
  color: rgba(90, 50, 50, 0.8);
}

.results-list {
  list-style: none;
  padding-left: 0;
}

.result-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(139, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(10px);
  animation: resultReveal 0.4s ease forwards;
}

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

.result-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.result-author {
  font-weight: 600;
  color: #8b0000;
  font-size: 14px;
}

.result-time {
  font-size: 13px;
  color: rgba(90, 50, 50, 0.6);
}

.result-content {
  font-size: 15px;
  line-height: 1.6;
  color: #1a0a0a;
  white-space: pre-line;
}

.result-actions {
  margin-top: 10px;
}

.result-likes {
  font-size: 14px;
  color: #d32f2f;
}

.empty-results {
  text-align: center;
  padding: 40px 20px;
}

.empty-results .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-results p {
  margin: 6px 0;
}

.empty-results .hint {
  color: rgba(90, 50, 50, 0.6);
  font-size: 14px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.page-link {
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #8b0000;
  font-size: 14px;
  transition: all 0.3s ease;
}

.page-link:hover {
  background: rgba(255, 245, 245, 0.8);
}

.page-link.active {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: #fff;
}

/* 导出用户数据样式 */
.export-options {
  margin-bottom: 20px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: normal;
  color: #5c3a3a;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-text {
  font-size: 14px;
}

.format-section {
  margin-top: 16px;
}

.format-section select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(139, 0, 0, 0.15);
  outline: none;
  font-size: 15px;
}

.export-preview {
  background: rgba(255, 245, 245, 0.6);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.field-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.field-tag {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  font-size: 13px;
  color: #8b0000;
  border: 1px solid rgba(139, 0, 0, 0.1);
}

.export-progress {
  background: rgba(255, 245, 245, 0.8);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.progress-text {
  font-size: 14px;
  color: #8b0000;
}

.progress-percent {
  font-weight: 600;
  color: #d32f2f;
}

.progress-bar {
  height: 8px;
  background: rgba(139, 0, 0, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d32f2f, #b71c1c);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.progress-info {
  font-size: 13px;
  color: rgba(90, 50, 50, 0.7);
  margin-top: 8px;
}

.export-btn {
  width: 100%;
  justify-content: center;
  gap: 8px;
}

.btn-icon {
  font-size: 16px;
}

.export-tips {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(139, 0, 0, 0.06);
}

.export-tips ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.export-tips li {
  margin: 6px 0;
  font-size: 14px;
  color: rgba(90, 50, 50, 0.8);
}

/* 移动端适配 */
@media (max-width: 600px) {
  .user-header {
    flex-direction: column;
    text-align: center;
  }

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

  .user-info-grid {
    grid-template-columns: 1fr;
  }

  .medal-grid {
    justify-content: center;
  }

  .achievement-item {
    flex-direction: column;
    text-align: center;
  }

  .search-card {
    padding: 20px 16px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-input-wrapper input {
    border-radius: 14px;
    border: 1px solid rgba(139, 0, 0, 0.15);
  }

  .search-btn {
    border-radius: 14px;
    border: 1px solid rgba(139, 0, 0, 0.15);
    margin-top: 10px;
  }

  .recent-tags {
    gap: 8px;
  }

  .recent-tag {
    padding: 6px 12px;
    font-size: 13px;
  }

  .pagination {
    gap: 6px;
  }

  .page-link {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* 夜间模式样式 */
body.page-body.night-mode {
  background: linear-gradient(135deg, #0a0e17 0%, #1a1f35 30%, #0f1420 50%, #1a1f35 70%, #0a0e17 100%);
  color: #e0e6ed;
}

/* 玻璃拟态变量在夜间必须换成深色底。
   否则 --glass-bg: rgba(255,255,255,.25) 会在深色背景上呈现一层灰白雾，
   .glass-header / .link-card / .doc-btn / .user-sidebar 全部会「发灰看不清」。 */
body.page-body.night-mode {
  --glass-bg: rgba(26, 31, 53, 0.75);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.45);
  --text-dark: #e0e6ed;
  --text-light: rgba(224, 230, 237, 0.75);
}

/* 左下角「首页」悬浮按钮：深色玻璃 + 浅色文字 */
body.page-body.night-mode .doc-btn {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: #e0e6ed;
}

body.page-body.night-mode .doc-btn:hover {
  background: #00ff88;
  border-color: #00ff88;
  color: #0a0e17;
}

/* 用户侧栏：默认是红色渐变，夜间换成深色玻璃保持一致 */
body.page-body.night-mode .user-sidebar {
  background: linear-gradient(180deg,
      rgba(26, 31, 53, 0.95) 0%,
      rgba(10, 14, 23, 0.98) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

/* 通用玻璃卡片（首页快捷链接、引导卡等） */
body.page-body.night-mode .link-card {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: #e0e6ed;
}

body.page-body.night-mode .link-card:hover {
  background: rgba(26, 31, 53, 0.95);
  border-color: rgba(0, 255, 136, 0.45);
}

body.page-body.night-mode::before {
  background-image:
    radial-gradient(ellipse 50% 40% at 10% 20%, rgba(0, 255, 136, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 90% 80%, rgba(0, 212, 255, 0.08) 0%, transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(10, 14, 23, 0.9) 0%, transparent 40%),
    repeating-linear-gradient(45deg, rgba(26, 31, 53, 0.3) 0px, rgba(26, 31, 53, 0.3) 1px, transparent 1px, transparent 60px),
    repeating-linear-gradient(-45deg, rgba(15, 20, 32, 0.4) 0px, rgba(15, 20, 32, 0.4) 1px, transparent 1px, transparent 80px);
}

body.page-body.night-mode::after {
  background-image:
    radial-gradient(ellipse 200px 150px at 15% 20%, rgba(0, 255, 136, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 180px 200px at 85% 80%, rgba(0, 212, 255, 0.12) 0%, transparent 65%),
    radial-gradient(circle 120px at 50% 50%, rgba(26, 31, 53, 0.5) 0%, transparent 60%);
}

body.page-body.night-mode .card {
  background: rgba(26, 31, 53, 0.85);
  border-color: rgba(0, 255, 136, 0.15);
}

/* 顶部导航：实际结构用的是 .glass-header（.site-header 是遗留类名，
   只写后者会导致夜间模式下导航文字仍是深灰、几乎不可读）。 */
body.page-body.night-mode .site-header,
body.page-body.night-mode .glass-header {
  background: rgba(10, 14, 23, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
}

body.page-body.night-mode .site-header a,
body.page-body.night-mode .glass-header a {
  color: #e0e6ed;
}

body.page-body.night-mode .site-header a:hover,
body.page-body.night-mode .glass-header a:hover {
  color: #00ff88;
}

/* 当前页高亮：夜间模式下红色在深底上偏暗，提亮一档 */
body.page-body.night-mode .glass-header a.active {
  color: #ff5252;
  background: rgba(255, 82, 82, 0.14);
}

/* 登录/注册按钮保持实心红，白字在深色底上对比度足够 */
body.page-body.night-mode .glass-header a.nav-login {
  color: #ffffff;
}

body.page-body.night-mode .btn.primary {
  background: linear-gradient(135deg, #00cc6a, #00ff88);
  color: #0a0e17;
}

body.page-body.night-mode .btn.ghost {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.3);
}

body.page-body.night-mode .btn.ghost:hover {
  background: rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .nav-user {
  color: #00ff88;
}

body.page-body.night-mode .geom-circle {
  border-color: rgba(0, 255, 136, 0.1);
}

body.page-body.night-mode .geom-hex {
  border-color: rgba(0, 212, 255, 0.1);
}

body.page-body.night-mode .alert.success {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
  color: #00ff88;
}

body.page-body.night-mode .alert.error {
  background: rgba(255, 82, 82, 0.1);
  border-color: rgba(255, 82, 82, 0.3);
}

body.page-body.night-mode .tab {
  color: #e0e6ed;
}

body.page-body.night-mode .tab.active {
  background: linear-gradient(135deg, #00cc6a, #00ff88);
  color: #0a0e17;
}

body.page-body.night-mode .tag-fishing {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

body.page-body.night-mode .tag-section {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
}

body.page-body.night-mode .action-btn {
  color: #e0e6ed;
}

body.page-body.night-mode .action-btn:hover {
  background: rgba(0, 255, 136, 0.1);
}

body.page-body.night-mode .action-count {
  color: #00ff88;
}

body.page-body.night-mode input,
body.page-body.night-mode textarea,
body.page-body.night-mode select {
  background: rgba(10, 14, 23, 0.8);
  border-color: rgba(0, 255, 136, 0.2);
  color: #e0e6ed;
}

body.page-body.night-mode input:focus,
body.page-body.night-mode textarea:focus {
  border-color: #00ff88;
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .post-item {
  background: rgba(26, 31, 53, 0.6);
}

body.page-body.night-mode .comment-section {
  background: rgba(10, 14, 23, 0.6);
}

body.page-body.night-mode .comment-item {
  background: rgba(26, 31, 53, 0.8);
}

body.page-body.night-mode .modal-content {
  background: #1a1f35;
}

body.page-body.night-mode .modal-content textarea {
  background: #0a0e17;
}

body.page-body.night-mode .stat-item {
  background: rgba(10, 14, 23, 0.6);
}

body.page-body.night-mode .stat-value {
  color: #00ff88;
}

body.page-body.night-mode .medal-item {
  background: rgba(10, 14, 23, 0.8);
  border-color: rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .medal-name {
  color: #e0e6ed;
}

body.page-body.night-mode .achievement-item {
  background: rgba(26, 31, 53, 0.8);
  border-color: rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .achievement-title {
  color: #00ff88;
}

body.page-body.night-mode .search-input-wrapper input {
  background: rgba(10, 14, 23, 0.8);
  border-color: rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .search-btn {
  background: linear-gradient(135deg, #00cc6a, #00ff88);
}

body.page-body.night-mode .search-suggestions {
  background: #1a1f35;
  border-color: rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .suggestion-item {
  color: #e0e6ed;
}

body.page-body.night-mode .suggestion-item:hover {
  background: rgba(0, 255, 136, 0.1);
}

body.page-body.night-mode .recent-searches {
  background: rgba(26, 31, 53, 0.6);
}

body.page-body.night-mode .recent-title {
  color: #00ff88;
}

body.page-body.night-mode .recent-tag {
  background: rgba(10, 14, 23, 0.8);
  color: #e0e6ed;
  border-color: rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .result-item {
  border-color: rgba(0, 255, 136, 0.1);
}

body.page-body.night-mode .result-author {
  color: #00ff88;
}

body.page-body.night-mode .page-link {
  color: #e0e6ed;
}

body.page-body.night-mode .page-link.active {
  background: linear-gradient(135deg, #00cc6a, #00ff88);
  color: #0a0e17;
}

body.page-body.night-mode .field-tag {
  background: rgba(10, 14, 23, 0.8);
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .export-progress {
  background: rgba(10, 14, 23, 0.6);
}

body.page-body.night-mode .progress-text {
  color: #00ff88;
}

body.page-body.night-mode .progress-bar {
  background: rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .progress-fill {
  background: linear-gradient(90deg, #00cc6a, #00ff88);
}

/* 模式切换按钮 */
.mode-toggle {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.mode-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(15deg);
}

/* 私信图标 */
.message-icon {
  font-size: 18px;
  text-decoration: none;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.message-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

/* 私信列表样式 */
.messages-card {
  max-width: 600px;
  margin: 0 auto;
}

.messages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.conversation-list {
  list-style: none;
  padding-left: 0;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 245, 245, 0.6);
  border-radius: 16px;
  margin-bottom: 10px;
  position: relative;
  transition: all 0.3s ease;
}

.conversation-item:hover {
  background: rgba(255, 245, 245, 0.8);
  transform: translateX(4px);
}

.conv-avatar {
  position: relative;
  width: 48px;
  height: 48px;
}

.avatar-emoji {
  font-size: 28px;
}

.online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #4caf50;
  border-radius: 50%;
  border: 2px solid #fff;
}

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

.conv-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.conv-name {
  font-weight: 600;
  color: #8b0000;
  font-size: 15px;
}

.online-badge {
  font-size: 12px;
  color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

.conv-preview {
  margin: 4px 0 0;
  font-size: 14px;
  color: rgba(90, 50, 50, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conv-meta {
  text-align: right;
}

.conv-time {
  font-size: 13px;
  color: rgba(90, 50, 50, 0.6);
}

.unread-badge {
  display: inline-block;
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
}

.conv-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.empty-conversations {
  text-align: center;
  padding: 40px 20px;
}

.empty-conversations .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* 聊天页面样式 */
.chat-card {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(139, 0, 0, 0.08);
}

.back-link {
  font-size: 16px;
  color: #8b0000;
  text-decoration: none;
}

.chat-title {
  flex: 1;
}

.chat-title .user-name {
  font-size: 18px;
  color: #8b0000;
}

.online-status {
  font-size: 13px;
  margin-left: 8px;
}

.online-status.online {
  color: #4caf50;
}

.online-status.offline {
  color: rgba(90, 50, 50, 0.6);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.message-item {
  max-width: 70%;
  margin-bottom: 16px;
  animation: messageFadeIn 0.3s ease;
}

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

.message-item.sent {
  margin-left: auto;
}

.message-item.received {
  margin-right: auto;
}

.message-content {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
}

.message-item.sent .message-content {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
}

.message-item.received .message-content {
  background: rgba(255, 245, 245, 0.8);
  border: 1px solid rgba(139, 0, 0, 0.1);
  border-radius: 18px 18px 18px 4px;
}

.message-time {
  font-size: 12px;
  color: rgba(90, 50, 50, 0.6);
  margin-top: 4px;
}

.message-item.sent .message-time {
  text-align: right;
}

.empty-chat {
  text-align: center;
  padding: 40px 20px;
}

.empty-chat .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 0, 0, 0.08);
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(139, 0, 0, 0.15);
  outline: none;
  font-size: 15px;
}

.chat-input-area input:focus {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

/* 留言板样式 */
.guestbook-card {
  max-width: 700px;
  margin: 0 auto;
}

.guestbook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.guestbook-form {
  background: rgba(255, 245, 245, 0.6);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.guestbook-form .form-group {
  margin-bottom: 14px;
}

.guestbook-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #8b0000;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(139, 0, 0, 0.15);
  outline: none;
  font-size: 15px;
}

.guestbook-form textarea {
  resize: vertical;
  min-height: 100px;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.guestbook-notes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.sticky-note {
  background: linear-gradient(145deg, #fff9c4, #fff59d);
  padding: 16px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
  transform: rotate(-2deg);
  opacity: 0;
  animation: noteReveal 0.5s ease forwards;
}

@keyframes noteReveal {
  from { opacity: 0; transform: translateY(20px) rotate(-2deg); }
  to { opacity: 1; transform: translateY(0) rotate(-2deg); }
}

.sticky-note:nth-child(3n) {
  transform: rotate(2deg);
}

.sticky-note:nth-child(3n+2) {
  transform: rotate(-1deg);
}

.note-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.note-author {
  font-weight: 600;
  color: #8b0000;
  font-size: 14px;
}

.note-time {
  font-size: 12px;
  color: rgba(90, 50, 50, 0.6);
}

.note-content {
  font-size: 14px;
  line-height: 1.6;
  color: #1a0a0a;
}

.empty-guestbook {
  text-align: center;
  padding: 40px 20px;
  grid-column: 1 / -1;
}

.empty-guestbook .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* 夜间模式 - 私信相关 */
body.page-body.night-mode .conversation-item {
  background: rgba(26, 31, 53, 0.6);
}

body.page-body.night-mode .conversation-item:hover {
  background: rgba(26, 31, 53, 0.8);
}

body.page-body.night-mode .conv-name {
  color: #e0e6ed;
}

body.page-body.night-mode .conv-preview {
  color: rgba(224, 230, 237, 0.7);
}

body.page-body.night-mode .conv-time {
  color: rgba(224, 230, 237, 0.6);
}

body.page-body.night-mode .chat-header {
  border-color: rgba(0, 255, 136, 0.1);
}

body.page-body.night-mode .chat-title .user-name {
  color: #e0e6ed;
}

body.page-body.night-mode .back-link {
  color: #00ff88;
}

body.page-body.night-mode .message-item.received .message-content {
  background: rgba(26, 31, 53, 0.8);
  border-color: rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .message-time {
  color: rgba(224, 230, 237, 0.6);
}

body.page-body.night-mode .chat-input-area {
  border-color: rgba(0, 255, 136, 0.1);
}

body.page-body.night-mode .chat-input-area input {
  background: rgba(10, 14, 23, 0.8);
  border-color: rgba(0, 255, 136, 0.2);
  color: #e0e6ed;
}

body.page-body.night-mode .guestbook-form {
  background: rgba(26, 31, 53, 0.6);
}

body.page-body.night-mode .guestbook-form label {
  color: #e0e6ed;
}

body.page-body.night-mode .guestbook-form input,
body.page-body.night-mode .guestbook-form textarea {
  background: rgba(10, 14, 23, 0.8);
  border-color: rgba(0, 255, 136, 0.2);
  color: #e0e6ed;
}

body.page-body.night-mode .sticky-note {
  background: rgba(26, 31, 53, 0.8);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .note-author {
  color: #00ff88;
}

body.page-body.night-mode .note-content {
  color: #e0e6ed;
}

/* 松鼠彩蛋样式 */
.squirrel-container {
  position: fixed;
  right: -300px;
  bottom: 100px;
  z-index: 1000;
  transition: right 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.squirrel-container.squirrel-show {
  right: 20px;
}

.squirrel {
  background: linear-gradient(145deg, #fff9c4, #fff59d);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(255, 193, 7, 0.3);
  max-width: 280px;
}

.squirrel-body {
  font-size: 48px;
  text-align: center;
  animation: squirrelBounce 1s ease-in-out infinite;
}

@keyframes squirrelBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.squirrel-message p {
  margin: 12px 0;
  font-size: 14px;
  color: #5d4037;
  text-align: center;
}

.squirrel-btn {
  width: 100%;
  margin-bottom: 8px;
}

/* 表情联想面板 */
.emoji-suggestion-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 20px rgba(139, 0, 0, 0.15);
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  border: 1px solid rgba(139, 0, 0, 0.1);
}

.emoji-option {
  font-size: 24px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.emoji-option:hover {
  background: rgba(255, 205, 210, 0.5);
  transform: scale(1.2);
}

/* 点赞爱心炸开动画 */
.like-explosion {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
}

.explosion-heart {
  position: absolute;
  font-size: 20px;
  animation: explode 1s ease-out forwards;
  opacity: 0;
}

@keyframes explode {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0);
  }
}

/* 按钮波纹效果 */
.btn, .admin-link, .link-card {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: rippleExpand 0.6s ease-out forwards;
}

@keyframes rippleExpand {
  to {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

/* 骨架屏样式 */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 205, 210, 0.3) 25%, rgba(255, 235, 238, 0.5) 50%, rgba(255, 205, 210, 0.3) 75%);
  background-size: 200% 100%;
  animation: skeletonWave 1.5s ease-in-out infinite;
}

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

.skeleton-card {
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 16px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  border-radius: 8px;
  margin-bottom: 12px;
}

.skeleton-text {
  height: 16px;
  width: 100%;
  border-radius: 6px;
  margin-bottom: 8px;
}

.skeleton-text:last-child {
  width: 70%;
}

/* 页面切换过渡 */
.page-transition {
  position: fixed;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  z-index: 9999;
  transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.page-transition.right {
  left: auto;
  right: -100%;
}

.page-transition.active {
  left: 0;
}

.page-transition.right.active {
  right: 0;
}

/* 状态提示动画 */
.status-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.status-success {
  width: 80px;
  height: 80px;
  border: 4px solid #4caf50;
  border-radius: 50%;
  position: relative;
  animation: successCircle 0.5s ease-out forwards;
}

.status-success::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 10px;
  width: 15px;
  height: 30px;
  border: solid #4caf50;
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
  opacity: 0;
  animation: successCheck 0.5s ease-out 0.3s forwards;
}

@keyframes successCircle {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes successCheck {
  from { opacity: 0; transform: rotate(45deg) scale(0); }
  to { opacity: 1; transform: rotate(45deg) scale(1); }
}

.status-error {
  width: 80px;
  height: 80px;
  position: relative;
  animation: errorShake 0.5s ease-in-out;
}

.status-error::before,
.status-error::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 60px;
  background: #d32f2f;
  border-radius: 2px;
}

.status-error::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.status-error::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.status-loading {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(139, 0, 0, 0.1);
  border-top-color: #d32f2f;
  border-radius: 50%;
  animation: loadingSpin 1s linear infinite;
}

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

/* 主题调色板 */
.theme-panel {
  position: fixed;
  right: -300px;
  top: 200px;
  width: 280px;
  background: #fff;
  border-radius: 16px 0 0 16px;
  padding: 20px;
  box-shadow: -4px 0 20px rgba(139, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 100;
}

.theme-panel.open {
  right: 0;
}

.theme-toggle-btn {
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: #fff;
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 10px;
  cursor: pointer;
  font-size: 16px;
}

.theme-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.theme-preset {
  aspect-ratio: 1;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.theme-preset:hover {
  transform: scale(1.1);
}

.theme-preset.active {
  border-color: #d32f2f;
}

.theme-preset.morandi {
  background: linear-gradient(135deg, #d4a5a5, #c4b7a6, #e8d5b7);
}

.theme-preset.macaron {
  background: linear-gradient(135deg, #ffb5ba, #ffd6a5, #fdffb6);
}

.theme-preset.vintage {
  background: linear-gradient(135deg, #c9a962, #8b7355, #3d3d3d);
}

.theme-preset.ocean {
  background: linear-gradient(135deg, #87ceeb, #98d8c8, #77dd77);
}

.theme-preset.sunset {
  background: linear-gradient(135deg, #ff6b6b, #ffa07a, #ffd93d);
}

.theme-preset.forest {
  background: linear-gradient(135deg, #2d5a27, #4a7c59, #a8e6cf);
}

.theme-custom {
  margin-top: 10px;
}

.color-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.color-input-row label {
  width: 80px;
  font-size: 13px;
  color: #5c3a3a;
}

.color-input-row input[type="color"] {
  width: 40px;
  height: 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.color-input-row input[type="range"] {
  flex: 1;
}

.color-preview {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
}

/* 记住密码选项 */
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.remember-me label {
  font-size: 14px;
  color: #5c3a3a;
}

/* 密码显示切换 */
.password-toggle-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

/* 成就粒子效果 */
.achievement-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.particle {
  position: absolute;
  font-size: 24px;
  animation: particleFloat 3s ease-out forwards;
  opacity: 0;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) scale(0);
  }
}

/* 隐藏成就墙 */
/* 注意：原来 bottom:20px 居中，与右下角的通知球位置冲突，两个 fixed 元素会互相压字。
   这里上移靠右下角摆放，避开通知球。 */
.hidden-achievements {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 190;
}

.hidden-achievements-trigger {
  background: rgba(211, 47, 47, 0.1);
  border: 2px dashed #d32f2f;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  color: #d32f2f;
  font-size: 14px;
  transition: all 0.3s ease;
}

.hidden-achievements-trigger:hover {
  background: rgba(211, 47, 47, 0.2);
  transform: scale(1.05);
}

.hidden-achievements-panel {
  position: absolute;
  bottom: 50px;
  /* 触发器已改为右下角定位，面板与之右对齐展开，避免超出视口 */
  right: 0;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 -4px 20px rgba(139, 0, 0, 0.1);
  min-width: 300px;
  display: none;
}

.hidden-achievements-panel.show {
  display: block;
  animation: slideUp 0.3s ease;
}

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

.hidden-achievements-panel h3 {
  margin: 0 0 12px;
  color: #8b0000;
}

.hidden-stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hidden-sticker {
  font-size: 32px;
  padding: 10px;
  background: rgba(255, 245, 245, 0.8);
  border-radius: 12px;
}

/* 夜间模式 - 松鼠彩蛋 */
body.page-body.night-mode .squirrel {
  background: rgba(26, 31, 53, 0.95);
}

body.page-body.night-mode .squirrel-message p {
  color: #e0e6ed;
}

/* 夜间模式 - 表情面板 */
body.page-body.night-mode .emoji-suggestion-panel {
  background: #1a1f35;
  border-color: rgba(0, 255, 136, 0.2);
}

body.page-body.night-mode .emoji-option:hover {
  background: rgba(0, 255, 136, 0.1);
}

/* 夜间模式 - 骨架屏 */
body.page-body.night-mode .skeleton {
  background: linear-gradient(90deg, rgba(0, 255, 136, 0.1) 25%, rgba(0, 255, 136, 0.2) 50%, rgba(0, 255, 136, 0.1) 75%);
}

/* 夜间模式 - 主题面板 */
body.page-body.night-mode .theme-panel {
  background: #1a1f35;
}

body.page-body.night-mode .theme-preset.active {
  border-color: #00ff88;
}

body.page-body.night-mode .color-input-row label {
  color: #e0e6ed;
}

body.page-body.night-mode .hidden-achievements-panel {
  background: #1a1f35;
}

body.page-body.night-mode .hidden-achievements-panel h3 {
  color: #00ff88;
}

body.page-body.night-mode .hidden-sticker {
  background: rgba(0, 255, 136, 0.1);
}
