/* ==========================================================================
 * steam-review.css  ——  Steam 玩家评价小部件样式
 * 用法：整段贴到「外观 → 自定义 → 额外 CSS」并发布。
 *      （也可上传到主题目录，用 steam-review.php 末尾注释里的
 *        wp_enqueue_style 自动加载）
 * 已适配：Modown 的夜间模式 body.night、640px 手机端。
 * ========================================================================== */

/* ---------- 卡片主体 ---------- */
.steam-review-card{
  --sr-border:#dce6f1; --sr-divider:#e3e9f1; --sr-text:#354052;
  --sr-strong:#2d394a; --sr-muted:#8a96a5; --sr-blue:#356da8;
  display:grid; grid-template-columns:230px minmax(0,1fr); gap:22px;
  box-sizing:border-box; margin:16px 0 20px; padding:17px 18px;
  border:1px solid var(--sr-border); border-radius:14px;
  background:linear-gradient(145deg,#fbfdff 0%,#f5f8fc 100%);
  box-shadow:0 14px 30px -27px rgba(29,56,96,.5); color:var(--sr-text);
  font-size:15px; line-height:1.5; text-align:left;
}

/* ---------- 左侧：图标 + 标题 + 评级徽章 ---------- */
.steam-review-overview{display:flex;flex-direction:column;justify-content:center;
  min-width:0;padding-right:20px;border-right:1px solid var(--sr-divider);}
.steam-review-heading{display:flex;align-items:center;min-width:0;}
.steam-review-icon{display:inline-flex;flex:0 0 40px;align-items:center;justify-content:center;
  width:40px;height:40px;margin-right:11px;border:1px solid #d5e1ee;border-radius:11px;
  background:#eaf2fa;color:#4f779f;}
.steam-review-heading strong{display:block;color:var(--sr-strong);font-size:16px;font-weight:700;line-height:22px;white-space:nowrap;}
.steam-review-heading small{display:block;color:var(--sr-muted);font-size:13px;line-height:20px;}
.steam-review-level{display:inline-flex;align-items:center;align-self:flex-start;gap:6px;
  min-height:27px;margin:10px 0 0 51px;padding:0 10px;border-radius:999px;font-size:14px;font-weight:700;}
.steam-review-level i{font-style:normal;}
.steam-review-level.is-positive{background:#e3f4ec;color:#2e8660;}
.steam-review-level.is-mixed{background:#fff1d8;color:#a26c17;}
.steam-review-level.is-negative{background:#f9e7e9;color:#bd545d;}

/* ---------- 右侧：分数 + 结论 + 进度条 + 明细 ---------- */
.steam-review-detail{display:grid;grid-template-columns:minmax(225px,.9fr) minmax(260px,1.2fr);gap:18px;min-width:0;}
.steam-review-primary{display:flex;flex-direction:column;justify-content:center;min-width:0;
  padding-right:18px;border-right:1px solid var(--sr-divider);}
.steam-review-final-score{display:flex;align-items:baseline;gap:7px;white-space:nowrap;}
.steam-review-final-score>strong{color:var(--sr-blue);font-size:31px;font-weight:800;line-height:34px;letter-spacing:-.04em;}
.steam-review-final-score>span{display:flex;align-items:baseline;gap:8px;color:#536174;}
.steam-review-final-score b{color:#788595;font-size:13px;font-weight:600;}
.steam-review-final-score small{font-size:15px;font-weight:700;}
.steam-review-rate{display:flex;align-items:baseline;gap:8px;margin:1px 0 0;color:#748192;font-size:14px;white-space:nowrap;}
.steam-review-rate b{color:#536174;font-weight:700;}
.steam-review-primary>small{margin-top:3px;color:#98a3b0;font-size:12px;}
.steam-review-judgment{display:flex;flex-direction:column;justify-content:center;min-width:0;}
.steam-review-verdict{margin:0 0 10px;color:#3d4a5c;font-size:15px;font-weight:700;line-height:22px;}
.steam-review-meter{position:relative;height:8px;overflow:hidden;border-radius:999px;background:#e9cfd2;}
.steam-review-meter span{display:block;height:100%;border-radius:999px;
  background:linear-gradient(90deg,#55b58b,#72c99f);transition:width .5s ease;}
.steam-review-meta{display:flex;flex-wrap:wrap;gap:4px 16px;margin:8px 0 0;color:#7c8999;font-size:13px;}
.steam-review-meta b{color:#5c697a;font-size:14px;font-weight:700;}
.steam-review-meta b.is-positive{color:#2f8a63;}
.steam-review-meta b.is-negative{color:#c66068;}

/* ---------- 诊断提示框（只在 ?steamdebug=1 时出现，排查完可保留） ---------- */
.steam-review-debug{margin:0 0 16px;padding:10px 14px;border:1px dashed #d8a13a;
  border-radius:8px;background:#fff9ec;color:#8a6a1f;font-size:13px;}

/* ---------- 夜间模式：跟随 Modown 的 body.night ---------- */
body.night .steam-review-card{border-color:#2b2b2b;
  background:linear-gradient(145deg,#1e1e1e 0%,#191919 100%);box-shadow:none;color:#bbb;}
body.night .steam-review-heading strong,body.night .steam-review-verdict{color:#ddd;}
body.night .steam-review-overview,body.night .steam-review-primary{border-color:#2b2b2b;}
body.night .steam-review-icon{border-color:#333;background:#262626;color:#8fb4d8;}
body.night .steam-review-heading small,body.night .steam-review-primary>small,
body.night .steam-review-meta{color:#888;}
body.night .steam-review-final-score>strong{color:#7fb0e0;}
body.night .steam-review-final-score>span,body.night .steam-review-final-score b,
body.night .steam-review-rate,body.night .steam-review-rate b,
body.night .steam-review-meta b{color:#aaa;}
body.night .steam-review-level.is-positive{background:#243b32;color:#7cc9a5;}
body.night .steam-review-level.is-mixed{background:#3a3222;color:#e0bd7c;}
body.night .steam-review-level.is-negative{background:#3d2a2d;color:#e08b92;}
body.night .steam-review-meter{background:#3a2b2e;}
body.night .steam-review-meta b.is-positive{color:#75c9a3;}
body.night .steam-review-meta b.is-negative{color:#e18b92;}

/* ---------- 手机端 ---------- */
@media screen and (max-width:640px){
  .steam-review-card{grid-template-columns:1fr;gap:13px;padding:15px;border-radius:12px;}
  .steam-review-overview{flex-direction:row;align-items:center;justify-content:space-between;
    gap:10px;padding:0 0 13px;border-right:0;border-bottom:1px solid var(--sr-divider);}
  .steam-review-level{margin:0;}
  .steam-review-detail{grid-template-columns:1fr;gap:10px;}
  .steam-review-primary{padding:0;border-right:0;}
  .steam-review-rate{flex-wrap:wrap;white-space:normal;}
  body.night .steam-review-overview{border-bottom-color:#2b2b2b;}
}
