/* ============================================
   板芙生活圈 - 视觉优化版
   保持原有主色调 #00a1ff
   ============================================ */

:root {
  --brand: #00a1ff;
  --brand-dark: #0088d6;
  --brand-soft: #e8f6ff;
  --accent: #00ced1;
  --danger: #f55d01;
  --text: #2c3e50;
  --text-2: #5a6c7d;
  --text-3: #97a5b0;
  --line: #e8edf2;
  --bg: #f4f6f9;
  --white: #fff;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 3px rgba(44,62,80,.06);
  --shadow-hover: 0 4px 14px rgba(0,161,255,.12);
  --max: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

ul, ol { list-style: none; }
a { color: var(--text-2); text-decoration: none; transition: color .18s; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { font-weight: 600; line-height: 1.4; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}
.clearfix::after { content: ''; display: table; clear: both; }
.fl { float: left; }
.fr { float: right; }
.pc { display: block; }
.m { display: none; }

/* ============ 顶部 ============ */
.header {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(44,62,80,.07);
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 16px;
}
.header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.logo { flex-shrink: 0; display: flex; align-items: center; }
.logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
}
.logo a:hover { color: var(--brand); }
.logo img { height: 38px; width: auto; }
.logo span {
  display: block;
  font-size: 19px;
  font-weight: 700;
  height: auto;
  line-height: 1.2;
  padding: 0;
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,161,255,.3);
}

/* 搜索框 */
.search { flex: 1; max-width: 460px; }
.search form {
  display: flex;
  border: 2px solid var(--brand);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s;
}
.search form:focus-within { box-shadow: 0 0 0 3px rgba(0,161,255,.15); }
.search input {
  flex: 1;
  display: block;
  width: auto;
  height: auto;
  line-height: normal;
  margin: 0;
  padding: 9px 18px;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--text);
}
.search input::placeholder { color: var(--text-3); }
.search button {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0 24px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background .18s;
  white-space: nowrap;
}
.search button:hover { background: var(--brand-dark); }

