/* ===== 本地自定义覆盖（不改动打包文件，全部写在这里） ===== */

/* 全局固定的顶部：黄色横幅 + 导航栏，滚动/跳页都一直贴顶 */
#site-top{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #d4d0c8;              /* 与站点底色一致 */
  box-shadow: 0 1px 0 rgba(0,0,0,.15);
}

/* 隐藏首页里自带的那份（现在由全局固定头替代，避免重复） */
.lp > .lp-flagship,
.lp > .lp-nav{ display: none !important; }

/* 非破坏性隐藏：用 class 标记，不删 React 节点，避免应用崩溃 */
.lv-hide{ display:none !important; }

/* 导航栏推特(X)图标 */
#site-top .lp-nav nav .lv-x{ display:inline-flex; align-items:center; }
#site-top .lp-nav nav .lv-x svg{ display:block; }

/* 有注入的静态模型列表时，隐藏 React 原生的动态列表 / 空状态（只隐藏，不删节点） */
.lp-list.lv-has-inject > .cpu-table,
.lp-list.lv-has-inject > .muted{ display:none !important; }

/* 注入的“等待代币上线”说明条 */
.lv-await{
  margin:2px 0 14px; padding:10px 14px; border:1px solid #c99a06; border-radius:6px;
  background:rgba(240,185,11,.08); color:#f0b90b; font-size:13px; line-height:1.5;
}

/* 「我们做了什么」创新说明块 —— 本块自带 filter:invert(1) 抵消全站反相，故按正常黑黄配色书写 */
.lv-innovation{
  filter:invert(1);
  margin:30px 0 6px; padding:20px 22px; border:1px solid #2a2a2a; border-radius:10px;
  border-left:3px solid #f0b90b; background:#0b0b0b;
}
.lv-inv-head{ color:#f0b90b; font-family:ui-monospace,monospace; font-size:15px; font-weight:700; margin-bottom:12px; }
.lv-inv-lead{ color:#cfcfcf; font-size:14px; line-height:1.75; margin:0 0 14px; }
.lv-inv-lead b{ color:#fff; font-weight:600; }
.lv-inv-list{ margin:0; padding-left:20px; }
.lv-inv-list li{ color:#b8b8b8; font-size:13.5px; line-height:1.7; margin-bottom:10px; }
.lv-inv-list li b{ color:#f0b90b; font-weight:600; }
.lv-inv-foot{ color:#f0b90b; font-size:14px; font-style:italic; margin:16px 0 0; }

/* 合约地址链接 → 显示 TBA（隐藏原文字，用 ::after 盖上 TBA） */
.lp-addrs .addr-row a.lv-tba, .lp-foot a.lv-tba{
  font-size:0 !important; color:transparent !important; pointer-events:none; text-decoration:none;
}
.lp-addrs .addr-row a.lv-tba::after, .lp-foot a.lv-tba::after{
  content:"TBA"; font-size:13px; color:#8a8578; font-family:ui-monospace,monospace;
}

/* 把 App 内容整体下推，避免被固定头盖住（高度由 custom.js 精确设置，这里给个兜底值） */
#root{ padding-top: 93px; }

/* ===== 全站暗色：反相 + 提高对比，把底压成纯黑、字提成纯白 ===== */
html{ filter: invert(1) contrast(1.5); background:#000; }
/* 需要真实色的元素：再反相一次抵消（黑黄主题：按钮/链接=黄，横幅/图片=本色） */
#site-top .lp-flagship, img, video, picture, .seg-wrap,
#root a, .lp-nav .brand,
.btn:not(.ghost), .cpu .btn:not(.ghost), .lp-btn:not(.ghost),
.deploy .btn:not(.ghost), .tapeout-card .tp-btn, .toolbar .wallet,
.toolbar .load, .deploy .seg button.on, .pline.cur, .tree .selected{ filter: invert(1); }

/* ===== 蓝 → 黄：所有主按钮统一黄底黑字（#root 前缀提高优先级，压过链接的黄字规则）===== */
#root .btn:not(.ghost), #root .cpu .btn:not(.ghost), #root .lp-btn:not(.ghost),
#root .deploy .btn:not(.ghost), #root .tapeout-card .tp-btn, #root .toolbar .wallet,
#root .toolbar .load, #root .deploy .seg button.on, #root .pline.cur, #root .tree .selected{
  background:#f0b90b !important; color:#1a1a1a !important; border-color:#c99a06 !important;
}
/* 按钮内部若有子元素带自己的颜色，也一并压黑 */
#root .btn:not(.ghost) *, #root .lp-btn:not(.ghost) *, #root .cpu .btn:not(.ghost) *,
#root .tapeout-card .tp-btn *, #root .toolbar .wallet *{ color:#1a1a1a !important; }
.btn:not(.ghost):hover, .cpu .btn:not(.ghost):hover, .lp-btn:not(.ghost):hover,
.deploy .btn:not(.ghost):hover, .toolbar .load:hover, .tapeout-card .tp-btn:hover{
  background:#e0ab08 !important;
}
/* 描边(ghost)按钮：深底 + 黄字黄边（本身多为 <a>，需覆盖链接规则）*/
#root .lp-btn.ghost, #root a.lp-btn.ghost, #root .btn.ghost, #root .cpu .btn.ghost,
#root .deploy .btn.ghost, #root .lp-btn.small.ghost{
  filter: invert(1) !important;
  background:#0d0d0d !important; color:#f0b90b !important; border:1px solid #c99a06 !important;
}
#root .lp-btn.ghost *, #root .btn.ghost *{ color:#f0b90b !important; }

/* 蓝色链接 → 黄 */
#root a, .addr-row a, .ci-addr, .cpu-head .back, .deploy a, .dt-sub a, .lp-mint a{ color:#f0b90b !important; }
/* 品牌字保持浅色，避免黄色过多 */
.lp-nav .brand{ color:#e8e8e8 !important; }
