* { margin:0; padding:0; box-sizing:border-box; font-family: "Segoe UI","PingFang SC",sans-serif; }

body {
  background: #fff;
  min-height: 100vh;
}
.border {
	margin: 0 5% 5% 5%;
	border: 2px solid #e8e8e8;
  border-radius: 36px;      /* ← 加这行 */
  overflow: hidden;         /* ← 加这行，让里面内容不撑破圆角 */
}
/* ===== 顶部 header ===== */
.top-header {
  height: 72px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 10;
}
.top-header h1 { font-size: 22px; color: #2c3e50; letter-spacing: 2px; }

/* ===== 中间区：刚好占满剩余视口高度 ===== */
.middle-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  gap: 20px;
  margin: 0 auto;
  height: calc(100vh - 72px);
}

/* ===== 左侧菜单栏 ===== */
.sidebar {
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}

.menu-btn {
  height: 48px;
  border-radius: 12px;
  background: #fab1a0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  font-size: 14px;
  font-weight: 500;
  user-select: none;
}
.menu-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(250,177,160,.45);
}

.sidebar-divider {
  height: 1px;
  background: #eee;
  margin: 4px 0;
}

.tag-btn {
  font-size: 13px;
  padding: 6px 12px;
  text-align: left;
}

.search-bar input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 13px;
}

/* ===== 右侧内容区：撑满中间区高度 ===== */
.content-wrapper {
  width: 80%;
  height: 100%;
  background: #fff;
  border-radius: 16px;
  display: flex;
  overflow: hidden;
}

/* 左半：图片+音乐 */
.content-left {
  width: 45%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.content-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.music-player {
  position: absolute;
  bottom: 12px; left: 12px; right: 12px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

/* 右半：文章区，自己内部滚 */
.content-right {
  width: 55%;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
}

/* ===== 底部气泡区 ===== */
.bottom-bubbles {
  background: #fff;
  border-top: 1px solid #e8e8e8;
  padding: 16px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bottom-bubbles h3 { font-size: 14px; color: #666; margin-bottom: 10px; }

.bubble-wrapper {
  width: 95%;
  max-width: 1400px;
  overflow-x: auto;
  cursor: grab;
  height: 180px;
}

.bubble-wrapper:active { cursor: grabbing; }

.bubble-track {
  display: flex;
  gap: 14px;
  height: 100%;
  align-items: flex-start;
}

.bubble {
  min-width: 200px;
  max-width: 260px;
  min-height: 120px;         /* 最小高度，不是固定高度 */
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
  background: #fab1a0;
  display: flex;
  flex-direction: column;    /* ← 内容纵向排列 */
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
  transition: transform .2s, min-height .3s, box-shadow .3s;
  cursor: pointer;           /* ← 手形 */
  overflow: hidden;
  position: relative;
}

/* 气泡里的文字 */
.bubble .bubble-text {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  transition: all .3s;
  white-space: pre-wrap;        /* ← 加这行，换行符生效 */
  word-break: break-word;      /* ← 长单词/链接自动折行 */
}

/* 展开状态 */
.bubble.expanded {
  min-height: auto;          /* ← 高度自适应 */
  box-shadow: 0 8px 24px rgba(250,177,160,.35);
  z-index: 5;
}
.bubble.expanded .bubble-text {
  -webkit-line-clamp: unset; /* ← 取消行数限制 */
  overflow: visible;
}

/* 气泡底部的"展开/收起"提示 */
.bubble .bubble-hint {
  font-size: 11px;
  color: rgba(255,255,255,.8);
  margin-top: auto;          /* 推到底部 */
  padding-top: 6px;
  text-align: right;
  user-select: none;
}
.new-bubble {
  width: 85%;
  max-width: 1400px;
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.new-bubble textarea {
  flex: 1;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  line-height: 1.6;
  padding-top: 10px;
}
.new-bubble button {
  padding: 8px 20px;
  border: none;
  border-radius: 20px;
  background: #fab1a0;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  align-self: flex-end;
}
.new-bubble button:hover { opacity: .85; }


/* ===== 弹窗 ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal.show { display: flex; }
.modal-box {
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  width: 320px;
  text-align: center;
}
.modal-box h3 { margin-bottom: 16px; color: #2c3e50; }
.modal-box input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 16px;
  outline: none;
  font-size: 14px;
}
.modal-btns { display: flex; gap: 10px; justify-content: center; }
.modal-btns button { padding: 8px 24px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; }
.modal-btns button:first-child { background: #fab1a0; color: #fff; }
.modal-btns button:last-child { background: #eee; color: #333; }

/* ===== 搜索 / 文章 / 归档 ===== */
.search-bar { margin-bottom: 16px; }
.search-bar input {
  width: 100%;
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
}
.post {
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background .2s;
}
.post h3 { color: #2c3e50; margin-bottom: 6px; font-size: 16px; }
.post .meta { font-size: 12px; color: #999; margin-bottom: 8px; }
.post .preview { color: #555; line-height: 1.7; font-size: 14px; }
.post .full { display: none; line-height: 1.9; color: #333; font-size: 14px; white-space: pre-wrap; }
.post.expanded .preview { display: none; }
.post.expanded .full { display: block; }
.post.locked h3::before { content: "🔒 "; }

#pagination button:hover:not(:disabled) {
  opacity: 0.85;
  transform: translateY(-1px);
}

.archive-group { margin-bottom: 20px; }
.archive-group h4 { color: #fab1a0; margin-bottom: 8px; }

/* ===== 滚动条 ===== */
.content-right::-webkit-scrollbar,
.bubble-wrapper::-webkit-scrollbar { width: 6px; height: 6px; }
.content-right::-webkit-scrollbar-thumb,
.bubble-wrapper::-webkit-scrollbar-thumb { background: #fab1a0; border-radius: 3px; }

