/* =========================================================
   CoinASX V124
   Contract Theme Adaptive
   兼容：
   html.cx-theme-dark / light
   html[data-theme]
   html[data-cx-theme]
   ========================================================= */

html{
  --ct-bg:#000000;
  --ct-bg2:#08090b;
  --ct-panel:#101216;
  --ct-panel2:#17191e;
  --ct-border:#252930;
  --ct-border-soft:#1b1e23;

  --ct-title:#ffffff;
  --ct-text:#eef0f2;
  --ct-sub:#a6abb3;
  --ct-muted:#747a83;

  --ct-green:#13c98a;
  --ct-red:#ff4d63;
  --ct-blue:#2b6bff;
  --ct-accent:#b7ff24;

  color-scheme:dark;
}

/* 浅色 */
html.cx-theme-light,
html[data-theme="light"],
html[data-cx-theme="light"]{
  --ct-bg:#ffffff;
  --ct-bg2:#fafafa;
  --ct-panel:#f4f5f7;
  --ct-panel2:#eceef1;
  --ct-border:#dfe3e8;
  --ct-border-soft:#e9ebee;

  --ct-title:#111317;
  --ct-text:#30343a;
  --ct-sub:#737981;
  --ct-muted:#9aa0a8;

  --ct-green:#0ea772;
  --ct-red:#df4155;
  --ct-blue:#245eea;
  --ct-accent:#79c900;

  color-scheme:light;
}

/* 深色显式 */
html.cx-theme-dark,
html[data-theme="dark"],
html[data-cx-theme="dark"]{
  --ct-bg:#000000;
  --ct-bg2:#08090b;
  --ct-panel:#101216;
  --ct-panel2:#17191e;
  --ct-border:#252930;
  --ct-border-soft:#1b1e23;

  --ct-title:#ffffff;
  --ct-text:#eef0f2;
  --ct-sub:#a6abb3;
  --ct-muted:#747a83;

  --ct-green:#13c98a;
  --ct-red:#ff4d63;
  --ct-blue:#2b6bff;
  --ct-accent:#b7ff24;

  color-scheme:dark;
}

/* ===== 页面背景 ===== */
body,
#app,
.mainBackground,
.appContent,
.deliveryContract,
.perpetual-open,
.trend-detail,
.tabContent,
.deep-data,
.bg-night1{
  background-color:var(--ct-bg)!important;
  color:var(--ct-text)!important;
}

/* ===== 顶部 ===== */
.contract-header{
  background:var(--ct-bg)!important;
  border-color:var(--ct-border-soft)!important;
}

.contract-header .textColor,
.contract-header .font-35,
.contract-header .type-item.active{
  color:var(--ct-title)!important;
}

.contract-header .type-item,
.contract-header .text-grey{
  color:var(--ct-sub)!important;
}

.contract-header .contract-type-switch{
  background:var(--ct-panel)!important;
  border-color:var(--ct-border)!important;
}

.contract-header .type-divider{
  color:var(--ct-border)!important;
}

/* ===== 全局文本 ===== */
.textColor{
  color:var(--ct-text)!important;
}

.text-grey{
  color:var(--ct-sub)!important;
}

.approximately-text{
  color:var(--ct-muted)!important;
}

.text-green{
  color:var(--ct-green)!important;
}

.text-red{
  color:var(--ct-red)!important;
}

/* ===== 输入框、选择框、卡片 ===== */
.inputBackground,
.tabBackground,
.option-box,
.select-wrap,
.Full-warehouse-bottom,
.Delivery-time-item:nth-child(-n+4),
.Delivery-time-input .van-cell{
  background:var(--ct-panel)!important;
  border-color:var(--ct-border)!important;
  color:var(--ct-text)!important;
}

input,
textarea,
select{
  color:var(--ct-title)!important;
  caret-color:var(--ct-green)!important;
}

input::placeholder,
textarea::placeholder{
  color:var(--ct-mute
}

/* ===== 市价/限价弹层 ===== */
.option-box{
  box-shado
}

html.cx-theme-light .option-box,
html[data-theme="light"] .option-box,
html[data-cx-theme="light"] .option-box{
  box-shadow:0 10px 30px rgba(15,23,42,.10)!important;
}

/* ===== 买入卖出 / 多空 ===== */
.long,
.buy-item.open:first-child,
.Delivery-time-open-more:not(.Delivery-time-open-more-red){
  color:#fff!important;
}

.Delivery-time-open-more:not(.Delivery-time-open-more-red){
  background:var(--ct-green)!important;
}

.Delivery-time-open-more-red{
  background:var(--ct-red)!important;
}

/* ===== 
.btnBackground{
  background:var(--ct-blue)
  color:#fff!important;
}

/* ===== 百分比滑杆 ===== */
.vue-slider-rail{
  background:var(--ct-border)!important;
}

.vue-slider-process{
  background:var(--ct-blue)!important;
}

.vue-slider-dot-handle{
  background:var(--ct-title)!important;
  border-color:var(--ct-title)!important;
}

.cus
  background:var(--ct-panel2)
  border-color:var(--ct-border)!important;
}

