/* ❀ 深温·小暖 - 图书馆 v6.0 */
/* 暖奶茶·玫瑰金·毛玻璃·呼吸动画 */
/* 与 OB6 花圃统一视觉 */

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

:root {
  --bg: #fdf8f3;
  --bg-warm: #faf3ec;
  --bg-card: rgba(255, 255, 255, 0.55);
  --bg-card-hover: rgba(255, 255, 255, 0.75);
  --text: #5c4a3a;
  --text-light: #9b8978;
  --text-faint: #c4b5a4;
  --pink: #e8a0b4;
  --pink-light: #f2c4d0;
  --pink-faint: #fbe4eb;
  --accent: #d4917a;
  --accent-light: #e8b4a0;
  --rose: #e8a0b4;
  --border: rgba(92, 74, 58, 0.08);
  --shadow: rgba(180, 150, 120, 0.08);
  --shadow-hover: rgba(180, 150, 120, 0.14);
  --font-display: 'Great Vibes', cursive;
  --font-body: 'Noto Serif SC', 'Songti SC', 'STSong', Georgia, serif;
  --font-fallback: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  font-family: 'Noto Serif SC', 'Songti SC', 'STSong', Georgia, serif;
  background: linear-gradient(160deg, #fdf8f3 0%, #faf3ec 40%, #f5ede4 70%, #fdf8f3 100%);
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text);
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== 留言多轮回复链 ===== */
.replies-chain { border-left: 2px solid rgba(232, 160, 180, 0.2); padding-left: 6px; }
.reply-item {
  padding: 5px 8px; margin-bottom: 3px;
  background: rgba(255, 255, 255, 0.5); border-radius: 8px;
  font-size: 13px; line-height: 1.4; animation: msgSlideIn 0.25s ease;
}
.reply-item .reply-author { font-size: 11px; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.reply-item .reply-text { color: var(--text); white-space: pre-wrap; word-break: break-word; }
.reply-item .reply-meta { font-size: 10px; color: var(--text-faint); }
.reply-item .msg-reply-btn {
  background: none; border: none; color: var(--accent); font-size: 11px;
  cursor: pointer; padding: 1px 6px; border-radius: 4px; transition: background 0.2s;
}
.reply-item .msg-reply-btn:hover { background: rgba(212, 145, 122, 0.08); }
.reply-level-0 { margin-left: 0; }
.reply-level-1 { margin-left: 4px; }
.reply-level-2 { margin-left: 8px; }
.reply-level-3 { margin-left: 12px; }
.reply-level-4 { margin-left: 16px; }

/* ===== 浮动爱心 ===== */
.floating-hearts {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.heart-particle {
  position: absolute; font-size: 16px; opacity: 0;
  animation: heartFloat 8s ease-in infinite; pointer-events: none;
}
@keyframes heartFloat {
  0% { transform: translateY(100vh) rotate(0deg) scale(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-10vh) rotate(360deg) scale(1); opacity: 0; }
}

/* ===== 顶部主区域 ===== */
.top-section {
  display: flex; gap: 16px; padding: 16px 20px;
  max-width: 1200px; margin: 0 auto; position: relative; z-index: 1;
}

/* ===== 左侧日历 ===== */
.left-calendar {
  flex: 1; min-width: 300px; max-width: 520px;
  background: var(--bg-card);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 20px; padding: 20px;
  box-shadow: 0 4px 24px var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.left-calendar:hover {
  box-shadow: 0 8px 32px var(--shadow-hover);
  transform: translateY(-2px);
}

/* ===== 心形天数区域 ===== */
.heart-area {
  text-align: center; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.heart-main { display: flex; align-items: center; justify-content: center; gap: 10px; }
.heart-icon {
  font-size: 32px; display: inline-block;
  animation: heartBeat 1.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(232, 160, 180, 0.25));
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.2); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}
.heart-text { font-size: 16px; font-weight: 600; color: var(--text); }
.days-number {
  font-family: 'Great Vibes', cursive;
  font-size: 36px; font-weight: 400;
  color: var(--pink);
  display: inline-block;
  text-shadow: 0 2px 12px rgba(232, 160, 180, 0.2);
}
.meet-date { font-size: 12px; color: var(--text-light); margin-top: 6px; letter-spacing: 0.5px; }

/* ===== 日历卡片 ===== */
.calendar-card { width: 100%; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.calendar-header h3 { font-size: 16px; color: var(--text); font-weight: 600; }
.calendar-nav-btn {
  background: rgba(232, 160, 180, 0.1); border: none; font-size: 14px;
  cursor: pointer; padding: 6px 12px; border-radius: 8px;
  transition: all 0.2s; color: var(--accent);
}
.calendar-nav-btn:hover { background: rgba(232, 160, 180, 0.18); transform: scale(1.05); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.calendar-weekday { font-size: 11px; color: var(--text-light); padding: 6px 0; font-weight: 600; }
.calendar-day {
  padding: 8px 0; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 500; transition: all 0.2s;
  color: var(--text); position: relative;
}
.calendar-day:hover { background: rgba(232, 160, 180, 0.08); transform: scale(1.05); }
.calendar-day.today {
  background: var(--pink); color: #fff; font-weight: 700;
  box-shadow: 0 2px 10px rgba(232, 160, 180, 0.3);
}
.cal-day-num { font-size: 13px; font-weight: 500; }
.cal-badges { display: flex; gap: 1px; line-height: 1; min-height: 10px; }
.cal-badge { font-size: 9px; line-height: 1; }
.cal-badge-memory { color: var(--accent); }
.cal-badge-high { color: #e8a050; }
.cal-badge-message { color: var(--pink); font-weight: bold; }
.calendar-day.has-memory { font-weight: 700; color: var(--accent); }
.calendar-day.has-message { font-weight: 500; color: var(--pink); }
.calendar-day.has-memory.today { color: #fff; }
.calendar-day.has-message.today .cal-badge-message { color: rgba(255,255,255,0.85); }
.calendar-day.other-month { color: var(--text-faint); }
.calendar-hint { margin-top: 12px; font-size: 11px; color: var(--text-faint); text-align: center; }

/* ===== 右侧留言板 ===== */
.right-message-board-container { flex: 1; min-width: 0; max-width: 520px; overflow: hidden; }
.right-message-board {
  flex: 1; min-width: 280px; max-width: 520px;
  background: var(--bg-card);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 20px; padding: 20px;
  box-shadow: 0 4px 24px var(--shadow);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; transition: all 0.3s ease;
  overflow: hidden; min-width: 0; box-sizing: border-box;
}
.right-message-board:hover { box-shadow: 0 8px 32px var(--shadow-hover); transform: translateY(-2px); }
.msg-board-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.msg-board-icon { font-size: 20px; }
.msg-board-title { font-size: 16px; font-weight: 600; color: var(--text); }
.msg-board-date { font-size: 12px; color: var(--text-light); margin-left: auto; }
.msg-board-count {
  font-size: 12px; color: var(--text-light); margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.msg-board-list { flex: 1; overflow-y: auto; max-height: 260px; min-height: 120px; margin-bottom: 10px; }
.msg-board-list::-webkit-scrollbar { width: 4px; }
.msg-board-list::-webkit-scrollbar-thumb { background: var(--text-faint); border-radius: 2px; }

.message-item {
  padding: 10px 14px; margin-bottom: 8px; border-radius: 14px;
  font-size: 14px; line-height: 1.5; animation: msgSlideIn 0.3s ease;
}
@keyframes msgSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.message-item.user {
  background: rgba(232, 160, 180, 0.08); margin-right: 24px;
  border-bottom-left-radius: 4px; border-left: 3px solid var(--pink-light);
}
.message-item.ai {
  background: rgba(212, 145, 122, 0.08); margin-left: 24px;
  border-bottom-right-radius: 4px; border-right: 3px solid var(--accent-light);
}
.message-item .msg-author { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.message-item.user .msg-author { color: var(--pink); }
.message-item.ai .msg-author { color: var(--accent); }
.message-item .msg-time { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.message-item .msg-reply-btn {
  background: none; border: none; color: var(--accent); font-size: 12px;
  cursor: pointer; padding: 2px 8px; border-radius: 6px;
  margin-top: 3px; transition: background 0.2s;
}
.message-item .msg-reply-btn:hover { background: rgba(212, 145, 122, 0.08); }
.message-item .reply-content {
  margin-top: 6px; padding: 8px 12px;
  background: rgba(255, 255, 255, 0.5); border-radius: 10px;
  font-size: 13px; border-left: 3px solid var(--pink-light);
}

.msg-board-input-area {
  display: flex; gap: 8px; padding-top: 10px; width: 100%; box-sizing: border-box;
  border-top: 1px solid var(--border);
}
.msg-board-input-area input {
  flex: 1; min-width: 0; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 13px; outline: none; font-family: inherit;
  transition: border-color 0.2s; background: rgba(255, 255, 255, 0.5);
  color: var(--text);
}
.msg-board-input-area input:focus {
  border-color: var(--pink); background: #fff;
  box-shadow: 0 0 0 3px rgba(232, 160, 180, 0.08);
}
.msg-board-input-area input::placeholder { color: var(--text-faint); }
.msg-board-input-area button {
  padding: 10px 14px; border: none; border-radius: 12px; flex-shrink: 0;
  background: var(--pink); color: #fff;
  cursor: pointer; font-size: 14px; transition: all 0.2s;
  white-space: nowrap; font-weight: 600; font-family: inherit;
}
.msg-board-input-area button:hover { opacity: 0.85; transform: translateY(-1px); }

.msg-board-nav {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.msg-nav-btn {
  background: rgba(232, 160, 180, 0.06); border: 1px solid rgba(232, 160, 180, 0.12);
  padding: 4px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--accent); transition: all 0.2s;
}
.msg-nav-btn:hover { background: rgba(232, 160, 180, 0.12); transform: scale(1.05); }
.msg-nav-date { flex: 1; text-align: center; font-size: 14px; font-weight: 600; color: var(--text); }
.msg-today-btn { font-size: 12px; padding: 4px 8px; }

/* ===== 导航栏 ===== */
.navbar {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 10px 24px; display: flex; align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 8px var(--shadow);
  position: sticky; top: 0; z-index: 90;
  border-bottom: 1px solid var(--border);
  max-width: 1200px; margin: 0 auto;
  border-radius: 0 0 14px 14px;
}
.navbar .brand {
  font-family: 'Great Vibes', cursive;
  font-size: 22px; font-weight: 400;
  color: var(--text); letter-spacing: 0.5px;
}
.navbar .nav-actions { display: flex; gap: 6px; align-items: center; }
.navbar .nav-btn {
  background: rgba(92, 74, 58, 0.04); color: var(--text-light);
  border: 1px solid var(--border); padding: 7px 14px;
  border-radius: 10px; cursor: pointer; font-size: 13px;
  transition: all 0.2s; display: flex; align-items: center;
  gap: 4px; font-weight: 500; font-family: inherit;
}
.navbar .nav-btn:hover {
  background: rgba(92, 74, 58, 0.08); color: var(--text);
  transform: translateY(-1px);
}
.navbar .nav-btn.refresh-btn:hover { transform: translateY(-1px) rotate(180deg); }

/* ===== 主容器 ===== */
.container {
  max-width: 860px; margin: 0 auto; padding: 16px 20px;
  position: relative; z-index: 1;
}

/* ===== 记忆类型选项卡 ===== */
.tabs {
  display: flex; gap: 6px; margin-bottom: 12px;
  background: var(--bg-card);
  backdrop-filter: blur(12px); border-radius: 14px;
  padding: 8px 12px; box-shadow: 0 2px 10px var(--shadow);
  border: 1px solid var(--border);
}
.tab {
  padding: 7px 16px; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text-light);
  background: transparent; border: none; transition: all 0.2s;
  display: flex; align-items: center; gap: 4px; font-family: inherit;
}
.tab:hover { background: rgba(232, 160, 180, 0.06); color: var(--text); }
.tab.active {
  background: var(--pink); color: #fff;
  box-shadow: 0 2px 8px rgba(232, 160, 180, 0.25);
}

/* ===== 字数统计 ===== */
.stats-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.stat-card {
  flex: 1; background: var(--bg-card);
  backdrop-filter: blur(10px); border-radius: 12px;
  padding: 10px 12px; box-shadow: 0 2px 10px var(--shadow);
  text-align: center; transition: all 0.3s; border: 1px solid var(--border);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px var(--shadow-hover); }
.stat-card .stat-label { font-size: 11px; color: var(--text-light); margin-bottom: 3px; font-weight: 500; }
.stat-card .stat-value {
  font-family: 'Great Vibes', cursive;
  font-size: 24px; font-weight: 400; color: var(--pink);
}
.stat-card .stat-unit { font-size: 10px; color: var(--text-faint); }

/* ===== 分类筛选 ===== */
.category-bar {
  background: var(--bg-card); backdrop-filter: blur(10px);
  border-radius: 12px; padding: 8px 12px; margin-bottom: 12px;
  box-shadow: 0 2px 10px var(--shadow); display: flex;
  flex-wrap: wrap; gap: 5px; align-items: center;
  border: 1px solid var(--border);
}
.category-tag {
  padding: 4px 12px; border-radius: 10px; cursor: pointer;
  font-size: 12px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5); color: var(--text-light);
  transition: all 0.2s; font-weight: 500;
}
.category-tag:hover { border-color: var(--pink-light); color: var(--text); transform: translateY(-1px); }
.category-tag.active {
  background: var(--pink); border-color: transparent; color: #fff;
}

/* ===== 搜索框 ===== */
.search-box {
  width: 100%; padding: 10px 16px;
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 14px; margin-bottom: 12px; transition: all 0.2s;
  background: var(--bg-card); color: var(--text); font-family: inherit;
}
.search-box:focus {
  outline: none; border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(232, 160, 180, 0.08);
}
.search-box::placeholder { color: var(--text-faint); }

/* ===== 记忆卡片 ===== */
.memories-list { display: flex; flex-direction: column; gap: 10px; }
.memory-card {
  background: var(--bg-card-hover);
  backdrop-filter: blur(10px); border-radius: 16px;
  padding: 16px 18px; box-shadow: 0 2px 12px var(--shadow);
  transition: all 0.3s; border: 1px solid var(--border);
  border-left: 3px solid var(--pink-light);
  animation: cardFadeIn 0.4s ease;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.memory-card:hover {
  box-shadow: 0 6px 24px var(--shadow-hover);
  transform: translateX(3px) translateY(-2px);
  border-color: rgba(232, 160, 180, 0.2);
}
.memory-card .card-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 8px;
}
.memory-card .card-title { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; }
.memory-card .card-actions {
  display: flex; gap: 2px; opacity: 0; transition: opacity 0.2s;
}
.memory-card:hover .card-actions { opacity: 1; }
.memory-card .btn-icon {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.2s; background: transparent;
}
.memory-card .btn-icon:hover { background: rgba(232, 160, 180, 0.1); }
.memory-card .btn-icon.btn-edit:hover { color: var(--accent); }
.memory-card .btn-icon.btn-delete:hover { color: #c44; background: rgba(220, 80, 80, 0.06); }
.memory-card .card-content {
  font-size: 14px; color: var(--text-light); line-height: 1.7;
  margin-bottom: 8px; white-space: pre-wrap; word-break: break-word;
}
.memory-card .card-footer {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 12px; color: var(--text-light); align-items: center;
}
.memory-card .category-badge {
  background: rgba(232, 160, 180, 0.08); color: var(--accent);
  padding: 2px 10px; border-radius: 8px; font-size: 11px;
}

/* ===== 已读/未读 ===== */
.read-badge {
  font-size: 12px; margin-left: 6px; line-height: 1;
  vertical-align: middle; display: inline-flex; align-items: center;
}
.read-badge.unread {
  animation: pulseNew 2s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(232, 160, 180, 0.4));
}
@keyframes pulseNew {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.read-badge.read { opacity: 0.7; }
.memory-card .type-badge { padding: 2px 10px; border-radius: 8px; font-size: 11px; }
.type-badge.global { background: rgba(212, 145, 122, 0.08); color: var(--accent); }
.type-badge.keyword { background: rgba(232, 160, 180, 0.08); color: var(--pink); }
.type-badge.private { background: rgba(92, 74, 58, 0.06); color: var(--text-light); }

/* ===== 评级星星 ===== */
.star-rating { display: inline-flex; gap: 2px; align-items: center; }
.star-rating .star {
  font-size: 16px; cursor: pointer; transition: all 0.2s; color: #e0d8d0;
}
.star-rating .star.active { color: #e8a050; text-shadow: 0 0 6px rgba(232, 160, 80, 0.3); }
.star-rating .star:hover { transform: scale(1.2); }
.star-rating-display { display: inline-flex; gap: 1px; font-size: 14px; }
.star-rating-display .star-filled { color: #e8a050; }
.star-rating-display .star-empty { color: #e0d8d0; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-light); }
.empty-state .empty-icon {
  font-size: 56px; margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.empty-state .empty-text { font-size: 15px; }

/* ===== 日期详情弹窗 ===== */
.date-detail-modal {
  display: none; position: fixed; top: 0; left: 0;
  width: 100%; height: 100%; background: rgba(92, 74, 58, 0.15);
  backdrop-filter: blur(6px); z-index: 500;
  justify-content: center; align-items: center;
}
.date-detail-modal.show { display: flex; }
.date-detail-content {
  background: #fff; border-radius: 20px; padding: 24px;
  max-width: 500px; width: 90%; max-height: 70vh;
  overflow-y: auto; box-shadow: 0 24px 64px rgba(92, 74, 58, 0.12);
  animation: slideUp 0.3s ease;
}
.date-detail-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.date-detail-header h3 { font-size: 17px; color: var(--text); }
.date-detail-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(232, 160, 180, 0.08); cursor: pointer;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.date-detail-close:hover { background: rgba(232, 160, 180, 0.15); }
.date-detail-item {
  padding: 12px; margin-bottom: 8px;
  background: rgba(232, 160, 180, 0.04); border-radius: 12px;
  border-left: 3px solid var(--pink-light);
}
.date-detail-item .dd-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; color: var(--text); }
.date-detail-item .dd-content {
  font-size: 13px; color: var(--text-light); white-space: pre-wrap;
  max-height: 80px; overflow-y: auto;
}
.date-detail-empty { text-align: center; padding: 30px; color: var(--text-light); }

/* ===== FAB 浮动按钮 ===== */
.fab {
  position: fixed; bottom: 32px; right: 32px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--pink); color: #fff; border: none;
  font-size: 28px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(232, 160, 180, 0.35);
  transition: all 0.3s; display: flex; align-items: center;
  justify-content: center; z-index: 50; font-weight: 300;
}
.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 24px rgba(232, 160, 180, 0.45);
}

/* ===== 模态框 ===== */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0;
  width: 100%; height: 100%; background: rgba(92, 74, 58, 0.12);
  backdrop-filter: blur(6px); z-index: 10010;
  justify-content: center; align-items: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px); border-radius: 20px;
  width: 90%; max-width: 520px; max-height: 85vh;
  overflow-y: auto; box-shadow: 0 24px 64px rgba(92, 74, 58, 0.08);
  animation: slideUp 0.3s ease; border: 1px solid var(--border);
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  padding: 20px 24px 0; display: flex;
  justify-content: space-between; align-items: center;
}
.modal-header h2 {
  font-family: 'Noto Serif SC', 'Songti SC', Georgia, serif;
  font-size: 18px; color: var(--text); font-weight: 600;
}
.modal-header .close-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(92, 74, 58, 0.06); cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; color: var(--text-light);
}
.modal-header .close-btn:hover { background: rgba(92, 74, 58, 0.1); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 0 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 4px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 14px; transition: all 0.2s; font-family: inherit;
  background: rgba(255, 255, 255, 0.5); color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--pink); background: #fff;
  box-shadow: 0 0 0 3px rgba(232, 160, 180, 0.06);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.btn {
  padding: 10px 24px; border-radius: 10px; border: none;
  font-size: 14px; cursor: pointer; transition: all 0.2s;
  font-weight: 600; font-family: inherit;
}
.btn-primary {
  background: var(--pink); color: #fff;
  box-shadow: 0 2px 8px rgba(232, 160, 180, 0.2);
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-secondary { background: rgba(92, 74, 58, 0.06); color: var(--text); }
.btn-secondary:hover { background: rgba(92, 74, 58, 0.1); }

/* ===== 登录覆盖层 ===== */
.login-overlay {
  display: flex; position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #fdf8f3 0%, #faf3ec 40%, #f5ede4 70%, #fdf8f3 100%);
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
  z-index: 9999; justify-content: center; align-items: center;
}
.login-overlay.hidden { display: none; }
.login-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 24px; padding: 40px 36px 36px;
  max-width: 380px; width: 90%; text-align: center;
  box-shadow: 0 24px 64px rgba(180, 150, 120, 0.1);
  border: 1px solid var(--border);
  animation: slideUp 0.5s ease; position: relative; z-index: 10000;
}
.login-icon {
  font-size: 48px; margin-bottom: 8px;
  animation: heartBeat 1.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(232, 160, 180, 0.2));
}
.login-title {
  font-family: 'Great Vibes', cursive;
  font-size: 28px; font-weight: 400;
  color: var(--text); margin-bottom: 8px; line-height: 1.3;
}
.login-subtitle {
  font-size: 13px; color: var(--text-light); margin-bottom: 24px;
  font-weight: 500; letter-spacing: 0.3px;
}
.login-input-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.login-input {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 14px;
  font-size: 16px; outline: none; font-family: inherit;
  text-align: center; letter-spacing: 3px;
  background: rgba(255, 255, 255, 0.6); transition: all 0.2s;
  color: var(--text); box-sizing: border-box;
}
.login-input:focus {
  border-color: var(--pink); background: #fff;
  box-shadow: 0 0 0 4px rgba(232, 160, 180, 0.08);
}
.login-input::placeholder { letter-spacing: 1px; color: var(--text-faint); font-size: 14px; }
.login-btn {
  width: 100%; padding: 12px 20px; border: none;
  border-radius: 14px; background: var(--pink); color: #fff;
  cursor: pointer; font-size: 15px; font-weight: 600;
  transition: all 0.2s; box-shadow: 0 4px 14px rgba(232, 160, 180, 0.2);
  box-sizing: border-box; font-family: inherit;
}
.login-btn:hover { opacity: 0.85; transform: translateY(-2px); }
.login-btn:active { transform: translateY(0); }
.login-error { font-size: 13px; color: #c44; min-height: 20px; margin-top: 4px; }

/* ===== 修改密码 ===== */
.change-pwd-link { display: flex; justify-content: center; margin-top: 8px; }
.change-pwd-btn {
  background: none; border: none; color: var(--text-light);
  font-size: 13px; cursor: pointer; padding: 6px 14px;
  border-radius: 8px; transition: all 0.2s; font-weight: 500;
}
.change-pwd-btn:hover { color: var(--accent); background: rgba(212, 145, 122, 0.06); }
#loginHearts {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999; overflow: hidden;
}

/* ===== 分类管理 ===== */
.category-item {
  display: flex; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--border); gap: 10px;
}
.category-item:last-child { border-bottom: none; }
.category-item .cat-icon {
  font-size: 18px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.category-item .cat-name { flex: 1; font-size: 14px; font-weight: 500; color: var(--text); }
.category-item .cat-actions { display: flex; gap: 4px; }

/* ===== 导出 ===== */
.export-options { display: flex; gap: 10px; margin: 12px 0; }
.export-option {
  flex: 1; padding: 14px; border: 1px solid var(--border);
  border-radius: 12px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: rgba(255, 255, 255, 0.5);
}
.export-option:hover { border-color: var(--pink-light); background: rgba(232, 160, 180, 0.04); }
.export-option.selected { border-color: var(--pink); background: rgba(232, 160, 180, 0.06); }
.export-option .opt-icon { font-size: 24px; margin-bottom: 4px; }
.export-option .opt-label { font-size: 13px; font-weight: 600; color: var(--text); }

/* ===== 提示 ===== */
.setup-hint {
  text-align: center; padding: 8px;
  background: rgba(232, 160, 180, 0.08); border-radius: 8px;
  margin-bottom: 12px; font-size: 14px; color: var(--accent); display: none;
}
.setup-hint.show { display: block; }

/* ===== 信箱回信 ===== */
.mailbox-reply-area { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.mailbox-reply-input-row { display: flex; gap: 6px; align-items: center; }
.mailbox-reply-input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 13px; outline: none; font-family: inherit;
  transition: border-color 0.2s; background: rgba(255, 255, 255, 0.5); color: var(--text);
}
.mailbox-reply-input:focus {
  border-color: var(--pink); background: #fff;
  box-shadow: 0 0 0 3px rgba(232, 160, 180, 0.06);
}
.mailbox-reply-btn {
  padding: 8px 14px; border: none; border-radius: 10px;
  background: var(--pink); color: #fff;
  cursor: pointer; font-size: 13px; transition: all 0.2s;
  white-space: nowrap; font-weight: 600; font-family: inherit;
}
.mailbox-reply-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-faint); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ===== 置顶气泡 ===== */
.pinned-bubble {
  margin-bottom: 10px; padding: 10px 14px 8px;
  background: linear-gradient(135deg, rgba(253, 248, 243, 0.8) 0%, rgba(251, 228, 235, 0.4) 100%);
  border-radius: 14px; border: 1px solid rgba(232, 160, 180, 0.15);
  max-height: 240px; overflow-y: auto; word-break: break-word;
  overflow-wrap: break-word; animation: bubbleFadeIn 0.4s ease;
}
@keyframes bubbleFadeIn {
  from { opacity: 0; max-height: 0; padding: 0 14px; }
  to { opacity: 1; max-height: 140px; padding: 10px 14px 8px; }
}
.pinned-bubble::-webkit-scrollbar { width: 3px; }
.pinned-bubble::-webkit-scrollbar-thumb { background: var(--text-faint); border-radius: 2px; }
.pinned-bubble-header {
  font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 6px;
}
.pinned-bubble-body { display: flex; flex-direction: column; gap: 3px; }
.pinned-bubble-author { display: flex; align-items: center; gap: 6px; }
.pinned-bubble-author .name { font-size: 12px; font-weight: 600; color: var(--accent); }
.pinned-bubble-author .time { font-size: 10px; color: var(--text-faint); font-weight: 400; }
.pinned-bubble-content {
  font-size: 13px; line-height: 1.5; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.pinned-bubble-read { font-size: 10px; color: #7a9e7a; font-weight: 600; }
.pinned-bubble-reply-divider { margin: 6px 0 4px; border: none; border-top: 1px solid var(--border); }
.pinned-bubble-reply {
  padding: 6px 10px; background: rgba(255, 255, 255, 0.5);
  border-radius: 10px; border-left: 3px solid var(--accent-light);
}
.pinned-bubble-reply .reply-author { font-size: 11px; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.pinned-bubble-reply .reply-content {
  font-size: 12px; color: var(--text-light); line-height: 1.4;
  white-space: pre-wrap; word-break: break-word;
}
.pinned-cancel-btn {
  background: rgba(92, 74, 58, 0.04); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 8px; font-size: 11px;
  color: #c44; cursor: pointer; transition: all 0.2s; font-weight: 500;
}
.pinned-cancel-btn:hover { background: rgba(220, 80, 80, 0.06); border-color: rgba(220, 80, 80, 0.2); }

/* ===== 密码模态框 ===== */
.password-modal .password-input {
  width: 100%; padding: 14px 18px;
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 18px; text-align: center; letter-spacing: 4px;
  transition: border-color 0.2s; color: var(--text);
}
.password-modal .password-input:focus { outline: none; border-color: var(--pink); }
.password-modal .password-error {
  color: #c44; font-size: 14px; text-align: center; margin-top: 8px; display: none;
}
.password-modal .password-error.show { display: block; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .top-section { flex-direction: column; padding: 12px 14px; gap: 12px; }
  .left-calendar, .right-message-board { max-width: 100%; min-width: 0; }
  .navbar { margin: 0 10px; padding: 8px 16px; }
  .nav-label { display: none; }
  .days-number { font-size: 28px; }
  .heart-icon { font-size: 26px; }
  .heart-text { font-size: 14px; }
  .container { padding: 10px; }
  .tabs { padding: 6px 8px; gap: 4px; flex-wrap: wrap; }
  .tab { padding: 5px 10px; font-size: 12px; }
  .stats-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .fab { width: 48px; height: 48px; font-size: 22px; bottom: 20px; right: 20px; }
  .memory-card { padding: 12px 14px; }
  .memory-card .card-actions { opacity: 1; }
  .export-options { flex-direction: column; }
  .msg-board-list { max-height: 180px; }
  .pinned-bubble { max-height: 180px; padding: 8px 12px 6px; }
  .pinned-bubble-header { font-size: 12px; margin-bottom: 4px; }
  .pinned-bubble-content { font-size: 12px; }
  .pinned-bubble-reply .reply-content { font-size: 11px; }
  .pinned-bubble-reply { padding: 4px 8px; }
  .right-message-board-container { min-width: 0; max-width: 100%; }
  .right-message-board { min-width: 0; max-width: 100%; padding: 14px; }
  .msg-board-input-area { gap: 6px; }
  .msg-board-input-area input { padding: 8px 10px; font-size: 13px; }
  .msg-board-input-area button { padding: 8px 12px; font-size: 13px; }
  .msg-board-nav { gap: 4px; flex-wrap: wrap; }
  .msg-nav-btn { padding: 4px 8px; font-size: 12px; }
}

/* ===== v6.0 增强：图书馆专属细节 ===== */

/* 记忆卡片悬浮光晕 */
.memory-card::before {
  content: '';
  position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(232,160,180,0.08) 0%, rgba(212,145,122,0.06) 50%, rgba(232,160,180,0.08) 100%);
  opacity: 0; transition: opacity 0.4s ease;
  z-index: -1; pointer-events: none;
}
.memory-card { position: relative; }
.memory-card:hover::before { opacity: 1; }

/* 日历今天脉冲呼吸 */
.calendar-day.today {
  animation: todayPulse 2.5s ease-in-out infinite;
}
@keyframes todayPulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(232,160,180,0.3); }
  50% { box-shadow: 0 4px 20px rgba(232,160,180,0.5); }
}

/* 留言板消息气泡渐变边框 */
.message-item.user {
  background: linear-gradient(135deg, rgba(232,160,180,0.06) 0%, rgba(251,228,235,0.1) 100%);
}
.message-item.ai {
  background: linear-gradient(135deg, rgba(212,145,122,0.06) 0%, rgba(232,180,160,0.08) 100%);
}

/* 统计卡片数字闪光 */
.stat-card .stat-value {
  background: linear-gradient(135deg, var(--pink) 30%, var(--accent) 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 导航栏品牌名渐变 */
.navbar .brand {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* FAB按钮渐变 + 光晕 */
.fab {
  background: linear-gradient(135deg, var(--pink) 0%, var(--accent) 100%);
  box-shadow: 0 4px 20px rgba(232,160,180,0.35), 0 0 40px rgba(232,160,180,0.1);
}
.fab:hover {
  box-shadow: 0 6px 24px rgba(232,160,180,0.45), 0 0 60px rgba(232,160,180,0.15);
}

/* 搜索框聚焦发光 */
.search-box:focus {
  box-shadow: 0 0 0 3px rgba(232,160,180,0.1), 0 4px 16px rgba(232,160,180,0.08);
  border-color: var(--pink);
}

/* 选项卡active渐变 */
.tab.active {
  background: linear-gradient(135deg, var(--pink) 0%, #e0a0c0 100%);
  box-shadow: 0 2px 10px rgba(232,160,180,0.3);
}

/* 登录卡片玻璃质感加强 */
.login-card {
  background: rgba(255,255,255,0.6);
  box-shadow: 0 24px 64px rgba(180,150,120,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
}

/* 登录按钮渐变 */
.login-btn {
  background: linear-gradient(135deg, var(--pink) 0%, var(--accent) 100%);
  box-shadow: 0 4px 16px rgba(232,160,180,0.25);
}

/* 记忆全文弹窗内容区 */
.detail-content {
  background: rgba(232,160,180,0.04) !important;
  color: var(--text) !important;
}

/* 左右卡片磨砂加强 */
.left-calendar, .right-message-board {
  background: rgba(255,255,255,0.5);
  box-shadow: 0 4px 24px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.5);
}

/* 分类标签hover动画增强 */
.category-tag:hover {
  box-shadow: 0 2px 8px rgba(232,160,180,0.1);
}
.category-tag.active {
  background: linear-gradient(135deg, var(--pink) 0%, #e0a0c0 100%);
  box-shadow: 0 2px 8px rgba(232,160,180,0.2);
}
