/* 推荐页专用样式（recommend.html），复用 style.css 的变量与基础组件 */

.page-recommend { background: #fff; }

.rec-hero {
  padding: 54px 0 58px;
  background: linear-gradient(160deg, #eef4ff 0%, #f7f9ff 45%, #ffffff 100%);
  border-bottom: 1px solid var(--c-line);
}
.rec-hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 36px; align-items: start; }
.rec-eyebrow { font-size: 13px; font-weight: 500; color: var(--c-primary); margin-bottom: 12px; }
.rec-title { font-size: 42px; line-height: 1.2; font-weight: 700; color: var(--c-ink); letter-spacing: -.5px; }
.rec-lead { margin-top: 16px; font-size: 16px; line-height: 1.85; max-width: 40em; }
.rec-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.rec-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 30px; padding-top: 22px; border-top: 1px dashed var(--c-line-strong); }
.rec-stats li b { display: block; font-size: 17px; color: var(--c-ink); }
.rec-stats li i { font-size: 12px; color: var(--c-muted); }

.rec-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.rec-card-head { font-size: 14px; color: var(--c-muted); padding-bottom: 10px; border-bottom: 1px solid var(--c-line); margin-bottom: 14px; }
.rec-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 30px; font-weight: 700; letter-spacing: 2px; color: var(--c-primary);
  background: var(--c-primary-soft); border-radius: var(--radius-sm); padding: 12px 14px; text-align: center;
  user-select: all; cursor: pointer;
}
.rec-code-lg { font-size: 34px; }
.rec-code-tip { margin-top: 10px; font-size: 12px; color: var(--c-muted); line-height: 1.7; }
.rec-copy-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.rec-copy-row .form-control { flex: 1; min-width: 0; font-size: 12px; }
.rec-mini { margin-top: 16px; padding-top: 6px; border-top: 1px dashed var(--c-line); }
.rec-mini li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--c-line); }
.rec-mini li:last-child { border-bottom: none; }
.rec-mini i { color: var(--c-muted); flex-shrink: 0; }
.rec-mini b { text-align: right; }

.rec-tabs { position: sticky; top: var(--header-h); z-index: 40; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--c-line); }
.rec-tabs .container { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rec-tabs a { flex-shrink: 0; padding: 13px 14px; font-size: 14px; color: var(--c-body); border-bottom: 2px solid transparent; white-space: nowrap; }
.rec-tabs a:hover { color: var(--c-primary); }
.rec-tabs a.is-active { color: var(--c-primary); font-weight: 600; border-bottom-color: var(--c-primary); }

.rec-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.rec-box { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px 20px; }
.rec-box + .rec-box, .rec-box h3:not(:first-child) { margin-top: 0; }
.rec-box h3 { font-size: 15px; margin: 16px 0 10px; }
.rec-box h3:first-child { margin-top: 0; }

.rec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rec-table th, .rec-table td { padding: 9px 10px; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.rec-table th { font-size: 12px; font-weight: 600; color: var(--c-muted); background: var(--c-bg-soft); }
.rec-table td:first-child { color: var(--c-muted); width: 84px; flex-shrink: 0; }
.rec-table code, .feature code, .rec-faq code, .rec-steps code { font-size: 12px; background: #eef1f6; padding: 1px 5px; border-radius: 4px; }

.rec-codeblock { position: relative; margin-bottom: 8px; }
.rec-codeblock pre {
  margin: 0; padding: 14px 92px 14px 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.75;
  color: #dfe7f3; background: #16233a; border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.rec-codeblock .copy-btn { position: absolute; top: 8px; right: 8px; height: 26px; padding: 0 10px; font-size: 12px; background: rgba(255, 255, 255, .1); color: #cfe0f7; border-color: rgba(255, 255, 255, .22); }
.rec-codeblock .copy-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .4); }

.rec-steps { counter-reset: st; display: flex; flex-direction: column; gap: 8px; }
.rec-steps li { position: relative; padding: 8px 0 8px 30px; font-size: 13px; }
.rec-steps li::before {
  counter-increment: st; content: counter(st);
  position: absolute; left: 0; top: 7px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--c-primary-soft); color: var(--c-primary); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.rec-note { margin-top: 12px; font-size: 12px; color: var(--c-muted); line-height: 1.8; }
.rec-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rec-faq-item { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px 18px; }
.rec-faq-item h3 { font-size: 15px; margin-bottom: 8px; }
.rec-faq-item p { font-size: 13px; line-height: 1.8; }

@media (max-width: 1080px) {
  .rec-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .rec-title { font-size: 34px; }
}
@media (max-width: 860px) {
  .rec-two, .rec-faq { grid-template-columns: minmax(0, 1fr); }
  .rec-tabs { top: 0; }
  .site-header { position: static; }
}
@media (max-width: 620px) {
  .rec-hero { padding: 34px 0 40px; }
  .rec-title { font-size: 27px; }
  .rec-code { font-size: 24px; letter-spacing: 1px; }
  .rec-code-lg { font-size: 26px; }
  .rec-copy-row { flex-direction: column; align-items: stretch; }
  .rec-stats { gap: 16px; }
  .float-bar { display: none; }
}

/* 提示条（复制成功等），与模板主样式保持一致 */
.tpl-toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 999;
  padding: 10px 20px; font-size: 14px; color: #fff; background: rgba(23, 34, 46, .92);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.tpl-toast.is-success { background: rgba(18, 160, 90, .95); }
.tpl-toast.is-error { background: rgba(220, 59, 59, .95); }
