/* AI重启人生 - 天蓝 / 海蓝主题，响应式 */
:root {
  --primary: #0284c7;
  --deep: #0c4a6e;
  --light: #e0f2fe;
  --sky: #f0f9ff;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --shadow: 0 4px 20px rgba(12, 74, 110, 0.08);
  --radius: 12px;
  --max: 760px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink); background: var(--sky); line-height: 1.75; font-size: 16px;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.site-header { background: linear-gradient(135deg, var(--deep), var(--primary)); color: #fff; }
.site-header .inner { max-width: var(--max); margin: 0 auto; padding: 24px 20px 20px; }
/* 第一行：网站名称 + 标语；第二行：Banner 图（搜索按钮压在其右下角） */
.header-content { margin-bottom: 14px; }
.site-title { font-size: 26px; font-weight: 600; letter-spacing: 1px; display: inline-block; }
.site-tagline { font-size: 14px; opacity: .85; margin-top: 2px; }
.banner-area { position: relative; width: 100%; aspect-ratio: 2 / 1; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.12); }
.banner-wrap { position: absolute; inset: 0; z-index: 0; }
.banner-slide { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; pointer-events: none; transition: opacity .9s ease-in-out; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-slide.active { opacity: 1; pointer-events: auto; }
.banner-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.8); font-size: 13px; background: linear-gradient(135deg, rgba(8,47,73,.45), rgba(2,132,199,.45)); }
.banner-dots { position: absolute; left: 12px; bottom: 14px; z-index: 2; display: flex; gap: 6px; }
.banner-dots button { width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; transition: width .2s; }
.banner-dots button.active { width: 18px; border-radius: 4px; background: #fff; }
/* 搜索：白色圆形底 + 深色放大镜，压在 Banner 右下角 */
.search-fab {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.search-fab:hover { background: #fff; transform: scale(1.08); }
.search-fab svg { width: 17px; height: 17px; stroke: #1e293b; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.container { max-width: var(--max); margin: 0 auto; padding: 20px; }
.board { background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.board-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; cursor: pointer; user-select: none;
  background: linear-gradient(90deg, var(--light), #fff);
  border-left: 4px solid var(--primary);
}
.board-head h2 { font-size: 18px; font-weight: 600; color: var(--deep); }
.board-head .toggle-hint { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); }
.board-head .toggle-text { font-size: 12px; color: var(--primary); }
.board-head .arrow { transition: transform .25s; color: var(--primary); font-size: 12px; }
.board.open .arrow { transform: rotate(180deg); }
/* 最新文章卡片：公众号风格（桌面左图右文，手机上图下文） */
.board-latest {
  display: flex; gap: 18px; padding: 18px 20px; align-items: stretch;
  transition: background .18s;
}
.board-latest:hover { background: var(--sky); }
.board-latest .thumb {
  /* 2.35:1，与微信公众号头条封面一致（900×383 / 1080×460） */
  width: 220px; aspect-ratio: 2.35 / 1; object-fit: cover; border-radius: 10px;
  flex-shrink: 0; background: var(--light);
}
.board-latest .thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--light), var(--sky));
  color: var(--primary); font-size: 13px;
}
.board-latest .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.board-latest .badge {
  display: inline-block; align-self: flex-start; font-size: 11px; color: #fff;
  background: var(--primary); padding: 2px 8px; border-radius: 4px; margin-bottom: 6px;
}
.board-latest h3 { font-size: 18px; line-height: 1.45; margin-bottom: 8px; color: var(--ink); }
.board-latest .excerpt {
  color: var(--muted); font-size: 13.5px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.board-latest .date, .post-item .date { color: var(--muted); font-size: 12px; margin-top: auto; padding-top: 8px; }
/* 板块默认预览：额外 2 条最近文章的标题 + 摘要（无图），用蓝色细线分隔各条 */
.board-preview { border-top: 2px solid var(--primary); }
.preview-item { display: block; padding: 16px 20px 18px; border-bottom: 2px solid var(--primary); transition: background .18s; }
.preview-item:last-child { border-bottom: none; }
.preview-item:hover { background: var(--sky); }
.preview-item h4 { font-size: 15px; line-height: 1.5; color: var(--ink); margin-bottom: 5px; }
.preview-item:hover h4 { color: var(--primary); }
.preview-item .excerpt { color: var(--muted); font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board-list { display: none; border-top: 1px solid var(--border); }
.board.open .board-list { display: block; }
.list-hint { padding: 10px 20px 4px; font-size: 12px; color: var(--muted); }
.post-item { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; }
.post-item:last-child { border-bottom: none; }
.post-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.post-item a { color: var(--ink); font-size: 14px; flex: 1; }
.post-item a:hover { color: var(--primary); }
.post-item .views { color: var(--muted); font-size: 12px; }

.article { background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px; }
.article h1 { font-size: 24px; line-height: 1.4; color: var(--ink); margin-bottom: 12px; }
.article .info { color: var(--muted); font-size: 13px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.article .cover { width: 100%; border-radius: 10px; margin-bottom: 20px; }
.article-content { font-size: 16px; line-height: 1.9; color: #1e293b; word-wrap: break-word; }
.article-content h2 { font-size: 20px; margin: 28px 0 12px; color: var(--deep); }
.article-content h3 { font-size: 18px; margin: 22px 0 10px; color: var(--deep); }
.article-content p { margin: 14px 0; }
.article-content img { border-radius: 8px; margin: 16px 0; }
.article-content iframe { width: 100%; aspect-ratio: 16 / 9; border: none; border-radius: 8px; margin: 16px 0; background: #0f172a; }
.article-content blockquote { border-left: 4px solid var(--primary); background: var(--sky); padding: 10px 16px; margin: 16px 0; color: var(--muted); }
.article-content ul, .article-content ol { padding-left: 24px; margin: 14px 0; }
.article-actions { display: flex; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.act-btn { flex: 1; text-align: center; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--sky); color: var(--deep); cursor: pointer; font-size: 14px; }
.act-btn:hover { background: var(--light); }
.back-link { display: inline-block; margin-bottom: 14px; font-size: 14px; }

.search-box { display: flex; gap: 8px; margin-bottom: 20px; }
.search-box input { flex: 1; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; }
.search-box input:focus { border-color: var(--primary); }
.search-box button { padding: 0 22px; border: none; border-radius: 8px; background: var(--primary); color: #fff; font-size: 15px; cursor: pointer; }
.search-back-row { margin: -8px 0 22px; }
.back-home-btn { display: inline-block; padding: 8px 18px; border: 1px solid var(--primary); border-radius: 20px; background: #fff; color: var(--primary); font-size: 14px; text-decoration: none; }
.back-home-btn:hover { background: var(--primary); color: #fff; }
.result-item { background: var(--bg); border-radius: 10px; padding: 16px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.result-item h3 { font-size: 16px; margin-bottom: 6px; }
.result-item .excerpt { color: var(--muted); font-size: 13px; }

/* 关于我 / 联系方式：页脚与板块展开区共用 */
.about-contact { border-top: 1px solid var(--border); background: var(--sky); padding: 18px 20px 20px; text-align: left; color: var(--ink); }
.board .about-contact { background: #fbfdff; }
.ac-block + .ac-block { margin-top: 16px; }
.ac-block h3 { font-size: 15px; color: var(--deep); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.ac-block h3::before { content: ''; width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }
.ac-text { color: #334155; font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.ac-line { display: flex; gap: 10px; font-size: 14px; padding: 3px 0; color: #334155; word-break: break-all; }
.ac-key { color: var(--muted); min-width: 38px; flex-shrink: 0; }
.ac-qr { margin-top: 12px; text-align: center; }
/* 二维码居中：手机最多占屏宽一半，PC 固定 150px */
.ac-qr img { width: min(50vw, 150px); height: auto; aspect-ratio: 1 / 1; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 4px; margin: 0 auto; }
.ac-qr span { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; text-align: center; }

.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 28px 20px 40px; }

@media (max-width: 600px) {
  .site-header .inner { padding: 20px 14px 16px; }
  .site-title { font-size: 22px; }
  .banner-area { border-radius: 10px; }
  .search-fab { right: 10px; bottom: 10px; width: 28px; height: 28px; }
  .search-fab svg { width: 16px; height: 16px; }
  .banner-dots { left: 10px; bottom: 12px; }
  .container { padding: 14px; }
  .article { padding: 20px 16px; }
  .article h1 { font-size: 21px; }
  /* 手机端：头图铺满卡片宽度，标题与摘要在下方 */
  .board-latest { flex-direction: column; gap: 0; padding: 14px 16px; }
  .board-latest .thumb { width: 100%; min-height: 0; height: auto; aspect-ratio: 2.35 / 1; border-radius: 8px; }
  .board-latest .meta { padding-top: 12px; }
  .board-latest h3 { font-size: 17px; }
  .list-hint { padding-left: 16px; padding-right: 16px; }
}

/* 后台样式在 admin.css 中单独引入 */
