/* ============================================================
 * 投喂打卡 + 社区讨论 模块样式
 * 与全站白色卡片 + 蓝紫渐变主题一致（沿用 :root 设计变量）
 * 仅包含本模块新增 / 覆盖的样式；其余复用 style.css 既有类
 * ============================================================ */

/* ---------- 通用页头 ---------- */
.page-subtitle {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple-color);
  margin-bottom: 4px;
}
.fd-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

/* ============================================================
 * 一、投喂打卡
 * ============================================================ */
.fd-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}
.fd-subtitle {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--success-color);
}
.fd-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 4px 0 2px;
  line-height: 1.2;
}
.fd-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fd-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4); }
.fd-cta-plus { font-size: 18px; line-height: 1; }
.fd-cta-solid {
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}
.fd-cta-solid:hover { box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4); }

/* 今日统计卡 */
.fd-stats-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--success-color), #059669);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}
.fd-stats-label { font-size: 13px; color: rgba(255, 255, 255, 0.85); }
.fd-stats-number {
  font-size: 44px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-top: 4px;
}
.fd-stats-number em { font-style: normal; font-size: 16px; font-weight: 600; opacity: 0.85; }

/* 投喂记录列表 */
.fd-list { display: flex; flex-direction: column; gap: 12px; }
.fd-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.fd-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fd-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.fd-thumb-icon { font-size: 28px; }
.fd-item-body { flex: 1; min-width: 0; }
.fd-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.fd-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fd-item-time { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.fd-item-meta {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fd-del {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.fd-del:hover { background: #fee2e2; transform: scale(0.92); }

/* ============================================================
 * 二、社区讨论列表
 * ============================================================ */
.dy-list { display: flex; flex-direction: column; gap: 16px; }

.dy-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.dy-card:hover { box-shadow: var(--shadow-md); }

.dy-top-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.dy-card-head { display: flex; align-items: center; gap: 12px; }
.dy-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.dy-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dy-head-meta { flex: 1; min-width: 0; }
.dy-author-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dy-author { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.dy-badge {
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: var(--warning-color);
  font-weight: 600;
}
.dy-time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.dy-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dy-top-btn, .dy-del-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.dy-top-btn:hover, .dy-top-btn.is-on { background: var(--primary-light); }
.dy-del-btn:hover { background: #fee2e2; }

.dy-text {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 多图网格：1 张大图 / 2 张并排 / 3+ 张九宫格 */
.dy-imgs { display: grid; gap: 8px; margin-top: 14px; }
.dy-imgs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #f1f5f9;
  cursor: zoom-in;
}
.dy-imgs--single { grid-template-columns: 1fr; }
.dy-imgs--single img { max-height: 320px; }
.dy-imgs--two { grid-template-columns: repeat(2, 1fr); }
.dy-imgs--two img { height: 150px; }
.dy-imgs--grid { grid-template-columns: repeat(3, 1fr); }
.dy-imgs--grid img { aspect-ratio: 1 / 1; height: auto; }

/* 详情页大图展示 */
.discussion-detail .dy-imgs--single img { max-height: 420px; }

.dy-foot {
  display: flex;
  gap: 28px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.dy-action {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
}
.dy-action:hover { color: var(--primary-color); }
.dy-action.is-on, .action-item.active { color: var(--primary-color); }
.dy-action-ic { font-size: 17px; line-height: 1; }
.dy-action-num { font-size: 13px; font-weight: 500; }

/* ============================================================
 * 三、讨论详情底部输入区补充
 * ============================================================ */
/* 已选评论图片悬浮条（位于输入栏上方） */
.selected-images-bar-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 74px;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 899;
  padding: 10px 16px;
}
.selected-images-bar-wrap .selected-images-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
 * 响应式适配
 * ============================================================ */
@media (max-width: 640px) {
  .fd-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .fd-cta { align-self: stretch; justify-content: center; }
  .fd-stats-number { font-size: 38px; }
  .dy-card { padding: 16px; }
  .dy-foot { gap: 18px; }
  .dy-imgs--two img { height: 110px; }
  .dy-imgs--single img { max-height: 240px; }
  .discussion-detail { padding: 16px; }
  .reply-section { padding: 16px; }
}
