/* ===== 设计 Token ===== */
:root {
  /* 背景 */
  --bg-gradient: linear-gradient(135deg, #f6f7fb 0%, #faf6f8 50%, #f5f9f7 100%);

  /* 玻璃 */
  --glass-bg: rgba(255, 255, 255, 0.22);
  --glass-bg-hero: rgba(255, 255, 255, 0.26);
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-blur: blur(18px) saturate(140%);
  --glass-shadow: 0 4px 22px rgba(40, 40, 80, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.4);

  /* 分类色（有色玻璃） */
  --c-tool1: rgba(252, 212, 222, 0.22);
  --c-tool2: rgba(252, 232, 200, 0.26);
  --c-featured: rgba(200, 216, 245, 0.26);
  --c-articles: rgba(210, 224, 248, 0.22);
  --c-topbar: rgba(198, 232, 235, 0.24);
  --c-english: rgba(248, 238, 214, 0.30);
  --c-history: rgba(212, 219, 230, 0.36);
  --c-aihot: rgba(250, 214, 205, 0.30);
  --c-dash: rgba(216, 224, 248, 0.30);
  --c-insp: rgba(250, 224, 232, 0.32);

  /* 文字 */
  --text-strong: #2a2a38;
  --text-body: #54545f;
  --text-muted: #737387;
  --accent: #4773c9;

  /* 尺寸 */
  --radius: 18px;
  --gap: 12px;
  --maxw: 980px;

  /* 动效 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-body);
  background: var(--bg-gradient);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

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

.serif { font-family: 'DM Serif Display', serif; }

/* ===== 背景层 ===== */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.30;
}
.blob-1 { width: 240px; height: 240px; background: #cdd8f2; top: -60px; left: -50px; }
.blob-2 { width: 220px; height: 220px; background: #f2d8e2; top: 40%; right: -60px; }
.blob-3 { width: 200px; height: 200px; background: #d6eede; bottom: -50px; left: 28%; }
.blob-4 { width: 180px; height: 180px; background: #f4ecd6; top: 16%; left: 44%; }

/* ===== Bento 网格 ===== */
.bento {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: var(--gap);
}

/* ===== 玻璃卡片基类 ===== */
.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 18px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* 卡片跨度 */
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: 1 / -1; }
.row-2 { grid-row: span 2; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .bento { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4, .row-2 { grid-column: auto; grid-row: auto; }
}

/* ===== 导航 ===== */
.nav {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo { font-size: 1.2rem; color: var(--text-strong); }

@media (max-width: 480px) {
  .nav { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ===== Hero 卡 ===== */
.hero {
  background: var(--glass-bg-hero);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}
.avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b8fd4, #9fb8e8);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(107, 143, 212, 0.3);
}
.hero-name { font-size: 1.7rem; line-height: 1.1; color: var(--text-strong); }
.hero-role {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--accent);
  margin: 4px 0 10px;
}
.hero-bio { font-size: 0.82rem; line-height: 1.6; color: var(--text-body); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  border-radius: 14px; padding: 4px 10px;
  font-size: 0.68rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.4);
  color: #5a72b0;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

/* ===== 通用小标签 ===== */
.label {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 6px;
}

/* ===== 工具卡 ===== */
.tool { cursor: pointer; }
.tool-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.tool-name { font-size: 0.82rem; font-weight: 700; }
.c-tool1 { background: var(--c-tool1); }
.c-tool1 .label { color: #b05a72; }
.c-tool1 .tool-name { color: #902848; }
.c-tool2 { background: var(--c-tool2); }
.c-tool2 .label { color: #9b6b27; }
.c-tool2 .tool-name { color: #8a5808; }

/* ===== 作品精选卡 ===== */
.c-featured { background: var(--c-featured); }
.featured::after {
  content: '';
  position: absolute; bottom: -20px; right: -20px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(107, 143, 212, 0.25), transparent 70%);
  border-radius: 50%;
}
.featured-badge {
  display: inline-block;
  font-size: 0.6rem; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px; border-radius: 12px;
  background: rgba(107, 143, 212, 0.85); color: #fff;
  margin-bottom: 8px;
}
.featured-title { font-size: 1.1rem; color: #2a3a5e; margin-bottom: 4px; }
.featured-desc { font-size: 0.78rem; line-height: 1.5; color: #48587e; }

/* ===== 文章卡 ===== */
.c-articles { background: var(--c-articles); }
.c-articles .label { color: #5a72b0; }
.article-list { list-style: none; }
.article-item {
  display: flex; gap: 10px;
  padding: 7px 0;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(120, 120, 150, 0.12);
}
.article-item:last-child { border-bottom: none; }
.article-date {
  font-weight: 800; white-space: nowrap;
  color: #5e71bb; min-width: 2.2em;
}
.article-title { font-weight: 600; color: var(--text-strong); line-height: 1.4; }

/* ===== 玻璃降级（不支持 backdrop-filter 时提高不透明度保证可读） ===== */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: rgba(255, 255, 255, 0.85); }
  .hero { background: rgba(255, 255, 255, 0.88); }
  .c-tool1 { background: rgba(252, 228, 232, 0.9); }
  .c-tool2 { background: rgba(254, 240, 219, 0.9); }
  .c-featured { background: rgba(227, 236, 251, 0.9); }
  .c-articles { background: rgba(240, 244, 251, 0.9); }
  .c-topbar { background: rgba(222, 240, 241, 0.9); }
  .c-english { background: rgba(250, 242, 224, 0.9); }
  .c-history { background: rgba(224, 229, 238, 0.9); }
  .c-aihot { background: rgba(251, 228, 222, 0.9); }
  .c-dash { background: rgba(224, 230, 250, 0.9); }
  .c-insp { background: rgba(251, 230, 238, 0.9); }
  .social-link { background: rgba(255, 255, 255, 0.85); }
}

/* ===== Hover 动效 ===== */
.card {
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(40, 40, 80, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ===== 光斑浮动 ===== */
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(14px, -18px); }
}
.blob-1 { animation: float 18s ease-in-out infinite; }
.blob-2 { animation: float 22s ease-in-out infinite reverse; }
.blob-3 { animation: float 20s ease-in-out infinite; }
.blob-4 { animation: float 26s ease-in-out infinite reverse; }

/* ===== 尊重减弱动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .card { transition: none; }
  .card:hover { transform: none; }
  .social-link { transition: none; }
  .social-link:hover { transform: none; }
}

/* ===== 键盘可访问性 ===== */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== 页脚 / Linktree 风格社交链接 ===== */
.footer {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 20px 56px;
  text-align: center;
}
.footer-tagline {
  font-size: 1.2rem;
  color: var(--text-strong);
  margin-bottom: 18px;
}
.social-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  margin: 0 auto 22px;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  font-weight: 700;
  color: var(--text-strong);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(40, 40, 80, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.social-icon { display: inline-flex; }
.social-icon svg { width: 20px; height: 20px; display: block; }
.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ===== 顶栏：时间 + 天气 ===== */
.c-topbar {
  background: var(--c-topbar);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: auto;
}
.c-topbar .label { color: #1a6363; }
.topbar-weather { text-align: right; }
.clock-time {
  font-size: 1.9rem; line-height: 1.1; color: var(--text-strong);
  margin: 4px 0 6px; font-variant-numeric: tabular-nums;
}
.clock-meta { font-size: 0.78rem; font-weight: 600; color: #1a6363; }
.weather-now { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 4px 0 6px; }
.weather-icon { font-size: 1.5rem; }
.weather-temp { font-size: 1.9rem; line-height: 1.1; color: var(--text-strong); }
.weather-meta { font-size: 0.78rem; font-weight: 600; color: #1a6363; }
@media (max-width: 480px) {
  .c-topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .topbar-weather { text-align: left; }
  .weather-now { justify-content: flex-start; }
}

/* ===== 随机英语卡 ===== */
.c-english {
  background: var(--c-english);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.english-quote { font-size: 1.15rem; line-height: 1.4; color: var(--text-strong); margin-bottom: 8px; }
.english-zh { font-size: 0.85rem; color: #9b6b27; }

/* ===== AIHOT 日报入口卡 ===== */
.c-aihot {
  background: var(--c-aihot);
  display: flex;
  flex-direction: column;
}
.c-aihot .label { color: #b23a26; }
.aihot-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.aihot-all { font-size: 0.78rem; font-weight: 800; color: #b23a26; white-space: nowrap; }
.aihot-list { display: flex; flex-direction: column; }
.aihot-loading { font-size: 0.82rem; color: var(--text-muted); }
.aihot-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(120, 120, 150, 0.12);
}
.aihot-item:last-child { border-bottom: none; }
.aihot-sec {
  font-size: 0.62rem;
  font-weight: 800;
  color: #b23a26;
  background: rgba(178, 58, 38, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.aihot-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.4;
  flex: 1;
  transition: color 0.2s var(--ease);
}
.aihot-item:hover .aihot-item-title { color: #b23a26; }
.aihot-src {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 28%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aihot-fallback { font-size: 0.82rem; font-weight: 600; color: #b23a26; }
@media (max-width: 480px) {
  .aihot-src { display: none; }
}

/* ===== 仪表盘卡 ===== */
.c-dash { background: var(--c-dash); display: flex; flex-direction: column; }
.c-dash .label { color: #3f5bb0; }
.dash-tabs {
  display: flex; gap: 4px; background: rgba(255, 255, 255, 0.4);
  padding: 4px; border-radius: 12px; margin: 4px 0 14px;
}
.dash-tab {
  flex: 1; text-align: center; font-size: 0.76rem; font-weight: 700;
  padding: 7px 4px; border-radius: 9px; color: var(--text-muted);
  cursor: pointer; border: none; background: none; font-family: inherit;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.dash-tab.on { background: #fff; color: var(--accent); box-shadow: 0 1px 4px rgba(40, 40, 80, 0.08); }
.dash-panel { display: none; flex: 1; }
.dash-panel.on { display: block; }

/* ===== 今日清单 ===== */
.task-add { display: flex; gap: 6px; margin-bottom: 12px; }
.task-time {
  width: 88px; flex-shrink: 0; border: 1px solid rgba(120, 120, 150, 0.2);
  background: rgba(255, 255, 255, 0.6); border-radius: 9px; padding: 7px 8px;
  font-size: 0.74rem; font-family: inherit; color: var(--text-strong);
}
.task-text {
  flex: 1; min-width: 0; border: 1px solid rgba(120, 120, 150, 0.2);
  background: rgba(255, 255, 255, 0.6); border-radius: 9px; padding: 7px 10px;
  font-size: 0.78rem; font-family: inherit; color: var(--text-strong);
}
.task-add-btn {
  border: none; background: var(--accent); color: #fff; border-radius: 9px;
  padding: 0 14px; font-weight: 800; font-size: 1rem; cursor: pointer; flex-shrink: 0;
}
.task-list { overflow-y: auto; }
.task-empty { font-size: 0.78rem; color: var(--text-muted); padding: 12px 0; }
.task-group {
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--text-muted); margin: 12px 0 2px;
}
.task-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 0;
  border-bottom: 1px solid rgba(120, 120, 150, 0.1); font-size: 0.82rem; color: var(--text-strong);
}
.task-item:last-child { border-bottom: none; }
.task-item time {
  font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums;
  min-width: 3.1em; font-size: 0.8rem;
}
.task-anytime { min-width: 3.1em; font-size: 0.72rem; color: var(--text-muted); font-weight: 700; }
.task-box {
  width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--accent);
  flex-shrink: 0; cursor: pointer;
}
.task-label { flex: 1; cursor: pointer; line-height: 1.4; }
.task-item.done .task-label { text-decoration: line-through; color: var(--text-muted); }
.task-item.done .task-box { background: var(--accent); opacity: 0.5; }
.task-item.now { background: rgba(71, 115, 201, 0.09); border-radius: 8px; padding: 8px; margin: 0 -8px; }
.task-del {
  border: none; background: none; color: var(--text-muted); cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 2px 4px; opacity: 0; transition: opacity 0.2s var(--ease);
}
.task-item:hover .task-del { opacity: 0.6; }
.task-del:hover { opacity: 1 !important; color: #b05a72; }
/* 触屏设备没有 hover，删除按钮常显，否则手机上无法删除 */
@media (hover: none) {
  .task-del { opacity: 0.6; }
}

/* ===== 番茄钟 ===== */
.pomo { text-align: center; padding: 10px 0 2px; }
.pomo-time {
  font-size: 3rem; line-height: 1; color: var(--text-strong);
  font-variant-numeric: tabular-nums; margin-bottom: 14px;
}
.pomo-modes { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.pomo-mode {
  font-size: 0.66rem; font-weight: 800; padding: 4px 11px; border-radius: 10px;
  color: var(--text-muted); background: rgba(255, 255, 255, 0.5); border: none;
  cursor: pointer; font-family: inherit; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.pomo-mode.on { background: var(--accent); color: #fff; }
.pomo-btns { display: flex; gap: 8px; justify-content: center; }
.pomo-btns button {
  border: none; border-radius: 10px; padding: 9px 20px; font-weight: 800;
  font-size: 0.82rem; cursor: pointer; font-family: inherit;
}
.pomo-start { background: var(--accent); color: #fff; }
.pomo-reset { background: rgba(255, 255, 255, 0.6); color: var(--text-body); }
.pomo-count { font-size: 0.68rem; color: var(--text-muted); margin-top: 14px; }

/* ===== 灵感生成器卡 ===== */
.c-insp { background: var(--c-insp); display: flex; flex-direction: column; }
.c-insp .label { color: #b05a72; }
.insp-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.insp-cat {
  font-size: 0.66rem; font-weight: 700; padding: 4px 11px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.5); color: #b05a72; border: none;
  cursor: pointer; font-family: inherit; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.insp-cat.on { background: #c06480; color: #fff; }
.insp-out {
  flex: 1; background: rgba(255, 255, 255, 0.55); border-radius: 12px; padding: 14px;
  min-height: 80px; font-size: 0.9rem; line-height: 1.55; color: var(--text-strong);
}
.insp-out.loading { color: var(--text-muted); }
.insp-btn {
  margin-top: 12px; width: 100%; border: none; border-radius: 11px; padding: 11px;
  font-weight: 800; font-size: 0.85rem; background: #c06480; color: #fff;
  cursor: pointer; font-family: inherit; transition: opacity 0.2s var(--ease);
}
.insp-btn:disabled { opacity: 0.6; cursor: default; }

/* ===== 历史上的今天卡 ===== */
.c-history { background: var(--c-history); display: flex; flex-direction: column; }
.c-history .label { color: #5a6b86; }
.history-list { display: flex; flex-direction: column; }
.history-loading { font-size: 0.82rem; color: var(--text-muted); }
.history-item {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid rgba(120, 120, 150, 0.1); font-size: 0.8rem;
}
.history-item:last-child { border-bottom: none; }
.history-year {
  font-weight: 800; color: #5f7196; font-variant-numeric: tabular-nums;
  flex-shrink: 0; min-width: 2.8em;
}
.history-title { flex: 1; color: var(--text-strong); line-height: 1.4; }
.history-type {
  font-size: 0.6rem; font-weight: 800; color: #5a6b86;
  background: rgba(95, 113, 150, 0.12); padding: 1px 6px; border-radius: 8px;
  flex-shrink: 0; white-space: nowrap; align-self: center;
}
