/* ============================================
   机器家人 RoboMate — 全局样式
   ============================================ */
:root {
  --ink: #0f0f0f;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --muted: #6b6860;
  --border: #e2ddd6;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1100px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== 顶部导航 ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 20px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.logo span { color: var(--accent); }
.logo small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { font-size: 14px; color: var(--muted); transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* ===== 二级标签 ===== */
.tabs {
  display: flex; gap: 4px; overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.tabs-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; }
.tab {
  flex-shrink: 0; padding: 12px 16px; font-size: 14px;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
  transition: all .2s; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

/* ===== 容器 ===== */
.container { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px; }
.section-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.section-title a { font-size: 13px; color: var(--accent); font-weight: 400; }

/* ===== 标签 ===== */
.tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 4px; }
.tag-cleaning { background: var(--accent-light); color: var(--accent); }
.tag-companion { background: var(--success-light); color: var(--success); }
.tag-humanoid { background: var(--danger-light); color: var(--danger); }
.tag-original { background: var(--ink); color: #fff; }
.tag-gray { background: #f0eeea; color: var(--muted); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm); border: none;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: var(--accent-light); color: var(--accent); }
.btn-outline:hover { background: #dbeafe; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }

/* ===== 卡片通用 ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); transform: translateY(-2px); }

/* ===== 图片占位 ===== */
.img-placeholder {
  background: linear-gradient(135deg, #ebe8e1, #e0ddd6);
  display: flex; align-items: center; justify-content: center;
  color: #aaa; font-size: 13px;
}

/* ===== Banner ===== */
.banner {
  background: linear-gradient(135deg, var(--ink), #2a2a2a);
  border-radius: var(--radius); padding: 40px 32px; color: #fff;
  margin-bottom: 24px; position: relative; overflow: hidden;
}
.banner h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.banner p { font-size: 14px; opacity: 0.85; max-width: 60ch; }
.banner::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.4), transparent 70%);
}

/* ===== 底部 ===== */
.footer {
  border-top: 1px solid var(--border); margin-top: 60px;
  padding: 32px 20px; text-align: center; color: var(--muted); font-size: 13px;
}

/* ===== 加载/空状态 ===== */
.loading, .empty { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 14px; }
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
  .banner { padding: 28px 20px; }
  .banner h1 { font-size: 20px; }
  .logo small { display: none; }
}

/* ============================================
   首页专属
   ============================================ */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.review-card { display: block; }
.review-cover { height: 150px; position: relative; }
.review-badge-orig {
  position: absolute; top: 10px; left: 10px;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 500;
  padding: 3px 8px; border-radius: 4px;
}
.review-badge-score {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(255,255,255,0.92); color: var(--ink);
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
}
.review-body { padding: 14px; }
.review-tags { margin-bottom: 8px; }
.review-title { font-size: 15px; font-weight: 600; line-height: 1.45; margin-bottom: 8px; }
.review-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.robot-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.robot-mini { flex-shrink: 0; width: 150px; display: block; }
.robot-mini-img { height: 100px; }
.robot-mini-body { padding: 10px; }
.robot-mini-name { font-size: 13px; font-weight: 600; margin: 4px 0 2px; line-height: 1.3; }
.robot-mini-price { font-size: 13px; color: var(--accent); font-weight: 500; }

/* ============================================
   选机页面
   ============================================ */
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-select {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font-size: 13px; color: var(--ink); cursor: pointer;
  font-family: inherit;
}
.compare-bar { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.compare-bar #compare-count { font-size: 13px; color: var(--accent); font-weight: 500; }
.back-link { display: inline-block; margin: 8px 0 16px; color: var(--muted); font-size: 14px; }
.back-link:hover { color: var(--ink); }

/* 列表 */
.robot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.robot-item { display: flex; flex-direction: column; }
.robot-item-img { height: 140px; cursor: pointer; }
.robot-item-body { padding: 14px; flex: 1; }
.robot-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.robot-item-brand { font-size: 12px; color: var(--muted); }
.robot-item-name { font-size: 16px; font-weight: 600; margin-bottom: 10px; cursor: pointer; }
.robot-item-name:hover { color: var(--accent); }
.robot-item-specs { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.spec-row { display: flex; justify-content: space-between; font-size: 12px; }
.spec-row span:first-child { color: var(--muted); }
.robot-item-foot { display: flex; align-items: center; justify-content: space-between; }
.robot-item-price { font-size: 15px; font-weight: 600; color: var(--accent); }
.robot-item-rating { font-size: 12px; color: var(--muted); }
.robot-item-actions { display: flex; border-top: 1px solid var(--border); }
.robot-item-actions button {
  flex: 1; padding: 10px; border: none; background: var(--surface);
  font-size: 13px; color: var(--accent); cursor: pointer; font-family: inherit;
  transition: background .2s;
}
.robot-item-actions button:first-child { border-right: 1px solid var(--border); }
.robot-item-actions button:hover { background: var(--bg); }
.robot-item-actions button.active { color: var(--success); font-weight: 500; }

/* 详情 */
.detail-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.detail-img { height: 300px; border-radius: var(--radius); }
.detail-info { display: flex; flex-direction: column; justify-content: center; }
.detail-name { font-size: 26px; font-weight: 700; margin-bottom: 10px; }
.detail-rating { color: var(--warning); font-size: 15px; margin-bottom: 8px; }
.detail-price { font-size: 24px; font-weight: 700; color: var(--accent); margin-bottom: 20px; }
.detail-btns { display: flex; gap: 12px; }
.detail-section { margin-bottom: 24px; }
.detail-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.kpi-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.kpi-val { font-size: 16px; font-weight: 600; }
.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 12px 16px; font-size: 14px; }
.spec-k { color: var(--muted); width: 40%; }
.spec-v { font-weight: 500; }
.detail-review-link {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--accent-light); border-radius: var(--radius); padding: 16px 20px;
}

/* 对比 */
.compare-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.compare-table th, .compare-table td {
  padding: 12px; text-align: center; border: 1px solid var(--border); font-size: 13px;
}
.compare-table th:first-child, .compare-table td:first-child {
  text-align: left; color: var(--muted); background: var(--bg); position: sticky; left: 0;
}
.compare-img { width: 60px; height: 50px; border-radius: 6px; margin: 0 auto 6px; }
.compare-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.compare-price { font-size: 13px; color: var(--accent); margin-bottom: 4px; }
.compare-key { font-weight: 500; }

@media (max-width: 640px) {
  .detail-hero { grid-template-columns: 1fr; }
  .detail-img { height: 220px; }
  .robot-list { grid-template-columns: 1fr; }
}

/* ============================================
   测评详情页
   ============================================ */
.rv-cover { height: 280px; border-radius: var(--radius); position: relative; margin-bottom: 20px; }
.rv-header { margin-bottom: 20px; }
.rv-title { font-size: 24px; font-weight: 700; line-height: 1.4; margin-bottom: 12px; }
.rv-meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.rv-summary {
  background: var(--bg); border-left: 3px solid var(--accent);
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px; color: #444; margin-bottom: 24px; line-height: 1.8;
}
.rv-scores { margin-bottom: 28px; }
.rv-scores h3 { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.score-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.score-item.score-overall { background: var(--accent-light); border-color: var(--accent); }
.score-val { font-size: 24px; font-weight: 700; color: var(--accent); }
.score-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rv-body { font-size: 16px; line-height: 1.9; color: #333; }
.rv-body h2 { font-size: 20px; font-weight: 600; margin: 28px 0 12px; }
.rv-body h3 { font-size: 17px; font-weight: 600; margin: 20px 0 10px; }
.rv-body p { margin-bottom: 16px; }
.rv-body img { border-radius: var(--radius-sm); margin: 16px 0; }
.rv-robot-link {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--accent-light); border-radius: var(--radius);
  padding: 18px 22px; margin-top: 32px;
}

/* ===== 真机图片显示 ===== */
.robot-img { object-fit: contain; background: #fff; display: block; }
img.robot-mini-img { width: 100%; height: 100px; }
.robot-item-img-wrap { display: block; }
img.robot-item-img { width: 100%; height: 140px; }
img.detail-img { width: 100%; height: 300px; border-radius: var(--radius); }
img.compare-img { width: 60px; height: 50px; border-radius: 6px; margin: 0 auto 6px; }

/* ===== 技能点体系 ===== */
.skill-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.skill-tag { font-size: 11px; padding: 3px 8px; border-radius: 5px; font-weight: 500; }
.skill-tag.on { background: var(--success-light); color: var(--success); }
.skill-tag.off { background: #f3f2ef; color: #aaa; text-decoration: line-through; }
.price-duo { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-rent { font-size: 11px; color: var(--muted); }
.skill-list { display: flex; flex-direction: column; gap: 8px; }
.skill-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; align-items: flex-start; gap: 12px; }
.skill-item.off-item { opacity: .65; }
.skill-badge { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.skill-info { flex: 1; }
.skill-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.skill-score { font-size: 12px; color: var(--accent); font-weight: 600; background: var(--accent-light); padding: 1px 8px; border-radius: 999px; }
.skill-note { font-size: 12px; color: var(--muted); margin-top: 3px; }
.detail-price-box { background: var(--bg); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; display: flex; gap: 28px; flex-wrap: wrap; }
.dp-item .dp-label { font-size: 11px; color: var(--muted); }
.dp-item .dp-val { font-size: 19px; font-weight: 700; color: var(--accent); }
.dp-item .dp-val.rent { color: var(--success); }
details.spec-fold { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px; }
details.spec-fold summary { padding: 13px 0; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
details.spec-fold[open] summary { border-bottom: 1px solid var(--border); }


/* ===== 豆瓣式双重评分 ===== */
.dual-score { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.ds-item { text-align: center; }
.ds-num { font-size: 32px; font-weight: 800; line-height: 1; }
.ds-pro .ds-num { color: var(--accent); }
.ds-user .ds-num { color: var(--warning); }
.ds-label { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.ds-item { padding: 4px 14px; }
.ds-pro { border-right: 1px solid var(--border); }
.ds-tip { font-size: 12px; color: var(--muted); background: var(--bg); padding: 4px 10px; border-radius: 999px; }

/* ===== 吐槽墙 ===== */
.tuxao-actions { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.tuxao-list { display: flex; flex-direction: column; gap: 10px; }
.tuxao-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tuxao-card.editor-pick { background: #fffdf5; border-color: #f5e6b8; }
.tuxao-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.tuxao-nick { font-size: 13px; font-weight: 600; }
.tuxao-tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.tx-bad { background: var(--danger-light); color: var(--danger); }
.tx-funny { background: #fef3c7; color: #b45309; }
.tx-good { background: var(--success-light); color: var(--success); }
.tx-normal { background: #f0eeea; color: var(--muted); }
.tuxao-score { font-size: 12px; font-weight: 700; color: var(--warning); }
.tuxao-editor-badge { font-size: 10px; background: var(--ink); color: #fff; padding: 1px 7px; border-radius: 4px; }
.tuxao-content { font-size: 14px; line-height: 1.7; color: #333; }
.tuxao-foot { margin-top: 8px; }
.tuxao-like { font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.tuxao-like:hover { color: var(--accent); }
.tuxao-empty { text-align: center; padding: 30px; color: var(--muted); font-size: 14px; background: var(--bg); border-radius: var(--radius); }
