/* ============================================================
   UI 20261122 · 主题切换 / 移动端底部导航 / 商品页移动端顺序 / 教程配色
   ============================================================ */

/* ---------- 1. 主题切换按钮 ---------- */
.theme-toggle { position: relative; }
.site-header-right .theme-toggle { display: inline-grid !important; place-items: center; flex: 0 0 auto; }
.theme-toggle .ic-moon { display: none; }
.theme-toggle .ic-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: block; }

/* ---------- 2. 悬浮按钮组（全站） ---------- */
.float-dock {
  position: fixed;
  right: 18px;
  bottom: 28px;
  z-index: 70;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.float-dock a,
.float-dock button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4a5768;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(31, 51, 79, .12);
  transition: transform .18s, color .18s, border-color .18s;
}
.float-dock a:hover,
.float-dock button:hover { transform: translateY(-2px); color: var(--accent-strong); border-color: var(--accent); }
.float-dock .fd-wework { color: #1aad19; }
.float-dock .fd-wework em {
  font-style: normal;
  font-size: 10px;
  line-height: 1.05;
  text-align: center;
  letter-spacing: .5px;
}
.float-dock .fd-top { opacity: 0; pointer-events: none; }
.float-dock .fd-top.show { opacity: 1; pointer-events: auto; }

/* ---------- 3. 移动端底部导航 ---------- */
.mobile-tabbar { display: none; }
@media (max-width: 760px) {
  .mobile-tabbar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 22px rgba(20, 40, 70, .07);
  }
  .mobile-tabbar a {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 4px 0;
    font-size: 10.5px;
    font-weight: 600;
    color: #7c8899;
    line-height: 1.1;
  }
  .mobile-tabbar a .icon { width: 19px; height: 19px; }
  .mobile-tabbar a.is-active { color: var(--accent-strong); }
  .mobile-tabbar a.is-active .icon { stroke-width: 2; }
  html[data-theme="dark"] .mobile-tabbar { background: rgba(15, 23, 36, .97); }
  html[data-theme="dark"] .mobile-tabbar a { color: #93a3ba; }
  html[data-theme="dark"] .mobile-tabbar a.is-active { color: #35d6c4; }
  body { padding-bottom: 88px !important; }
  .site-footer { margin-bottom: 0 !important; }
  .float-dock { bottom: 78px; right: 10px; gap: 8px; }
  .float-dock a, .float-dock button { width: 40px; height: 40px; border-radius: 12px; font-size: 11px; }
}

/* ---------- 4. 商品详情页 · 移动端把规格/购买提到上面 ---------- */
@media (max-width: 900px) {
  .item-layout {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
  }
  .item-main { display: contents; }
  .item-card { order: 1; }
  .buy-card { order: 2; }
  .item-panel { order: 3; margin-top: 0 !important; }
  .related-block { order: 4; }
  .buy-card > .vstack > .field:first-child { margin-top: 0 !important; }
}

/* ---------- 5. 教程详情页 · 配色与排版对齐 ---------- */
.tutorial-content-card.tutorial-rich-text {
  padding: 26px 28px 30px;
  border: 1px solid rgba(20, 39, 66, .07);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(31, 51, 79, .05);
}
.tutorial-content-card .tutorial-steps { gap: 14px; }
.tutorial-content-card .tutorial-step {
  padding: 16px 18px;
  border: 1px solid rgba(20, 39, 66, .08);
  border-radius: 14px;
  background: #fbfcfe;
}
.tutorial-content-card .tutorial-step-title { font-size: 15.5px; }
.tutorial-content-card .tutorial-step-body { color: #48566b; }
.tutorial-content-card .tutorial-step-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 8px 4px 0;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(18, 168, 154, .35);
  background: rgba(18, 168, 154, .08);
  color: #0d6c60 !important;
  font-size: 13.5px;
  font-weight: 700;
}
.tutorial-content-card .tutorial-step-action:hover { background: rgba(18, 168, 154, .16); }
.tutorial-content-card .tutorial-delivery-code,
.tutorial-content-card .tutorial-delivery-code code {
  display: block;
  padding: 12px 14px;
  margin: 8px 0 4px;
  border-radius: 10px;
  background: #16202f;
  color: #d8e4f2 !important;
  font-size: 12.5px;
  line-height: 1.75;
  overflow-x: auto;
}
.tutorial-content-card .tutorial-alert {
  padding: 12px 14px;
  margin: 10px 0 4px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
}
.tutorial-content-card .tutorial-alert.is-danger { background: #fdeceb; color: #a02519; }
.tutorial-content-card .tutorial-alert.is-warn { background: #fdf6e3; color: #8a5a00; }
.tutorial-content-card .tutorial-alert.is-info { background: #eaf4fd; color: #17527e; }
.tutorial-content-card .tutorial-shot,
.tutorial-content-card .tutorial-figure img { border-radius: 12px; border: 1px solid rgba(20, 39, 66, .08); }
.tutorial-content-card .tutorial-checklist,
.tutorial-content-card .tutorial-faq-row { border-color: rgba(20, 39, 66, .08); }
@media (max-width: 760px) {
  .tutorial-content-card.tutorial-rich-text { padding: 18px 15px 22px; border-radius: 16px; }
  .tutorial-content-card .tutorial-step { padding: 14px 14px; }
  .tutorial-content-card .tutorial-step-action { padding: 8px 13px; }
}

/* ---------- 6. 深色主题 ---------- */
html[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #131d2c;
  --surface-2: #17222f;
  --surface-3: #1d2a3b;
  --text: #e6edf7;
  --muted: #93a3ba;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --accent: #1fc9b6;
  --accent-strong: #35d6c4;
  --accent-soft: rgba(31, 201, 182, .14);
  --amber: #e5ad46;
  --amber-soft: rgba(229, 173, 70, .16);
  --red: #f2707e;
  --red-soft: rgba(242, 112, 126, .14);
  --shadow: 0 20px 55px rgba(0, 0, 0, .5);
  --shadow-soft: 0 8px 26px rgba(0, 0, 0, .38);
  color-scheme: dark;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .cloud-body { background: var(--bg) !important; color: var(--text); }

/* 头部 / 导航 / 页脚 */
html[data-theme="dark"] .site-header {
  background: rgba(12, 19, 31, .9) !important;
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .nav-chip { color: #b9c7da !important; background: rgba(255, 255, 255, .05); border-color: transparent; }
html[data-theme="dark"] .nav-chip:hover,
html[data-theme="dark"] .nav-chip.is-active { background: rgba(31, 201, 182, .16); color: #6ce0d2 !important; }
html[data-theme="dark"] .hdr-round { background: var(--surface-2) !important; color: #b9c7da !important; box-shadow: none; }
html[data-theme="dark"] .site-footer { background: var(--surface); border-top-color: var(--line); }
html[data-theme="dark"] .footer-links a,
html[data-theme="dark"] .footer-bottom { color: var(--muted); }
html[data-theme="dark"] .user-menu-list { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
html[data-theme="dark"] .user-menu-list a { color: #cfdaea; }
html[data-theme="dark"] .user-menu-list a:hover { background: var(--surface-2); }

/* 通用卡片 */
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .category-panel,
html[data-theme="dark"] .item-card,
html[data-theme="dark"] .item-panel,
html[data-theme="dark"] .buy-card,
html[data-theme="dark"] .guide-card,
html[data-theme="dark"] .guide-panel,
html[data-theme="dark"] .trust-item,
html[data-theme="dark"] .tutorial-content-card,
html[data-theme="dark"] .tutorial-index-panel,
html[data-theme="dark"] .tutorial-index-card,
html[data-theme="dark"] .tutorial-related,
html[data-theme="dark"] .lottery-card,
html[data-theme="dark"] .member-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow-soft);
}
html[data-theme="dark"] .benefit-mini { background: linear-gradient(135deg, #17332f, #14202e) !important; border-color: rgba(31, 201, 182, .25) !important; }
html[data-theme="dark"] .benefit-mini .bm-ico { background: rgba(31, 201, 182, .16) !important; color: #6ce0d2 !important; }

/* 文字颜色 */
html[data-theme="dark"] .item-panel,
html[data-theme="dark"] .item-panel .panel-body,
html[data-theme="dark"] .item-card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .tutorial-content-card,
html[data-theme="dark"] .tutorial-rich-text,
html[data-theme="dark"] .guide-detail,
html[data-theme="dark"] .browse-item { color: #c8d5e6; }
html[data-theme="dark"] .item-panel h2,
html[data-theme="dark"] .item-panel h3,
html[data-theme="dark"] .item-card h1,
html[data-theme="dark"] .panel-title,
html[data-theme="dark"] .home-heading h1 { color: #eaf1fb; }
html[data-theme="dark"] .breadcrumb-bar,
html[data-theme="dark"] .breadcrumb-bar a,
html[data-theme="dark"] .item-price-meta,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .text-muted { color: var(--muted) !important; }

/* 表单 / 列表 / 表格 */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .input,
html[data-theme="dark"] .form-control {
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #7d8ca2 !important; }
html[data-theme="dark"] .table,
html[data-theme="dark"] table { color: #cfdaea; }
html[data-theme="dark"] .table > thead > tr > th,
html[data-theme="dark"] .table > tbody > tr > td { border-color: var(--line) !important; }
html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) { background: rgba(255, 255, 255, .03); }

/* 教程页 */
html[data-theme="dark"] .tutorial-content-card.tutorial-rich-text { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .tutorial-content-card .tutorial-step {
  background: var(--surface-2);
  border-color: var(--line);
}
html[data-theme="dark"] .tutorial-content-card .tutorial-step-body { color: #c0cfe1; }
html[data-theme="dark"] .tutorial-content-card .tutorial-step-title { color: #eaf1fb; }
html[data-theme="dark"] .tutorial-content-card .tutorial-step-action {
  background: rgba(31, 201, 182, .14);
  border-color: rgba(31, 201, 182, .38);
  color: #6ce0d2 !important;
}
html[data-theme="dark"] .tutorial-content-card .tutorial-alert.is-danger { background: rgba(242, 112, 126, .14); color: #ffb3bb; }
html[data-theme="dark"] .tutorial-content-card .tutorial-alert.is-warn { background: rgba(229, 173, 70, .14); color: #f6cd82; }
html[data-theme="dark"] .tutorial-content-card .tutorial-alert.is-info { background: rgba(90, 160, 230, .14); color: #a8d3f8; }
html[data-theme="dark"] .tutorial-hero-actions .tutorial-secondary-action,
html[data-theme="dark"] .tutorial-related a { color: #cfdaea; }
html[data-theme="dark"] .tutorial-related a:hover { background: var(--surface-2); }
html[data-theme="dark"] .tutorial-content-card .tutorial-checklist li,
html[data-theme="dark"] .tutorial-terminal-row { border-color: var(--line); }

/* 结算 / 购买区 */
html[data-theme="dark"] .field label,
html[data-theme="dark"] .buy-card h2 { color: #eaf1fb; }
html[data-theme="dark"] .qty-group input { background: var(--surface-2) !important; color: var(--text) !important; border-color: var(--line) !important; }
html[data-theme="dark"] .pay-list .pay { background: var(--surface-2) !important; border-color: var(--line) !important; color: #cfdaea; }

/* 会员中心 / 个人中心 */
html[data-theme="dark"] .member-shell,
html[data-theme="dark"] .member-nav,
html[data-theme="dark"] .member-body { background: transparent; }
html[data-theme="dark"] .member-nav a { color: #b9c7da; }
html[data-theme="dark"] .member-nav a.is-active { background: var(--accent-soft); color: #6ce0d2; }

/* 弹层 / 抽屉 */
html[data-theme="dark"] .category-drawer-panel { background: var(--surface) !important; color: var(--text); }
html[data-theme="dark"] .layer-content,
html[data-theme="dark"] .layui-layer,
html[data-theme="dark"] .toastr { color: #e6edf7; }

/* ============================================================
   2026-11-22 教程页：配色与站点主色统一（青绿）+ 深色适配
   ============================================================ */
:root{
  --tutorial-purple:#12a89a;
  --tutorial-purple-dark:#0b8b81;
  --tutorial-soft:#e6f7f4;
}
.tutorial-step:before{background:linear-gradient(135deg,#14b3a4,#0a8c82)!important;box-shadow:0 8px 18px rgba(18,168,154,.28)!important}
.tutorial-step-action,.tutorial-not-found a,.tutorial-empty button{background:linear-gradient(135deg,#14b3a4,#0a8c82)!important;box-shadow:0 8px 18px rgba(18,168,154,.22)!important}
.tutorial-rich-text a{color:#0b7f76!important}
.tutorial-kicker,.tutorial-index-panel>header span,.tutorial-related header>span,.tutorial-guide-drawer-panel>header small{color:#0e8f84!important}
.tutorial-index-number{background:#e6f7f4!important;color:#0e8f84!important}
.tutorial-index-card:hover{border-color:rgba(18,168,154,.45)!important;box-shadow:0 16px 34px rgba(18,168,154,.14)!important}
.tutorial-detail-hero>.tutorial-kicker{background:#e6f7f4!important;color:#0e8f84!important}
.tutorial-steps.is-teal .tutorial-step:before{background:linear-gradient(135deg,#14b3a4,#0a8c82)!important}
.tutorial-totp-intro input:focus{border-color:#12a89a!important}

/* ---- 深色模式 ---- */
html[data-theme="dark"]{
  --tutorial-ink:#e8eef7;
  --tutorial-muted:#9aa8bb;
  --tutorial-line:#25303d;
  --tutorial-panel:#151c26;
  --tutorial-soft:#16302f;
  --tutorial-shadow:0 16px 44px rgba(0,0,0,.4);
}
html[data-theme="dark"] body[data-page="tutorials"]{background:#0f141b!important;color:#e8eef7!important}
html[data-theme="dark"] .tutorial-index-hero{
  background:linear-gradient(125deg,#151f2a,#131c26)!important;
  border-color:#25303d!important;
}
html[data-theme="dark"] .tutorial-index-panel,
html[data-theme="dark"] .tutorial-index-card,
html[data-theme="dark"] .tutorial-card,
html[data-theme="dark"] .tutorial-all-guides-bar,
html[data-theme="dark"] .tutorial-related,
html[data-theme="dark"] .tutorial-empty,
html[data-theme="dark"] .tutorial-not-found,
html[data-theme="dark"] .tutorial-guide-drawer-panel,
html[data-theme="dark"] .tutorial-skeleton{
  background:#151c26!important;
  border-color:#25303d!important;
  color:#e8eef7!important;
}
html[data-theme="dark"] .tutorial-related nav>a,
html[data-theme="dark"] .tutorial-guide-drawer-panel nav a,
html[data-theme="dark"] .tutorial-check-row,
html[data-theme="dark"] .tutorial-faq-row,
html[data-theme="dark"] .tutorial-terminal-row,
html[data-theme="dark"] .tutorial-rich-text .detail-media-block,
html[data-theme="dark"] .tutorial-rich-text .detail-image-block,
html[data-theme="dark"] .tutorial-rich-text .detail-video-block,
html[data-theme="dark"] .tutorial-format,
html[data-theme="dark"] .tutorial-alert.is-plain{
  background:#1b2431!important;
  border-color:#25303d!important;
  color:#c9d5e3!important;
}
html[data-theme="dark"] .tutorial-rich-text p,
html[data-theme="dark"] .tutorial-index-card em,
html[data-theme="dark"] .tutorial-tip span,
html[data-theme="dark"] .tutorial-figure figcaption,
html[data-theme="dark"] .tutorial-video-tip,
html[data-theme="dark"] .tutorial-caption,
html[data-theme="dark"] .tutorial-delivery-example{color:#9aa8bb!important}
html[data-theme="dark"] .tutorial-terminal-row strong{color:#e8eef7!important}
html[data-theme="dark"] .tutorial-terminal-row span{color:#9aa8bb!important}
html[data-theme="dark"] .tutorial-tip{border-top-color:#25303d!important}
html[data-theme="dark"] .tutorial-step-totp,
html[data-theme="dark"] .tutorial-totp-tool{background:#122a29!important;border-color:#1d4a46!important}
html[data-theme="dark"] .tutorial-totp-intro input{background:#0f141b!important;border-color:#2c3a4a!important;color:#e8eef7!important}
html[data-theme="dark"] .tutorial-alert,
html[data-theme="dark"] .tutorial-note,
html[data-theme="dark"] .tutorial-phone-tip{background:#2a2413!important;border-color:#5a4a1a!important;color:#f0d68a!important}
html[data-theme="dark"] .tutorial-alert.is-danger,
html[data-theme="dark"] .tutorial-danger,
html[data-theme="dark"] .tutorial-secret-warning{background:#301819!important;border-color:#5d2a2c!important;color:#ffb3b0!important}
html[data-theme="dark"] .tutorial-alert.is-info,
html[data-theme="dark"] .tutorial-inline-link{background:#122435!important;border-color:#235a86!important;color:#a8cdf5!important}
html[data-theme="dark"] .tutorial-rich-text .detail-alert{background:#2a2413!important;border-color:#5a4a1a!important;color:#f0d68a!important}
html[data-theme="dark"] .tutorial-rich-text .detail-note{background:#122a29!important;border-color:#1d4a46!important;color:#8fe0d6!important}
html[data-theme="dark"] .tutorial-shot,
html[data-theme="dark"] .tutorial-video{background:#0b1017!important;border-color:#25303d!important}
html[data-theme="dark"] .tutorial-back,
html[data-theme="dark"] .tutorial-all-guides-bar em{color:#9aa8bb!important}

/* ---- 推广任务卡 / 充值卡 深色补齐 ---- */
html[data-theme="dark"] .pt-task,
html[data-theme="dark"] .pt-modal-card,
html[data-theme="dark"] .rc-tier,
html[data-theme="dark"] .rc-card,
html[data-theme="dark"] .promo-card,
html[data-theme="dark"] .order-card,
html[data-theme="dark"] .record-row{
  background:#151c26!important;border-color:#25303d!important;color:#e8eef7!important;
}
html[data-theme="dark"] .pt-task h3,
html[data-theme="dark"] .pt-task b,
html[data-theme="dark"] .rc-tier b{color:#e8eef7!important}
html[data-theme="dark"] .pt-task p,
html[data-theme="dark"] .pt-task-eyebrow,
html[data-theme="dark"] .record-row span{color:#9aa8bb!important}
html[data-theme="dark"] .promo-url input,
html[data-theme="dark"] .promo-field input,
html[data-theme="dark"] .promo-field textarea,
html[data-theme="dark"] .promo-field select{background:#0f141b!important;border-color:#2c3a4a!important;color:#e8eef7!important}

/* ---- 2FA 页深色 ---- */
html[data-theme="dark"] .tfa-page{background:var(--bg)!important}
html[data-theme="dark"] .tfa-card,
html[data-theme="dark"] .tfa-panel,
html[data-theme="dark"] .tfa-result,
html[data-theme="dark"] .tfa-account,
html[data-theme="dark"] .tfa-account-body{background:#131d2c!important;border-color:#25303d!important;color:#e6edf7!important}
html[data-theme="dark"] .tfa-head h1,
html[data-theme="dark"] .tfa-panel h2,
html[data-theme="dark"] .tfa-result-label,
html[data-theme="dark"] .tfa-code,
html[data-theme="dark"] .tfa-note strong,
html[data-theme="dark"] .tfa-account summary{color:#e6edf7!important}
html[data-theme="dark"] .tfa-desc,
html[data-theme="dark"] .tfa-label,
html[data-theme="dark"] .tfa-eyebrow,
html[data-theme="dark"] .tfa-result-meta,
html[data-theme="dark"] .tfa-note span,
html[data-theme="dark"] .tfa-account-body{color:#9aa8bb!important}
html[data-theme="dark"] .tfa-note{background:#16222f!important;border-color:#25303d!important}
html[data-theme="dark"] .tfa-result-top{background:#16222f!important}
html[data-theme="dark"] .tfa-btn-ghost{background:#1b2634!important;border-color:#2c3a4a!important;color:#cfdcec!important}
html[data-theme="dark"] .tfa-badge.off{background:#2a1c1c!important;color:#e08b8b!important}

/* ---- 教程页底色/横幅去掉冷紫，统一青绿 ---- */
body[data-page="tutorials"]{background:linear-gradient(180deg,#edf7f6 0,#f6f9fb 430px)!important}
.tutorial-index-hero{background:linear-gradient(125deg,rgba(255,255,255,.97),rgba(232,248,246,.95))!important;border-color:#dbeae8!important}
html[data-theme="dark"] body[data-page="tutorials"]{background:linear-gradient(180deg,#0c1520 0,#0b1220 430px)!important}
html[data-theme="dark"] .tutorial-index-hero{background:linear-gradient(125deg,rgba(19,29,44,.97),rgba(20,36,42,.95))!important;border-color:#25303d!important}
