
/* =========================================================
   CoinASX Trade UI Fine Responsive V68
   精致细节 + 保持参考样子 + 统一大小 + 全自适应
   基于用户提供的交易页面结构
   ========================================================= */

:root{
  --v68-bg:#070707;
  --v68-panel:#1c1c1e;
  --v68-panel2:#242426;
  --v68-line:#2d2d2f;
  --v68-text:#f5f5f7;
  --v68-muted:#9a9aa0;
  --v68-green:#b8e83d;
  --v68-red:#ee4e62;
  --v68-radius:12px;
  --v68-gap:14px;
  --v68-field-h:50px;
}

html,body,#app{
  width:100%!important;
  max-width:100%!important;
  min-height:100%!important;
  overflow-x:hidden!important;
  background:var(--v68-bg)!important;
}

body{
  -webkit-font-smoothing:antialiased!important;
  text-rendering:optimizeLegibility!important;
  color:var(--v68-text)!important;
}

*{
  box-sizing:border-box!important;
}

img,svg,canvas{
  max-width:100%!important;
}

/* ===== 页面主体 ===== */
.appContent,
.mainBackground{
  width:100%!important;
  min-width:0!important;
  background:var(--v68-bg)!important;
}

/* ===== 顶部交易对 ===== */
.contract-header{
  background:var(--v68-bg)!important;
  border-bottom:1px solid #1b1b1d!important;
  box-shadow:none!important;
}

.contract-header>.pl-30{
  padding-left:clamp(10px,3.5vw,22px)!important;
  padding-right:clamp(10px,3.5vw,22px)!important;
}

.contract-header .pt-45{
  padding-top:14px!important;
  padding-bottom:12px!important;
  min-height:58px!important;
  align-items:center!important;
}

.contract-header .font-35{
  font-size:clamp(17px,4.7vw,21px)!important;
  line-height:1.15!important;
  font-weight:800!important;
  letter-spacing:-.25px!important;
  color:#fff!important;
}

.contract-header .ml-15{
  margin-left:7px!important;
  color:#8f8f94!important;
  font-size:clamp(11px,3vw,13px)!important;
}

.contract-header .pl-30.w-160{
  width:auto!important;
  padding-left:8px!important;
  font-size:clamp(12px,3.2vw,14px)!important;
  font-weight:700!important;
}

/* ===== 合约主区域 ===== */
.perpetual-open{
  margin:0!important;
  padding:12px clamp(10px,3.5vw,18px) 10px!important;
  background:var(--v68-bg)!important;
  border:0!important;
  box-shadow:none!important;
  border-radius:0!important;
}

.perpetual-open>.pt-30.pb-20{
  padding-top:0!important;
  padding-bottom:0!important;
}

.perpetual-open>.pt-30.pb-20>.flex{
  display:grid!important;
  grid-template-columns:minmax(0,58fr) minmax(0,42fr)!important;
  gap:var(--v68-gap)!important;
  align-items:start!important;
}

.perpetual-open .w-440.flex.flex-col,
.perpetual-open>.pt-30.pb-20>.flex>.ml-30{
  width:auto!important;
  min-width:0!important;
  margin-left:0!important;
}

/* ===== 全仓 / 杠杆 ===== */
.perpetual-open .header-open{
  width:100%!important;
  padding-bottom:11px!important;
  border:0!important;
}

.perpetual-open .header-open>.flex.flex-1.pt-34{
  display:grid!important;
  grid-template-columns:1.25fr .8fr!important;
  gap:8px!important;
  width:100%!important;
  padding-top:0!important;
}

.perpetual-open .header-open .w-180,
.perpetual-open .header-open .w-140{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:36px!important;
  min-height:36px!important;
  line-height:36px!important;
  margin:0!important;
  background:#20
  border:0!important;
  border-radius:9px!important;
  color:#f2f2f3!impor
  font-size:12px!important;
}

.perpetual-open .header-open .select-wrap{
  width:100%!important;
  height:36px!important;
  min-height:36px!important;
  padding:0 10px!important;
  border-radius:9px!important;
  font-size:12px!important;
}

/* ===== 开多 / 开空 ===== */
.perpetual-open .w-440>.flex.items
  display:grid!important;
  grid-template-c
  height:40px!important;
  min-height:40px!important;
  padding:3px!important;
  margin:0 0 10px!important;
  background:#202022!important;
  border-radius:10px!important;
  overflow:hidden!important;
}

.perpetual-open .w-440>.flex.items-center.h-66>p{
  height:34px!important;
  min-height:34px!impo
  line-height:34px!important;
  margin:0!important;
  border-radius:8px!important;
  font-size:13px!important;
  font-weight:700!important;
  color:#a1a1a6!important;
}

.perpetual-open .w-440>.flex.items-center.h-66>p.long{
  background:#3b4723!important;
  color:var(--v68-green)!important;
}

/* ===== 市价/限价 ===== */
.perpetual-open .mt-30.mb-30{
  margin-top:0!important;
  margin-bottom:10px!important;
}