.custom-step.active{
  background:var(--ct-blue)!import
  border-color:var(--ct-blue)!important;
}

.poecs,
.poecs span{
  color:var(--ct-sub)!important;
}

/* ===== K线 ===== */
.kline-charts,
.kline-charts > div,
#kline,
#kline > div{
  background:var(--ct-bg)!important;
}

.kline-charts ul{
  background:var(--ct-bg)!important;
  border-color:var(--ct-border-soft)!important;
}

.kline-charts li{
  color:var(--ct-sub)!important;
}

.kline-charts li.textColor{
  color:var(--ct-title)!important;
}

/* K线内部横线/分割条 */
#kline > div > div[style*="background-color: rgba(68, 75, 88"]{
  background-color:var(--ct-border-soft)!important;
}

/* ===== tabs ===== */
.van-tabs__nav,
.van-tabs__content,
.van-tab__pane{
  background:var(--ct-bg)!important;
}

.van-tab{
  color:var(--ct-sub)!important;
}

.van-tab--active{
  color:var(--ct-title)!important;
}

.van-tabs__line{
  background:var(--ct-green)!important;
}

/* ===== 深度盘口 ===== */
.deep-data{
  background:var(--ct-bg)!important;
}

.deep-data > .flex{
  border-color:var(--ct-border-soft)!important;
}

.deep-data .textColor{
  color:var(--ct-text)!important;
}

/* 覆盖老 inline 黑底盘口 */
.deep-data [style*="rgb(17, 17, 17)"]{
  background:transparent!important;
}

.deep-data [style*="rgba(94, 186, 137"]{
  background:
    linear-gradient(
      to left,
      color-mix(in srgb,var(--ct-green) 9%,transparent),
      transparent 74%
    )!important;
}

.deep-data [style*="rgba(246, 70, 93"]{
  background:
    linear-gradient(
      to left,
      color-mix(in srgb,var(--ct-red) 9%,transparent),
      transparent 74%
    )!important;
}

/* ===== 交割合约精修元素 ===== */
.Delivery-time-title,
.cx119-amount-head .l,
.cx119-pay-col span,
.handling-fee{
  color:var(--ct-sub)!important;
}

.cx119-amount-head .r,
.cx119-pay-col strong,
.price-content-title{
  color:var(--ct-title)!important;
}

.cx119-amount-head .r b{
  color:var(--ct-accent)!important;
}

.Delivery-time-item-time{
  color:var(--ct-title)!important;
}

.Delivery-time-item-percentage{
  color:var(--ct-muted)!important;
}

.Delivery-time-item:has(.Delivery-time-item-time[style*="127, 129, 253"]),
.Delivery-time-item:has(.Delivery-time-item-time[style*="127,129,253"]){
  border-color:var(--ct-accent)!important;
  background:
    color-mix(in srgb,var(--ct-accent) 5%,var(--ct-panel))!important;
}

.Delivery-time-item:has(.Delivery-time-item-time[style*="127, 129, 253"]) .Delivery-time-item-time,
.Delivery-time-item:has(.Delivery-time-item-time[style*="127,129,253"]) .Delivery-time-item-time{
  color:var(--ct-accent)!important;
}

/* 去紫色 inline 背景 */
.Delivery-time-item-time[style*="rgb(127, 129, 253)"],
.Delivery-time-item-percentage[style*="rgb(108, 82, 230)"]{
  background:transparent!important;
}

/* ===== 分割背景 ===== */
.greyBg{
  background:var(--ct-bg2)!important;
}

/* ===== 底部操作栏 ===== */
.buttonSafe,
.fixed.bottom-108{
  background:var(--ct-bg)!important;
  border-top:1px solid var(--ct-border-soft)!important;
}

/* ===== 图标在浅色下避免过淡 ===== */
html.cx-theme-light .contract-header img,
html[data-theme="light"] .contract-header img,
html[data-cx-theme="light"] .contract-header img{
  filter:brightness(.25)!important;
}

/* 对彩色/行情语义图标不强制反色 */
html.cx-theme-light img[alt="warn-icon"],
html[data-theme="light"] img[alt="warn-icon"],
html[data-cx-theme="light"] img[alt="warn-icon"]{
  filter:none!important;
}

/* ===== 主题平滑 ===== */
body,
#app,
.mainBackground,
.appContent,
.contract-header,
.inputBackground,
.tabBackground,
.deep-data,
.van-tabs__nav,
.van-tabs__content,
.Delivery-time-item,
.Delivery-time-input .van-cell{
  transition:
    background-color .14s ease,
    color .14s ease,
    border-color .14s ease!important;
}

/* 行情数字不闪 */
.deep-data *,
.price-content *,
.price-content-title{
  animation:none!important;
  text-shadow:none!important;
}

/* 小屏 */
@media(max-width:390px){
  .contract-header .font-35{
    font-size:16px!important;
  }

  .Delivery-time-item-time{
    font-size:12px!important;
  }
}
