/* 牛体检 - 适老化极简版样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --green: #43a047;
  --green-dark: #2e7d32;
  --green-light: #e8f5e9;
  --yellow: #fdd835;
  --yellow-dark: #f9a825;
  --yellow-light: #fffde7;
  --red: #e53935;
  --red-dark: #c62828;
  --red-light: #ffebee;
  --text: #212121;
  --text-light: #616161;
  --border: #e0e0e0;
  --bg: #fafafa;
}
html, body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 18px;            /* 适老化基础字号 */
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}
a { color: var(--green-dark); text-decoration: none; }
input, button, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== 顶部标题栏 ===== */
.app-header {
  background: var(--green-dark);
  color: #fff;
  padding: 18px;
  text-align: center;
  font-size: 26px;            /* 大标题（适老化加大） */
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-header .back {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 22px;
}

/* ===== 容器 ===== */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 100px;
}

/* ===== 大按钮 ===== */
.btn {
  display: block;
  width: 100%;
  padding: 22px;
  border: none;
  border-radius: 16px;
  font-size: 22px;            /* 按钮大字 */
  font-weight: bold;
  text-align: center;
  margin-bottom: 12px;
  min-height: 72px;
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:active { background: var(--green-dark); }
.btn-yellow { background: var(--yellow); color: #5d4037; }
.btn-red { background: var(--red); color: #fff; }
.btn-gray { background: #e0e0e0; color: #424242; }
.btn-row { display: flex; gap: 12px; }
.btn-row .btn { margin-bottom: 0; }

/* 巨型主按钮（首页"开始看牛"） */
.btn-hero {
  font-size: 40px;
  padding: 40px;
  min-height: 140px;
  border-radius: 24px;
  box-shadow: 0 6px 20px rgba(46,125,50,0.3);
}

/* 次要小按钮（如首页"看记录"入口，复用 .btn.btn-gray 加 .btn-small） */
.btn-small {
  font-size: 18px;
  padding: 14px;
  min-height: 48px;
}

/* ===== 卡片 ===== */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.card-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
  color: var(--text);
}
.card-hint {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 12px;
}

/* ===== 表单 ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 20px;            /* 标签大字 */
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text);
}
.form-label .req { color: var(--red); }
.form-control {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 22px;            /* 输入框大字（适老化加大） */
  background: #fff;
  min-height: 60px;
}
.form-control:focus { outline: none; border-color: var(--green); }

/* ===== 大色块选项卡片 ===== */
.opt-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.opt-group.two {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.opt-btn {
  padding: 24px 8px;
  border: 3px solid var(--border);
  border-radius: 14px;
  background: #fff;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.opt-btn:active { transform: scale(0.97); }
/* 正向选项（好/无/干净/阴性）激活绿色 */
.opt-btn.good.active { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
/* 中性选项（一般/少量/有点脏）激活黄色 */
.opt-btn.warn.active { border-color: var(--yellow-dark); background: var(--yellow-light); color: #e65100; }
/* 负向选项（蔫/多/脏/阳性）激活红色 */
.opt-btn.bad.active { border-color: var(--red); background: var(--red-light); color: var(--red-dark); }

/* ===== 结果展示 ===== */
.result-box {
  border-radius: 24px;
  padding: 32px 16px;
  text-align: center;
  margin-bottom: 16px;
  min-height: 60vh;           /* 结果色块占屏 60%+ */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.result-box.green { background: var(--green); color: #fff; }
.result-box.yellow { background: var(--yellow); color: #5d4037; }
.result-box.red { background: var(--red); color: #fff; }
.result-box .result-label {
  font-size: 64px;            /* 结论超大字（适老化 ≥56px） */
  font-weight: bold;
  margin-bottom: 8px;
}
.result-box .result-score {
  font-size: 72px;            /* 分数超大字（历史记录兼容，不再主用） */
  font-weight: bold;
  line-height: 1;
  margin: 12px 0;
}
.result-box .result-reason {
  font-size: 24px;            /* 原因更醒目（适老化加大） */
  opacity: 0.95;
}

/* ===== 记录列表 ===== */
.record-item {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.record-item .color-block {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  flex-shrink: 0;
}
.color-block.green { background: var(--green); }
.color-block.yellow { background: var(--yellow); color: #5d4037; }
.color-block.red { background: var(--red); }
.record-item .rec-main { flex: 1; min-width: 0; }
.record-item .rec-title { font-size: 18px; font-weight: bold; }
.record-item .rec-sub { font-size: 15px; color: var(--text-light); margin-top: 4px; }
.record-item .rec-score { font-size: 28px; font-weight: bold; margin-left: 8px; }

/* ===== 大数字统计 ===== */
.big-stat {
  text-align: center;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  margin-bottom: 16px;
}
.big-stat .num {
  font-size: 72px;            /* 首页今日数字更醒目（适老化加大） */
  font-weight: bold;
  color: var(--green-dark);
  line-height: 1;
}
.big-stat .lbl { font-size: 18px; color: var(--text-light); margin-top: 8px; }

/* ===== 提示 ===== */
.hint {
  font-size: 16px;
  color: var(--text-light);
  margin-top: 6px;
}
.hint.danger { color: var(--red-dark); font-weight: bold; }

/* ===== Toast ===== */
#toast {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 14px 24px;
  border-radius: 24px;
  font-size: 18px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  max-width: 85%;
  text-align: center;
}
#toast.show { opacity: 1; }

/* ===== 空状态 ===== */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  font-size: 18px;
}
.empty .icon { font-size: 64px; margin-bottom: 16px; opacity: 0.4; }

/* ===== 拍照 ===== */
.photo-area {
  border: 3px dashed var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 18px;
}
.photo-area:active { border-color: var(--green); }
.photo-preview {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 12px;
  margin-top: 12px;
}

/* ===== 底部固定操作栏 ===== */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  padding: 16px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  z-index: 50;
}
.bottom-bar .btn { margin-bottom: 0; }

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-gray { color: var(--text-light); }
.mt-12 { margin-top: 12px; } .mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; } .mb-24 { margin-bottom: 24px; }
.hidden { display: none; }