.perpetual-open .mt-30.mb-30>.inputBackground.h-76{
  width:100%!important;
  height:40px!important;
  min-height:40px!important;
  line-height:40px!important;
  padding:0 10px!important;
  background:#202022!important;
  border:0!important;
  border-radius:10px!important;
}

.perpetual-open .mt-30.mb-30>.inputBackground.h-76 .text-center{
  font-size:13px!important;
  font-weight:700!important;
}

/* ===== 输入框统一 ===== */
.perpetual-open .h-76.inputBackground,
.perpetual-open .w-440.flex.items-center.inputBackground.h-76{
  width:100%!important;
  min-width:0!important;
  height:var(--v68-field-h)!important;
  min-height:var(--v68-field-h)!important;
  line-height:var(--v68-field-h)!important;
  margin-bottom:10px!important;
  padding:0 12px!important;
  background:#202022!important;
  border:1px solid transparent!important;
  border-radius:var(--v6
  overflow:hidden!important;
  box-shadow:none!important;
}

.perpetual-open .h-76.inputBackground:focus-within{
  background:#242426!important;
  border-color:#34363a!important;
}

.perpetual-open .h-76 input,
.perpetual-open input[type="number"]{
  width:100%!important;
  min-width:0!important;
  height:calc(var(--v68-field-h) - 2px)!important;
  min-height:calc(var(--v68-field-h) - 2px)!important;
  line-height:calc(var(--v68-field-h) - 2px)!important;
  margin:0!important;
  padding:0 4px!important;
  background:transparent!important;
  border:0!important;
  outline:0!important;
  color:#fff!important;
  font-size:clamp(13px,3.6vw,15px)!important;
}

.perpetual-open input:disabled{
  opacity:1!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

.perpetual-open input::placeholder{
  color:#8f9095!important;
  font-size:clamp(12px,3.1vw,13px)!important;
}

.perpetual-open .h-76 span{
  flex-shrink:0!important;
  white-space:nowrap!important;
  color:#d0d0d3!important;
  font-size:12px!important;
}

/* ===== 张数 +/- ===== */
.perpetual-open .w-440.flex.items-center.inputBackground.h-76{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) 42px!important;
  padding:0!important;
}

.perpetual-open .w-440.flex.items-center.inputBackground.h-76 .w-80{
  width:42px!important;
  min-width:42px!important;
  height:100%!important;
}

.perpetual-open .w-440.flex.i
  width:100%!important;
  padding:0!important;
  text-align:center!important;
}

/* ===== 滑块 ===== */
.perpetual-open .mt-40.mb-30{
  margin-top:13px!important;
  margin-bottom:10px!important;
}

.perpetual-open .slider-index{
  padding-top:2px!important;
  padding-bottom:2px!important;
}

.perpetual-open .vue-slider-rail{
  height:2px!important;
  background:#303034!important;
}

.perpetual-open .vue-slider-process{
  height:2px!important;
  background:#fff!important;
}

.perpetual-open .custom-step{
  width:9px!important;
  height:9px!important;
  background:#1e1e20!important;
  border:0!important;
  transform:rotate(45deg)!important;
}

.perpetual-open .custom-step.active{
  background:#fff!important;
}

.perpetual-open .vue-slider-dot-handle{
  background:#fff!important;
  border:0!important;
  border-radius:2px!important;
  box-shadow:none!important;
  transform:rotate(45deg)!important;
}

.perpetual-open .poecs{
  margin-top:6px!important;
  color:#8e8f94!important;
  font-size:10px!important;
}

/* ===== 右侧盘口 ===== */
.perpetual-open .deep-data{
  width:100%!important;
  min-width:0!important;
  padding:0!important;
  background:var(--v68-bg)!important;
  border:0!important;
}

.perpetual-open .deep-data>.flex.justify-between.text-grey{
  min-height:44px!important;
  padding:0 0 6px!important;
}

.perpetual-open .deep-data .font-24{
  font-size:10px!important;
  color:#8f9095!important;
}

.perpetual-open .deep-data .font-26{
  min-height:22px!important;
  line-height:22px!important;
  padding-top:0!important;
  padding-bottom:0!important;
  font-size:clamp(10px,2.8vw,12px)!important;
  font-variant-numeric:tabular-nums!important;
}

.perpetual-open .deep-data .font-34{
  min-height:30px!important;
  line-height:30px!important;
  padding-top:5px!important;
  font-size:clamp(17px,4.7vw,20px)!important;
  font-weight:800!important;
}

.perpetual-open .deep-data .approximately-text{
  min-height:18px!important;
  line-height:18px!important;
  padding-bottom:4px!important;
  color:#8a8c92!important;
  font-size:10px!important;
}

.text-green{color:var(--v68-green)!important}
.text-red{color:var(--v68-red)!important}

/* ===== 盘口底部下拉 ===== */
.perpetual-open .k-select-box{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  gap:8px!important;
  align-items:center!important;
  margin-top:10px!important;
}

