/* ════════════════════════════════════════════════════════════
   雨泣工作室 · 全站统一主题 (Apple 简洁 + 一点科幻)
   作为最后加载的样式表，用 !important 覆盖各工具页页内 <style>
   的旧深蓝 HUD 配色 + hud.css/themes.css，统一全站质感。
   设计基线与 tools.html / filter_tool.html 一致。
   ════════════════════════════════════════════════════════════ */

/* ── 1. 统一调色板：变量加 !important 压过页内 :root 与 hud.css ── */
:root{
  --bg:#fbfbfd !important; --light:#f5f5f7 !important;
  --panel:#ffffff !important; --panel-2:#f5f5f7 !important; --surface-2:#f5f5f7 !important;
  --border:rgba(0,0,0,.09) !important; --border-strong:rgba(0,0,0,.14) !important; --line:rgba(0,0,0,.09) !important;
  --cyan:#0071e3 !important; --accent:#0071e3 !important; --accent-2:#5e5ce6 !important;
  --gold:#bf8a3d !important;
  --text:#1d1d1f !important; --dim:#6e6e73 !important; --text-2:#6e6e73 !important; --text-3:#86868b !important;
  --ok:#34c759 !important; --green:#34c759 !important; --red:#ff3b30 !important; --warn:#ff9500 !important;
  --r:14px !important; --r-lg:20px !important;
  --grad:linear-gradient(135deg,#0071e3,#5e5ce6) !important;
  --glow:0 1px 2px rgba(0,0,0,.04),0 6px 20px rgba(0,0,0,.06) !important;
  --line:rgba(0,0,0,.09) !important;
}

/* ── 2. 页面基底 ── */
html, body{ background:#fbfbfd !important; color:#1d1d1f !important; }
body{ font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Segoe UI',system-ui,sans-serif !important; -webkit-font-smoothing:antialiased; letter-spacing:-.01em; }
/* 去掉 hud.css 的 cyan 网格背景层 */
html:not([data-theme]) body::before, html[data-theme="dark"] body::before, body::before{ display:none !important; }

/* ── 3. 顶栏 / 工具切换栏：浅色毛玻璃 ── */
nav{ background:rgba(251,251,253,.8) !important; border-bottom:1px solid rgba(0,0,0,.09) !important;
  backdrop-filter:saturate(180%) blur(20px) !important; -webkit-backdrop-filter:saturate(180%) blur(20px) !important; }
.nav-logo{ color:#1d1d1f !important; font-weight:600 !important; }
.nav-sep{ color:#86868b !important; }
.nav-current{ color:#6e6e73 !important; }
.nav-back{ color:#6e6e73 !important; }
.nav-back:hover{ color:#0071e3 !important; }
.tool-switcher{ background:rgba(251,251,253,.85) !important; border-bottom:1px solid rgba(0,0,0,.09) !important;
  backdrop-filter:saturate(180%) blur(20px) !important; -webkit-backdrop-filter:saturate(180%) blur(20px) !important; }
.tsw-item{ color:#6e6e73 !important; }
.tsw-item:hover{ color:#1d1d1f !important; }
.tsw-item.active{ color:#0071e3 !important; border-bottom-color:#0071e3 !important; }

/* ── 4. 向导步骤条 ── */
.wizard-steps{ background:#fff !important; border-bottom:1px solid rgba(0,0,0,.09) !important; }
.wstep{ color:#86868b !important; }
.wstep.active{ background:rgba(0,113,227,.1) !important; color:#0071e3 !important; }
.wstep.done{ color:#34c759 !important; }

/* ── 5. 面板 / 卡片：白底 + 柔和阴影 + 大圆角 ── */
.step-panel, .panel, .card, .controls, .result-card, .info-card, .side-panel, .ctrl-panel,
.upload-card, .param-panel, .settings-panel, .fb-card{
  background:#fff !important; border:1px solid rgba(0,0,0,.09) !important;
  border-radius:16px !important; box-shadow:0 1px 2px rgba(0,0,0,.04),0 2px 10px rgba(0,0,0,.05) !important;
}
.section-label, .section-title{ color:#86868b !important; }

/* ── 6. 上传 / 拖拽区 ── */
.dropzone, .upload-zone, .drop, #dropZone{
  background:#fff !important; border:1.5px dashed rgba(0,0,0,.14) !important; border-radius:16px !important;
}
.dropzone:hover, .dropzone.drag, .upload-zone:hover, .upload-zone.drag, #dropZone:hover{
  border-color:#0071e3 !important; background:rgba(0,113,227,.05) !important;
}
.dropzone-text, .upload-sub{ color:#86868b !important; }

/* ── 7. 按钮 ── */
.btn-primary, .btn.primary, button.primary{ background:#0071e3 !important; color:#fff !important; border:0 !important; border-radius:980px !important; }
.btn-primary:hover, .btn.primary:hover{ background:#0077ed !important; }
.btn, button.btn{ border-radius:980px !important; }
.btn-dl{ background:#f5f5f7 !important; color:#0071e3 !important; border:0 !important; }
.btn-dl:hover{ background:#ececf0 !important; }

/* ── 8. 表单控件 ── */
input[type=text], input[type=number], textarea, select{
  background:#f5f5f7 !important; border:1px solid rgba(0,0,0,.09) !important; color:#1d1d1f !important; border-radius:10px !important;
}
input[type=text]:focus, input[type=number]:focus, textarea:focus, select:focus{ border-color:#0071e3 !important; background:#fff !important; }
input[type=range]{ accent-color:#0071e3 !important; }

/* ── 9. 图像/画布区保持深色（原子像本就黑底，如白卡中的深色图）──
   注意：不要给 canvas 强加黑底。主显示 canvas 自己 fillRect 黑底，叠加层 canvas
   (测量/标注层 z-index 在图之上) 必须保持透明，否则会盖住底图(GPA 应变预览黑屏事故)。
   暗色背景由 .canvas-wrap 容器提供即可。*/
.canvas-wrap, .preview-slot, .result-card img{ background:#000 !important; }
.canvas-label{ color:#5e9bff !important; }

/* ── 10. 页脚 ── */
footer{ background:transparent !important; border-top:1px solid rgba(0,0,0,.09) !important; color:#86868b !important; }
footer a{ color:#86868b !important; }
footer a:hover{ color:#0071e3 !important; }

/* ── 11. 兼容旧深色特效页 (perovskite_tool 等)：去 cyan 辉光，浅底更干净 ── */
.nav-logo, .step h2, .ca-stat-v, .wait-status, .section-label{ text-shadow:none !important; }
.step, .panel-glow, [style*="--glow"]{ box-shadow:var(--glow) !important; }
.step h2{ color:#1d1d1f !important; }
.step::before{ opacity:.55 !important; }
.hud-steps .hs.cur{ box-shadow:none !important; background:rgba(0,113,227,.08) !important; }