/* 导航 */
.menu {
  display: flex;
  align-items: center;
  gap: 4px;
  height: auto;
  margin: 0;
  margin-left: auto;
  font-size: 15px;
}
.menu li { float: none; }
.menu li a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-2);
  font-weight: 500;
}
.menu li a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.menu li a.active { background: var(--brand); color: #fff; }

.ask { flex-shrink: 0; margin: 0; height: auto; }
.ask a {
  display: inline-block;
  font-size: 14px;
  color: #fff;
  padding: 9px 20px;
  margin: 0;
  border-radius: 999px;
  background: var(--brand);
  font-weight: 500;
  transition: background .18s;
}
.ask a:hover { background: var(--brand-dark); color: #fff; }

/* 移动端菜单按钮 */
.mdot {
  display: none;
  width: 36px;
  height: 32px;
  padding: 6px 4px;
  cursor: pointer;
  border: none;
  background: transparent;
  margin: 0;
}
.mdot span {
  display: block;
  width: 100%;
  height: 0;
  border: 1.5px solid var(--brand);
  margin: 3px 0;
  border-radius: 2px;
}
.mnav {
  display: none;
  position: fixed;
  top: 68px;
  right: 12px;
  padding: 10px 8px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(44,62,80,.15);
  z-index: 200;
  min-width: 150px;
}
.mnav.show { display: block; }
.mnav ul li { line-height: 1; }
.mnav a {
  display: block;
  padding: 10px 16px;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  font-size: 15px;
}
.mnav a:hover { background: var(--brand-soft); color: var(--brand); }

/* ============ 主体布局 ============ */
.mainbody { overflow: visible; }
.mainbody .container {
  display: flow-root;
}

.arclist {
  float: left;
  width: calc(100% - 340px);
  margin-right: 0;
}
.sidebar {
  float: right;
  width: 320px;
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: none;
}

/* ============ 面包屑 ============ */
.position {
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  color: var(--text-3);
}
.position a { color: var(--text-2); }

/* ============ 列表 ============ */
.arclist ul li {
  padding: 18px 20px;
  background: var(--white);
  margin-bottom: 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.arclist ul li:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
.arclist h2 {
  line-height: 1.55;
  font-size: 17px;
  margin-bottom: 8px;
}
.arclist h2 a { color: var(--text); font-weight: 600; }
.arclist h2 a:hover { color: var(--brand); }
.arclist li p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ 文章内容 ============ */
.article {
  padding: 24px 26px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: justify;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-2);
  word-break: break-word;
}
.article h1 {
  margin: 4px 0 16px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
}
.article img {
  max-width: 100%;
  display: block;
  margin: 22px auto;
  border-radius: var(--radius-sm);
}
.article table {
  width: 100%;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin: 16px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.article table th, .article table td {
  color: var(--text-2);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  font-size: 14px;
  max-width: 400px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.article table th { background: #f8fafc; font-weight: 600; }
.article input, .article textarea {
  width: 85%;
  resize: none;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.article input:focus, .article textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,161,255,.1);
}
.article .desc { padding: 16px 0; line-height: 1.85; }
.desc p, .desc div, .desc h3, .desc h4 { padding: 6px 0; }

/* 问答 */
li.answer {
  background: #f0fafc;
  line-height: 1.8;
  border-radius: var(--radius);
  padding: 16px 18px !important;
  margin-bottom: 12px;
  border-left: 3px solid var(--accent);
}
.answer h2 { margin-bottom: 16px; }

/* 标签 */
.tags { padding: 16px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a {
  display: inline-block;
  font-size: 13px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 4px 12px;
  border-radius: 999px;
  transition: all .18s;
}
.tags a:hover { background: var(--brand); color: #fff; }

.a-time { color: var(--accent); padding-top: 14px; font-size: 14px; }
.arclike {
  margin: 14px 0;
  height: auto;
  line-height: 1.6;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding-left: 11px;
  border-left: 3px solid var(--brand);
}
.pubinfo { padding: 14px 0; color: var(--text-3); font-size: 14px; }
.arcinfo { line-height: 1.8; font-size: 14.5px; }

/* 上下篇 */
.prenext {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 2;
}
.prenext a { color: var(--brand); }

/* ============ 侧边栏 ============ */
.sidebar li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 2.2;
  font-size: 14px;
}
.sidebar li span { padding: 0 3px; color: var(--text-3); }
.sidebar h3, .sidebar .side-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar h3::before, .sidebar .side-title::before {
  content: '';
  width: 3px; height: 15px;
  background: var(--brand);
  border-radius: 2px;
}
.sidebar a:hover { color: var(--brand); }

/* ============ 按钮 ============ */
.button-danger, .button-default {
  display: inline-block;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: none;
  color: #fff;
  transition: opacity .18s;
}
.button-danger { background: var(--danger); }
.button-default { background: var(--accent); }
.button-danger:hover, .button-default:hover { color: #fff; opacity: .88; }

/* ============ 友情链接 ============ */
.flink {
  margin-top: 14px;
  padding: 16px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 2.1;
}
.flink a { margin-right: 14px; color: var(--text-2); }
.flink a:hover { color: var(--brand); }

/* ============ 页脚 ============ */
.footer {
  margin-top: 24px;
  padding: 26px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13.5px;
  color: var(--text-3);
  line-height: 2;
}
.footer a { color: var(--text-3); }
.footer a:hover { color: var(--brand); }

/* ============ 分页 ============ */
ul.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 22px 0;
  flex-wrap: wrap;
}
ul.pagination li {
  float: none;
  padding: 0;
  border: none;
}
ul.pagination li a,
ul.pagination li span,
ul.pagination li.active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-2);
  background: var(--white);
}
ul.pagination li a:hover { border-color: var(--brand); color: var(--brand); }
ul.pagination li.active a,
ul.pagination li.active span {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

/* ============ 空状态 ============ */
.empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 15px;
}

/* ============ 响应式 ============ */
@media screen and (max-width: 1100px) {
  .arclist { width: calc(100% - 300px); }
  .sidebar { width: 280px; }
  .menu li a { padding: 8px 10px; font-size: 14px; }
}

@media screen and (max-width: 900px) {
  .arclist { width: 100%; float: none; }
  .sidebar { width: 100%; float: none; margin-top: 14px; }
  .container { width: 100%; }
}

@media screen and (max-width: 790px) {
  .pc { display: none !important; }
  .m { display: block; }
  .mdot { display: block; }
  .header .container { height: 60px; gap: 10px; flex-wrap: wrap; padding: 0 12px; }
  .search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-bottom: 10px;
  }
  .search input { padding: 8px 15px; }
  .search button { padding: 0 18px; }
  .logo a { font-size: 17px; }
  .logo-mark { width: 30px; height: 30px; font-size: 15px; }
  .ask a { padding: 7px 15px; font-size: 13px; }
  .mnav { top: 60px; }
  .article { padding: 18px 16px; font-size: 15px; }
  .article h1 { font-size: 19px; }
  .arclist ul li { padding: 15px 16px; }
  .arclist h2 { font-size: 16px; }
}

@media screen and (max-width: 480px) {
  body { font-size: 14.5px; }
  .container { padding: 0 10px; }
  .logo a { font-size: 16px; }
  .arclist ul li { padding: 13px 14px; margin-bottom: 10px; }
  .arclike { font-size: 14px; }
  .footer { font-size: 12.5px; padding: 20px 10px; }
}

/* 热门站点区块 */
.hot-block {
  margin-top: 14px;
  padding: 18px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hot-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hot-title::before {
  content: '';
  width: 3px; height: 15px;
  background: var(--accent);
  border-radius: 2px;
}
.hot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hot-grid a {
  padding: 5px 12px;
  background: var(--bg);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  transition: all .18s;
}
.hot-grid a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
