:root {
  --bg: #0b0f14;
  --panel: #111821;
  --panel-2: #162230;
  --line: #223247;
  --text: #e6edf5;
  --muted: #8fa3b8;
  --accent: #4da3ff;
  --up: #ff5c5c;
  --down: #35c77a;
  --gold: #f0b84b;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 800px at 20% -10%, #16283d 0%, var(--bg) 55%);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button, a { font: inherit; }
button { cursor: pointer; }
.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
}
.ghost:hover { color: var(--text); border-color: var(--accent); }
.link { text-decoration: none; }
.detail-head .link { flex-shrink: 0; white-space: nowrap; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 15, 21, .85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand h1 { margin: 0; font-size: 20px; letter-spacing: .5px; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #666; display: inline-block; }
.dot.ok { background: var(--down); box-shadow: 0 0 8px rgba(53,199,122,.7); }
.dot.warn { background: var(--gold); box-shadow: 0 0 8px rgba(240,184,75,.6); }
.dot.bad { background: var(--up); box-shadow: 0 0 8px rgba(255,92,92,.6); }

.layout {
  display: grid;
  grid-template-columns: 230px minmax(320px, 400px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  height: calc(100vh - 78px);
}
.sidebar, .posts-pane, .detail-pane {
  background: linear-gradient(180deg, rgba(20,30,42,.92), rgba(13,20,28,.92));
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 0;
  min-width: 0;
}
.sidebar { display: flex; flex-direction: column; overflow: hidden; }
.sidebar-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 12px; letter-spacing: .5px;
}
.bloggers { padding: 8px; overflow: auto; }
.blogger {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 6px;
}
.blogger:hover { background: var(--panel-2); }
.blogger.active { background: #17283b; border-color: #2b5b88; }
.blogger .name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.blogger .meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.blogger .latest {
  color: #b7c6d8; font-size: 11px; margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge {
  font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 4px;
  background: #2a3a4d; color: #b9c9da;
}
.badge.top { background: #4a3412; color: #ffd27a; }

.posts-pane { display: flex; flex-direction: column; overflow: hidden; }
.pane-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 14px; border-bottom: 1px solid var(--line);
}
.pane-head h2 { margin: 0; font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.posts { overflow: auto; padding: 8px; }
.post {
  width: 100%; text-align: left; border: 1px solid transparent;
  background: transparent; color: var(--text); border-radius: 10px;
  padding: 10px; margin-bottom: 6px;
}
.post:hover { background: var(--panel-2); }
.post.active { background: #17283b; border-color: #2b5b88; }
.post .title { font-weight: 600; margin-bottom: 4px; }
.post .snippet {
  color: #a9bacd; font-size: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post .meta { color: var(--muted); font-size: 11px; margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }
.post .tags { margin-top: 6px; display: flex; gap: 5px; flex-wrap: wrap; }
.tag { font-size: 10px; color: #9fc2e8; background: #1b2d42; border: 1px solid #294668; padding: 2px 5px; border-radius: 4px; }

.detail-pane { overflow: auto; padding: 18px; }
.empty { color: var(--muted); text-align: center; padding: 80px 10px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-head h3 { margin: 0; font-size: 19px; line-height: 1.4; }
.content { white-space: pre-wrap; word-break: break-word; margin: 14px 0 18px; color: #d8e3ef; }
.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.images img { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #0a0f14; }
.comments-head { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }
.comments-head h4 { margin: 0; }
.comments { margin-top: 8px; }
.comment { padding: 9px 0; border-bottom: 1px dashed #1f2d3d; }
.comment .who { font-size: 12px; color: #9fc2e8; display: flex; gap: 6px; align-items: center; }
.comment .who .author { color: #ffd27a; }
.comment .quote {
  margin-top: 5px;
  padding: 6px 9px;
  border-left: 3px solid #2b5b88;
  background: rgba(27, 45, 66, .55);
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  color: #9fb3c8;
  white-space: pre-wrap;
  word-break: break-word;
}
.comment .quote .quote-who { color: #7fa8d4; margin-right: 6px; }
.comment .text { font-size: 13px; color: #cdd9e6; margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.comment .meta { color: var(--muted); font-size: 11px; margin-top: 3px; }

.to-top {
  position: fixed;
  right: 14px;
  bottom: 72px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(23, 40, 59, .92);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
}
.to-top.show { display: flex; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 200px minmax(280px, 1fr); height: auto; }
  .detail-pane { grid-column: 2; min-height: 420px; }
}
@media (max-width: 760px) {
  body { -webkit-text-size-adjust: 100%; }

  .topbar { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
  .brand h1 { font-size: 17px; }
  .brand p { font-size: 11px; margin-top: 1px; }
  .status { width: 100%; font-size: 11px; gap: 6px; }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 8px 8px 20px;
    height: auto;
  }
  .sidebar, .posts-pane, .detail-pane { border-radius: 12px; }
  .detail-pane { grid-column: auto; }

  /* 博主名单：顶部横向滑动胶囊条，不再占满整屏 */
  .sidebar-title { padding: 8px 12px; }
  .bloggers {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bloggers::-webkit-scrollbar { display: none; }
  .blogger {
    flex: 0 0 auto;
    width: 128px;
    margin-bottom: 0;
    padding: 8px 10px;
    border-color: var(--line);
    background: rgba(22, 34, 48, .5);
  }
  .blogger .name { font-size: 13px; }
  .blogger .meta { margin-top: 2px; }
  .blogger .latest { display: none; }

  .pane-head { padding: 10px 12px; align-items: center; }
  .pane-head h2 { font-size: 16px; }
  .pane-head .muted { font-size: 11px; }
  .posts { overflow: visible; padding: 4px 6px 8px; }
  .post { padding: 10px 8px; margin-bottom: 4px; }
  .post .title { font-size: 14px; }

  .detail-pane { padding: 12px; }
  .detail-head h3 { font-size: 17px; }
  .content { font-size: 14px; }
  .images { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
  .empty { padding: 30px 10px; }

  .ghost { padding: 7px 12px; }
}
