/* ===== MedNews 公共样式 ===== */
:root {
  --primary: #4A889E;
  --primary-dark: #3A7A8E;
  --primary-light: #5A9AAD;
  --primary-pale: #E6F2F5;
  --accent: #e8524a;
  --accent-light: #fff1f0;
  --text-main: #1a1a1a;
  --text-sub: #666;
  --text-mute: #999;
  --border: #ebebeb;
  --bg: #f7f8fa;
  --white: #fff;
  --shadow: 0 2px 16px rgba(0,0,0,0.07);
  --shadow-hover: 0 6px 28px rgba(0,0,0,0.13);
  --follow-bg: #E6F2F5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
}

/* ===== 标签样式 ===== */
.card-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-block;
}

.tag-policy { background: #fff3e0; color: #e65100; }
.tag-insurance { background: #e0f7fa; color: #00838f; }
.tag-anti-corruption { background: #fce4ec; color: #ad1457; }
.tag-hotspot { background: #fff9e6; color: #b38600; }
.tag-hospital { background: #e8f5e9; color: #2e7d32; }
.tag-pandemic { background: #fce4ec; color: #880e4f; }
.tag-pharma { background: #e3f2fd; color: #1565c0; }
.tag-breakthrough { background: #fce4ec; color: #c2185b; }
.tag-meeting { background: #f3e8ff; color: #6d28d9; }
.tag-exhibition { background: #fce4ec; color: #c2185b; }
.tag-ai { background: #e8f0fe; color: #1a56db; }
.tag-guide { background: #fef3c7; color: #92400e; }
.tag-consensus { background: #f3e8ff; color: #6d28d9; }
.tag-foreign { background: #dbeafe; color: #1e40af; }

/* ===== 新闻卡片 ===== */
.news-card {
  background: var(--white);
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  position: relative;
  transition: box-shadow 0.2s;
}
.news-card:hover {
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 7px;
  color: var(--text-main);
}

.card-summary {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* 截断样式 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 指南卡片 ===== */
.guide-card {
  background: var(--white);
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  position: relative;
  transition: box-shadow 0.2s;
}
.guide-card:hover {
  box-shadow: var(--shadow);
}

.guide-english {
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.4;
  margin-bottom: 4px;
}

.guide-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-mute);
  flex-wrap: wrap;
}

.guide-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  background: linear-gradient(135deg, #0d7a5f, #0a5c49);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}
.guide-view-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 122, 95, 0.3);
}

/* ===== 导流横条 ===== */
.follow-bar {
  background: #3A7A6B;
  border-radius: 10px;
  padding: 14px 20px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.follow-bar:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.follow-bar-icon { font-size: 28px; flex-shrink: 0; }
.follow-bar-text { flex: 1; }
.follow-bar-text strong { color: #fff; font-size: 14px; display: block; margin-bottom: 2px; }
.follow-bar-text span { color: rgba(255,255,255,0.75); font-size: 12px; }
.follow-bar-btn {
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ===== 筛选栏 ===== */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-btn {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-sub);
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 只看订阅 ===== */
.sub-only-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.sub-only-wrap input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
}
.sub-only-wrap span {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
}

/* ===== 悬浮按钮 ===== */
.float-btns {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}
.float-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.2s;
}
.float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.float-btn-top {
  background: var(--white);
  color: var(--primary);
  display: none;
}
.float-btn-top.visible { display: flex; }
.float-btn-wechat {
  background: #07c160;
  color: #fff;
}
.float-btn-history {
  background: var(--primary);
  color: #fff;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-mute);
}
.empty-state p { font-size: 14px; margin-bottom: 16px; }
.empty-state a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.empty-state a:hover { text-decoration: underline; }

/* ===== 加载更多 ===== */
.load-more-btn {
  display: block;
  width: 200px;
  margin: 24px auto;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.load-more-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== 错误提示 ===== */
.error-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-main);
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s ease;
}
.error-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