.perpetual-open .k-select-box .select-box{
  height:38px!important;
  min-height:38px!important;
  margin:0!important;
  background:#222224!important;
  border:0!important;
  border-radius:9px!important;
}

/* ===== 持仓区 ===== */
[data-v-fd92b1e2].pl-30.pr-30{
  margin:20px 0 0!important;
  padding:16px clamp(10px,3.5vw,18px)!important;
  background:var(--v68-bg)!important;
  border:0!important;
  border-top:1px solid #1b1b1d!important;
  box-shadow:none!important;
}

[data-v-fd92b1e2] .px-10{
  font-size:clamp(13px,3.6vw,16px)!important;
  font-weight:700!important;
  color:#929297!important;
}

[data-v-fd92b1e2] .active-line{
  color:#fff!important;
}

/* ===== K线 ===== */
.cx54-kline-host{
  width:auto!important;
  height:clamp(170px,48vw,280px)!important;
  margin:10px clamp(10px,3.5vw,18px) 0!important;
  background:#080808!important;
  border-top:1px solid #1b1b1d!important;
  border-bottom:0!important;
}

.cx54-toolbar{
  background:#080808!important;
  border-bottom:1px solid #1b1b1d!important;
}

.cx54-period{
  font-size:clamp(9px,2.5vw,11px)!important;
}

.cx54-period.active{
  color:#fff!important;
}

.cx54-period.active:after{
  background:var(--v68-green)!important;
}

/* ===== 底部导航 ===== */
.van-tabbar--fixed{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  transform:translateX(-50%)!important;
  bottom:max(8px,env(safe-area-inset-bottom))!important;
  width:min(760px,calc(100% - 20px))!important;
  height:clamp(56px,15vw,66px)!important;
  padding:7px!important;
  background:#151517!important;
  border:1px solid #2a2a2d!important;
  border-radius:36px!important;
  overflow:hidden!important;
  box-shadow:none!important;
}

.van-tabbar-item{
  background:transparent!important;
  color:#b7b7bb!important;
  font-size:clamp(10px,2.7vw,12px)!important;
  border-radius:28px!important;
}

.van-tabbar-item--active{
  background:#3a3a3d!important;
  color:#fff!important;
  font-weight:700!important;
}

.van-tabbar-item__icon img{
  width:clamp(18px,5vw,21px)!important;
  height:clamp(18px,5vw,21px)!important;
}

/* ===== 全自适应 ===== */
@media(max-width:360px){
  :root{
    --v68-gap:8px;
    --v68-field-h:44px;
  }

  .perpetual-open{
    padding-left:8px!important;
    padding-right:8px
  }

  .perpetual-open>.pt-30.pb-20>.flex{
    grid-template-columns:minmax(0,60fr) minmax(0,40fr)!important;
  }

  .perpetual-open .deep-data .font-26{
    font-size:10px!important;
  }
}

@media(min-width:361px) and (max-width:430px){
  :root{
    --v68-gap:10px;
    --v68-field-h:46px;
  }

  .perpetual-open>.pt-30.pb-20>.flex{
    grid-template-columns:minmax(0,59fr) minmax(0,41fr)!important;
  }
}

@media(min-width:431px) and (max-width:767px){
  :root{
    --v68-gap:16px;
    --v68-field-h:50px;
  }

  .perpetual-open{
    padding-left:18px!important;
    padding-right:18px!important;
  }

  .perpetual-open>.pt-30.pb-20>.flex{
    grid-template-columns:minmax(0,60fr) minmax(0,40fr)!important;
  }
}

@media(min-width:768px) and (max-width:1024px){
  #app{
    width:min(100%,900px)!important;
    margin:0 auto!important;
  }

  .perpetual-open{
    padding-left:24px!important;
    padding-right:24px!important;
  }

  .perpetual-open>.pt-30.pb-20>.flex{
    grid-template-columns:minmax(0,62fr) minmax(280px,38fr)!important;
    gap:22px!important;
  }

  .cx54-kline-h
    margin-left:24px!important;
    margin-right:24px!important;
    height:280px!important;
  }
}

@media(min-width:1025px){
  #app{
    width:min(100%,1100px)!important;
    margin:0 auto!important;
  }

  .perpetual-open{
    padding-left:28px!important;
    padding-right:28px!important;
  }

  .perpetual-open>.pt-30.pb-20>.flex{
    grid-template-columns:minmax(0,64fr) minmax(320px,36fr)!important;
    gap:28px!important;
  }

  .cx54-kline-host{
    margin-left:28px!important;
    margin-right:28px!important;
    height:320px!important;
  }
}

@media(max-height:500px) and (orientation:landscape){
  .contract-header .pt-45{
    min-height:46px!important;
    padding-top:8px!important;
    padding-bottom:8px!important;
  }

  .cx54-kline-host{
    height:165px!important;
  }

  .van-tabbar--fixed{
    height:52px!important;
  }
}

@supports(padding:max(0px)){
  .appContent{
    padding-bottom:max(100px,calc(82px + env(safe-area-inset-bottom)))!important;
  }
}

