/* ==========================================================================
   大本营 · 明亮简约风格样式表
   --------------------------------------------------------------------------
   设计思路：
   - 浅灰底 + 纯白卡片 + 靛蓝点缀，干净通透（参考 Notion / Linear 的质感）
   - 想换配色，只改下面 :root 里的变量即可，全站自动生效
   ========================================================================== */

/* ---------- 全局设计变量（配色 / 圆角 / 阴影都在这） ---------- */
:root {
  --bg:         #f6f7f9;              /* 页面背景：浅灰 */
  --card:       #ffffff;              /* 卡片背景：纯白 */
  --text:       #1f2937;              /* 主文字：深灰蓝 */
  --text-sub:   #6b7280;              /* 次要文字：中灰 */
  --text-mute:  #9ca3af;              /* 更淡的文字 */
  --border:     #eaecef;              /* 边框 */
  --accent:     #4f46e5;              /* 点缀色：靛蓝 */
  --accent-2:   #7c3aed;              /* 渐变第二色：紫 */
  --radius:     16px;                 /* 卡片圆角 */
  --shadow-sm:  0 1px 2px rgba(31, 41, 55, .04);
  --shadow-md:  0 12px 32px rgba(31, 41, 55, .10);
}

/* ---------- 基础重置 ---------- */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;   /* 让中文字体更细腻 */
}

/* ---------- 背景装饰光晕（两个模糊色块，制造层次） ---------- */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .40;
  pointer-events: none;                /* 不挡鼠标点击 */
  z-index: 0;
}
.orb-1 { width: 420px; height: 420px; background: #c7d2fe; top: -150px; left: -120px; }
.orb-2 { width: 400px; height: 400px; background: #ddd6fe; bottom: -170px; right: -130px; }

/* ---------- 主容器：居中 + 限制最大宽度 ---------- */
.container {
  position: relative;
  z-index: 1;                          /* 盖在光晕之上 */
  max-width: 880px;
  margin: 0 auto;
  padding: 72px 24px 40px;
}

/* ==========================================================================
   顶部：个人标识区
   ========================================================================== */
.hero {
  text-align: center;
  margin-bottom: 56px;
}

/* 头像：渐变方块 + 首字母 */
.avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(79, 70, 229, .28);
  user-select: none;
}

.hero h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: .5px;
}

.subtitle {
  margin: 8px 0 18px;
  color: var(--text-sub);
  font-size: 15px;
  letter-spacing: 1px;
}

/* 身份标签组 */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0;
}
.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   中部：项目入口区块
   ========================================================================== */
.section { margin-bottom: 40px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 0 4px;
}
.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.section-hint {
  font-size: 13px;
  color: var(--text-mute);
}

/* 卡片网格：两列，窄屏自动变一列 */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ---------- 卡片通用样式 ---------- */
.card {
  display: block;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;               /* 去掉链接下划线 */
  color: inherit;
  transition: transform .22s ease,
              box-shadow .22s ease,
              border-color .22s ease;
}

/* 可点击的卡片：鼠标悬停时微微上浮 */
a.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d9dce3;
}
a.card:active { transform: translateY(-1px); }

/* 卡片顶部一行：图标 + 状态徽标 */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-icon {
  font-size: 26px;
  line-height: 1;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
}
.card p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-sub);
}

/* 卡片底部链接文字 */
.card-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.card-link .arrow {
  display: inline-block;
  transition: transform .22s ease;
}
a.card:hover .card-link .arrow { transform: translateX(3px); }

/* ---------- 状态徽标 ---------- */
.badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .3px;
}
.badge-plan {                        /* 规划中：淡蓝 */
  background: #eef2ff;
  color: #4f46e5;
}
.badge-soon {                        /* 建设中：淡灰 */
  background: #f3f4f6;
  color: #9ca3af;
}

/* ---------- 未上线卡片：整体降低存在感 ---------- */
.card-soon {
  background: #fbfbfc;
  border-style: dashed;              /* 虚线边框，暗示"还没好" */
}
.card-soon .card-icon { opacity: .55; }
.card-soon .card-link { color: var(--text-mute); }
.card-soon { cursor: default; }

/* ==========================================================================
   底部：运行状态栏
   ========================================================================== */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-mute);
}
.footer .sep { opacity: .5; }

/* 绿色呼吸小圆点：表示"在线" */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  animation: breathe 2s infinite;
}
@keyframes breathe {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ==========================================================================
   响应式：手机屏幕（宽度 < 640px）
   ========================================================================== */
@media (max-width: 640px) {
  .container { padding: 48px 18px 32px; }

  .hero { margin-bottom: 40px; }
  .hero h1 { font-size: 32px; }
  .avatar { width: 62px; height: 62px; font-size: 28px; }

  .grid { grid-template-columns: 1fr; }   /* 单列 */
}

/* ---------- 尊重系统「减少动效」偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   备忘录页面（memo.html）专用样式
   ========================================================================== */

/* 「已上线」徽标：淡绿 */
.badge-live {
  background: #ecfdf5;
  color: #059669;
}

/* ---------- 页头 ---------- */
.memo-top {
  margin-bottom: 32px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 13px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: color .2s ease, border-color .2s ease;
}
.back-link:hover {
  color: var(--accent);
  border-color: #c7d2fe;
}

.memo-top h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
}
.memo-top .subtitle {
  margin: 8px 0 0;
  color: var(--text-sub);
  font-size: 14px;
  letter-spacing: 1px;
}

/* ---------- 工具栏：搜索框 + 分类筛选 ---------- */
.memo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

#memo-search {
  flex: 1 1 240px;
  min-width: 0;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
#memo-search:focus {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-sub);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s ease;
}
.chip:hover { border-color: #c7d2fe; color: var(--accent); }
.chip-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- 备忘卡片列表 ---------- */
.memo-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.memo-card {
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s ease, border-color .22s ease;
}
.memo-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d9dce3;
}

.memo-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.memo-card-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.memo-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  font-size: 12.5px;
  color: var(--text-mute);
}
.memo-tag {
  color: var(--accent);
  opacity: .85;
}

/* 正文：默认限高折叠，.memo-open 时展开 */
.memo-content {
  font-size: 14.5px;
  color: var(--text);
  max-height: 216px;                 /* 约 9 行 */
  overflow: hidden;
  transition: max-height .35s ease;
}
.memo-open .memo-content { max-height: 4000px; }

.memo-content p { margin: 0 0 10px; }
.memo-content h2, .memo-content h3 {
  margin: 14px 0 8px;
  font-size: 15px;
  font-weight: 600;
}
.memo-content ul { margin: 0 0 10px; padding-left: 22px; }
.memo-content li { margin: 3px 0; }
.memo-content strong { color: var(--accent); }
.memo-content code {
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 13px;
}
.memo-content blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 3px solid #c7d2fe;
  background: #f8faff;
  border-radius: 0 8px 8px 0;
  color: var(--text-sub);
  font-size: 13.5px;
}

.memo-toggle {
  display: block;
  margin: 10px 0 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
.memo-toggle:hover { text-decoration: underline; }

/* ---------- 加载中 / 空状态 ---------- */
.memo-loading, .memo-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--text-mute);
  font-size: 14px;
}
.memo-empty-icon { font-size: 34px; display: block; margin-bottom: 10px; }
.memo-empty p { margin: 0; }

/* ---------- 手机端 ---------- */
@media (max-width: 640px) {
  .memo-top h1 { font-size: 28px; }
  .memo-card { padding: 18px; }
  .memo-card-head { flex-direction: column; gap: 6px; }
}
