/* 羞羞漫画 - 对话气泡：聊天界面+左右气泡+对话式文案 */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Noto+Sans+SC:wght@400;500&display=swap');

:root {
  --bg: #f0f4f8;
  --bubble-left: #ffffff;
  --bubble-right: #e8f0fe;
  --bubble-border: #e2e8f0;
  --ink: #1e293b;
  --ink-soft: #64748b;
  --accent: #2563eb;
  --time: #94a3b8;
}

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

body {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.7;
}

/* 顶栏 - 聊天头 */
.chat-head {
  background: #fff;
  border-bottom: 1px solid var(--bubble-border);
  padding: 0.9rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.chat-head-in {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-head .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  flex-shrink: 0;
}

.chat-head .name {
  font-weight: 600;
  font-size: 1rem;
}

.chat-head .status {
  font-size: 0.8rem;
  color: var(--time);
}

.chat-head .nav {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.chat-head .nav a {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.chat-head .nav a:hover {
  text-decoration: underline;
}

/* 对话区 */
.thread {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

/* 气泡 - 左侧（系统） */
.msg {
  display: flex;
  margin-bottom: 1rem;
}

.msg.sys {
  justify-content: flex-start;
}

.msg.sys .bubble {
  background: var(--bubble-left);
  border: 1px solid var(--bubble-border);
  border-radius: 18px 18px 18px 4px;
  max-width: 85%;
}

.msg.sys .bubble::before {
  content: '';
  position: absolute;
  left: -6px;
  bottom: 8px;
  width: 10px;
  height: 10px;
  background: var(--bubble-left);
  border-left: 1px solid var(--bubble-border);
  border-bottom: 1px solid var(--bubble-border);
  transform: rotate(45deg);
}

/* 气泡 - 右侧（用户/强调） */
.msg.user {
  justify-content: flex-end;
}

.msg.user .bubble {
  background: var(--bubble-right);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 18px 18px 4px 18px;
  max-width: 85%;
}

.msg.user .bubble::before {
  content: '';
  position: absolute;
  right: -6px;
  bottom: 8px;
  width: 10px;
  height: 10px;
  background: var(--bubble-right);
  border-right: 1px solid rgba(37, 99, 235, 0.2);
  border-bottom: 1px solid rgba(37, 99, 235, 0.2);
  transform: rotate(-45deg);
}

.msg .bubble {
  position: relative;
  padding: 1rem 1.25rem;
}

.msg .bubble h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.msg .bubble p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.msg .bubble p:last-child {
  margin-bottom: 0;
}

.msg .time {
  font-size: 0.75rem;
  color: var(--time);
  margin-top: 0.4rem;
}

/* 入口卡片 - 气泡内链 */
.msg .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.msg .links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  border: 1px solid var(--bubble-border);
  transition: background 0.2s;
}

.msg .links a:hover {
  background: var(--bubble-right);
}

.msg .links a img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

/* 列表页 */
.list-thread {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.list-top {
  background: var(--bubble-left);
  border: 1px solid var(--bubble-border);
  border-radius: 18px 18px 18px 4px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.list-top h1 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.list-top p {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* 列表项 - 气泡链 */
.list-msg {
  display: flex;
  margin-bottom: 0.75rem;
}

.list-msg .bubble {
  flex: 1;
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bubble-left);
  border: 1px solid var(--bubble-border);
  border-radius: 18px 18px 18px 4px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s;
}

.list-msg .bubble:hover {
  background: var(--bubble-right);
}

.list-msg img {
  width: 70px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.list-msg .info h3 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.list-msg .info p {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* 内容页 */
.article-thread {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.article-thread .head {
  background: var(--bubble-left);
  border: 1px solid var(--bubble-border);
  border-radius: 18px 18px 18px 4px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.article-thread .head h1 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.article-thread .head .meta {
  font-size: 0.85rem;
  color: var(--time);
}

.article-thread .body {
  background: var(--bubble-left);
  border: 1px solid var(--bubble-border);
  border-radius: 18px 18px 18px 4px;
  padding: 1.5rem 1.5rem;
}

.article-thread .body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1rem 0;
}

.article-thread .body h2 {
  font-size: 1rem;
  margin: 1rem 0 0.4rem;
}

.article-thread .body h3 {
  font-size: 0.95rem;
  margin: 0.8rem 0 0.3rem;
}

.article-thread .body p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}

.article-thread .body ul, .article-thread .body ol {
  margin: 0.5rem 0 0.8rem 1.25rem;
}

/* 底部按钮 */
.btns {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btns a {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 12px;
}

.btns a:hover {
  background: var(--bubble-right);
}

/* 页脚 */
.foot {
  text-align: center;
  padding: 1rem;
}

.foot p {
  font-size: 0.85rem;
  color: var(--time);
  margin-bottom: 0.2rem;
}

.foot a {
  color: var(--accent);
  text-decoration: none;
}

/* 响应式 */
@media (max-width: 768px) {
  .msg .bubble {
    max-width: 95%;
  }

  .list-msg .bubble {
    flex-direction: column;
  }

  .list-msg img {
    width: 100%;
    height: 120px;
  }
}

@media (max-width: 480px) {
  .chat-head .nav {
    display: none;
  }

  .thread, .list-thread, .article-thread {
    padding: 1rem;
  }
}
