/* ============================================================
   ZHUAO — Dark Mode (toggle via #dm-toggle / data-theme="dark")
   加载顺序必须在本文件之后于 zhuao.css / hestia 之后（已在 head 末尾注入）
   ============================================================ */

/* ---------- 切换按钮（浮动，全局通用） ---------- */
#dm-toggle{
  position:fixed;right:18px;bottom:18px;z-index:9999;
  width:46px;height:46px;border-radius:50%;border:1px solid rgba(255,255,255,.18);
  background:#0d1117;color:#ffd86b;cursor:pointer;
  display:flex;align-items:center;justify-content:center;font-size:20px;line-height:1;
  box-shadow:0 6px 18px rgba(0,0,0,.35);transition:transform .2s,background .2s,color .2s;
}
#dm-toggle:hover{transform:translateY(-2px);background:#161b22}
#dm-toggle:focus-visible{outline:2px solid #58a6ff;outline-offset:2px}
html[data-theme="dark"] #dm-toggle{background:#1c2330;color:#9fb0c3;border-color:rgba(255,255,255,.12)}

/* ============================================================
   A) 前端页家族（index/about/services… 用 CSS 变量）
   ============================================================ */
html[data-theme="dark"]{
  --bg:#0b0e14; --bg-soft:#121821; --ink:#e6edf3; --muted:#9fb0c3; --faint:#7e8ea0;
  --line:#222b38; --line-soft:#1a2230;
  --blue-bright:#7cb4ff; --green:#3fb950; --green-soft:#11261a;
  --shadow:0 10px 30px rgba(0,0,0,.45); --shadow-lg:0 20px 50px rgba(0,0,0,.55);
}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] .section.soft{background:#0f141c}
html[data-theme="dark"] .card,
html[data-theme="dark"] .pkg,
html[data-theme="dark"] .case,
html[data-theme="dark"] .form,
html[data-theme="dark"] .logo-chip{background:#121821;color:var(--ink);border-color:#222b38}
html[data-theme="dark"] .card .ico,
html[data-theme="dark"] .contact-card .ico,
html[data-theme="dark"] .feature .ico{background:#1c2330;color:var(--blue-bright)}
html[data-theme="dark"] .card h3,html[data-theme="dark"] .pkg h3,html[data-theme="dark"] .case h3{color:#e6edf3}
html[data-theme="dark"] .btn-outline{background:#121821;color:var(--blue-bright);border-color:#2a3340}
html[data-theme="dark"] .btn-outline:hover{border-color:var(--blue-bright)}
html[data-theme="dark"] .form input,
html[data-theme="dark"] .form select,
html[data-theme="dark"] .form textarea{background:#0b0e14;color:var(--ink);border-color:#2a3340}
html[data-theme="dark"] .form input:focus,
html[data-theme="dark"] .form select:focus,
html[data-theme="dark"] .form textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(47,111,237,.25)}
html[data-theme="dark"] .contact-card{border-color:#222b38}
html[data-theme="dark"] .step:not(:last-child)::after{background:#222b38}
html[data-theme="dark"] .ph{background:repeating-linear-gradient(45deg,#121821,#121821 14px,#0f141c 14px,#0f141c 28px);border:2px dashed #2a3340;color:#7e8ea0}
html[data-theme="dark"] .cta-band{box-shadow:var(--shadow-lg)}
html[data-theme="dark"] .hero-card{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.12)}
html[data-theme="dark"] .breadcrumb{color:#7e8ea0}
html[data-theme="dark"] a{color:var(--blue-bright)}

/* ============================================================
   B) Hestia 家族（产品/文章/分类/shop — 硬编码色，用 !important 压）
   内容全在 .main 内；导航(<header>)与页脚(<footer>)在 .main 外，不受影响
   ============================================================ */
html[data-theme="dark"] body{background:#0b0e14 !important}
html[data-theme="dark"] .wrapper{background:#0b0e14 !important}
html[data-theme="dark"] .main,
html[data-theme="dark"] .main-raised,
html[data-theme="dark"] .content-area,
html[data-theme="dark"] .site-main{background:#0b0e14 !important}

/* 正文文字统一转浅色（仅限 .main 内，避开导航/页脚） */
html[data-theme="dark"] .main,
html[data-theme="dark"] .main *{color:#c9d4e0 !important}
/* 重新点亮标题 */
html[data-theme="dark"] .main h1,
html[data-theme="dark"] .main h2,
html[data-theme="dark"] .main h3,
html[data-theme="dark"] .main h4,
html[data-theme="dark"] .main h5,
html[data-theme="dark"] .main h6{color:#e6edf3 !important}
/* 链接保持可点（蓝亮） */
html[data-theme="dark"] .main a{color:#7cb4ff !important}
html[data-theme="dark"] .main a:hover{color:#a9d2ff !important}
/* 价格/强调色 */
html[data-theme="dark"] .main .price,
html[data-theme="dark"] .main .summary .price{color:#7cb4ff !important}
/* 按钮保留自身底色 + 浅色文字 */
html[data-theme="dark"] .main .btn,
html[data-theme="dark"] .main .button{color:#fff !important}
/* 卡片 / 博客卡片 */
html[data-theme="dark"] .main .card,
html[data-theme="dark"] .card.card-blog{background:#121821 !important;border-color:#222b38 !important}
html[data-theme="dark"] .main .card .card-title,
html[data-theme="dark"] .card-title{color:#e6edf3 !important}
html[data-theme="dark"] .main .card-description,
html[data-theme="dark"] .card-description{color:#9fb0c3 !important}
/* WooCommerce 提示条 */
html[data-theme="dark"] .woocommerce-error,
html[data-theme="dark"] .woocommerce-info,
html[data-theme="dark"] .woocommerce-message{background:#1c2330 !important;color:#e6edf3 !important;border-color:#2a3340 !important}
/* 表单控件 */
html[data-theme="dark"] .main input,
html[data-theme="dark"] .main select,
html[data-theme="dark"] .main textarea,
html[data-theme="dark"] .main .input-text{background:#0b0e14 !important;color:#c9d4e0 !important;border-color:#2a3340 !important}
/* 表格边框 */
html[data-theme="dark"] .main table,
html[data-theme="dark"] .main td,
html[data-theme="dark"] .main th{border-color:#222b38 !important}
/* 标签页分隔线 */
html[data-theme="dark"] .woocommerce-tabs .tabs,
html[data-theme="dark"] .wc-tabs{border-color:#222b38 !important}
/* 产品图廊留白修正 */
html[data-theme="dark"] .woocommerce-product-gallery{background:transparent !important}
/* 订阅/特性区段（若浅底则压暗） */
html[data-theme="dark"] .subscribe-line,
html[data-theme="dark"] .hestia-features{background:#121821 !important}

/* 文章内代码/引用块 */
html[data-theme="dark"] .main code,
html[data-theme="dark"] .main pre{background:#1c2330 !important;color:#e6edf3 !important}
html[data-theme="dark"] .main blockquote{border-left-color:#2a3340 !important;color:#9fb0c3 !important}

/* 滚动条（webkit） */
html[data-theme="dark"] ::-webkit-scrollbar{width:11px;height:11px}
html[data-theme="dark"] ::-webkit-scrollbar-track{background:#0b0e14}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#2a3340;border-radius:6px}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{background:#3a4555}
