/* ===== Deepro Demo — global styles ===== */
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }

/* Phone frame: emulate a mobile device on desktop, full-screen on mobile */
#phone-frame {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 480px) {
  body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
  #phone-frame {
    height: 880px;
    max-height: 94vh;
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    border: 10px solid #111;
  }
}

#app {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
#app::-webkit-scrollbar { width: 0; display: none; }

/* Bottom tab bar */
#tabbar {
  flex-shrink: 0;
  display: flex;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid #F1F2F4;
  box-shadow: 0 -4px 20px rgba(0,0,0,.05);
  padding: 6px 6px env(safe-area-inset-bottom, 6px);
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0 4px;
  font-size: 10px;
  letter-spacing: .3px;
  color: #9aa0a6;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.tab-item span { transition: color .2s ease, font-weight .2s ease; }
.tab-item i {
  font-size: 18px;
  width: 42px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px;
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
}
.tab-item:active { transform: scale(.93); }
/* 激活态：Deepro 金黄高亮胶囊 */
.tab-item.active { color: #1A1A1A; }
.tab-item.active span { font-weight: 700; color: #1A1A1A; }
.tab-item.active i {
  color: #1A1A1A;
  background: linear-gradient(135deg, #FFE27A, #FFC500);
  box-shadow: 0 4px 10px rgba(255,197,0,.45);
  transform: translateY(-2px);
}

/* 涨幅榜/跌幅榜 排名序号 */
.rank-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  font-size: 12px; font-weight: 600; color: #B7BBC2;
}
.rank-medal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 6px;
  font-size: 12px; font-weight: 800; color: #fff;
}
.rank-medal.rank-1 { background: linear-gradient(135deg,#FFD75E,#FFB300); box-shadow: 0 2px 5px rgba(255,179,0,.4); }
.rank-medal.rank-2 { background: linear-gradient(135deg,#D5DAE0,#A9B0BA); box-shadow: 0 2px 5px rgba(169,176,186,.35); }
.rank-medal.rank-3 { background: linear-gradient(135deg,#E8A972,#C77B3E); box-shadow: 0 2px 5px rgba(199,123,62,.35); }

/* ============ Hero 轮播海报 ============ */
.banner-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.banner-card {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 130px;
  border-radius: 18px;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  transition: transform .2s ease;
}
.banner-card:active { transform: scale(.985); }
.banner-glow {
  position: absolute;
  width: 220px; height: 220px;
  right: -50px; top: -70px;
  opacity: .9;
  animation: bannerFloat 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bannerFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-10px,12px) scale(1.08); }
}
.banner-inner {
  position: relative; z-index: 2;
  height: 100%;
  padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.banner-text { color: #fff; max-width: 66%; }
.banner-card[data-dark] .banner-text,
.banner-card.dark .banner-text { color: #1A1A1A; }
.banner-tag {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(255,255,255,.22);
  margin-bottom: 7px; letter-spacing: .3px;
}
.banner-title { font-size: 19px; font-weight: 800; line-height: 1.18; }
.banner-sub { font-size: 11.5px; opacity: .82; margin-top: 6px; }
.banner-art {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.art-infinity {
  font-size: 56px; font-weight: 900; color: #FFC500;
  text-shadow: 0 4px 16px rgba(255,197,0,.55);
  animation: spinPulse 5s ease-in-out infinite;
}
.art-emoji {
  font-size: 50px;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.18));
  animation: artBob 3.5s ease-in-out infinite;
}
@keyframes spinPulse {
  0%,100% { transform: scale(1) rotate(0deg); }
  50%     { transform: scale(1.12) rotate(8deg); }
}
@keyframes artBob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-7px); }
}
.banner-dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 9px;
}
.banner-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: #D8DBE0;
  transition: all .3s ease;
  cursor: pointer;
}
.banner-dot.active {
  width: 18px;
  background: linear-gradient(90deg,#FFD75E,#FFC500);
}

/* ============ 子页通用 ============ */
.sub-head {
  display: flex; align-items: center;
  padding: 8px 16px 10px;
  position: relative;
}
.sub-head .fa-chevron-left { font-size: 16px; color: #1A1A1A; cursor: pointer; padding: 4px 8px 4px 0; }
.sub-head .sub-title {
  position: absolute; left: 0; right: 0;
  text-align: center; font-size: 16px; font-weight: 700; color: #1A1A1A;
  pointer-events: none;
}
.sub-head .sub-right { margin-left: auto; }

/* 邀请页头图 */
.invite-hero {
  margin: 4px 16px 0; padding: 28px 20px 40px;
  border-radius: 18px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(125deg,#5B2EAE,#8B4FE0 55%,#B57BF5);
}
.invite-hero .banner-glow { right: -40px; top: -60px; }

/* 支付卡 */
.pay-card {
  border-radius: 18px; padding: 18px; color: #fff;
  background: linear-gradient(120deg,#1A1A1A,#2C2A20 60%,#3A3208);
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
/* 汇款卡 */
.remit-card {
  border-radius: 18px; padding: 24px 20px 30px; color: #fff;
  position: relative; overflow: hidden;
  background: linear-gradient(120deg,#0B6E5F,#14C2C2 60%,#3DE0C8);
}
.remit-card .banner-glow { right: -40px; top: -60px; }
/* 理财卡 */
.wealth-card {
  border-radius: 18px; padding: 18px; color: #fff;
  background: linear-gradient(120deg,#FFB300,#FFC500 55%,#FFD75E);
}
.wealth-card { color: #1A1A1A; }

/* ============ 应用中心 ============ */
.app-icon {
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  flex-shrink: 0;
}
.apps-banner {
  position: relative; overflow: hidden;
  border-radius: 16px; padding: 18px 18px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg,#1A1A1A 0%,#2C2A20 60%,#3A3208 100%);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.apps-banner .banner-glow { right: -40px; top: -50px; width: 180px; height: 180px; }

/* ============ 分享海报 ============ */
.share-poster {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 22px 20px 18px;
  background: linear-gradient(160deg,#1F1F1F 0%,#141414 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.poster-coin {
  position: absolute;
  width: 56px; height: 56px; border-radius: 50%;
  background: #1A1A1A; border: 3px solid #FFC500;
  display: flex; align-items: center; justify-content: center;
  color: #FFC500; font-weight: 900; font-size: 26px;
  box-shadow: 0 4px 12px rgba(255,197,0,.35);
}

/* Status bar (fake iOS style) */
.status-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px 4px; font-size: 13px; font-weight: 600; color: #1A1A1A;
}
.status-bar .right i { margin-left: 5px; font-size: 12px; }

/* Generic helpers */
.hairline { border-bottom: 1px solid #f0f0f0; }
.hairline-top { border-top: 1px solid #f0f0f0; }
.up { color: #14C2C2; }
.down { color: #FF3168; }
.bg-up { background: #14C2C2; }
.bg-down { background: #FF3168; }
.bg-flat { background: #9AA0A6; }
.text-quote { color: #B7BBC2; }
.tag {
  font-size: 10px; padding: 1px 5px; border-radius: 4px; font-weight: 700;
  display: inline-block; line-height: 1.4;
}
.tag-spot { background: #FFF3D6; color: #E8950C; }
.tag-perp { background: #FFE9D6; color: #F5731F; }
.tag-us { background: #E8F0FE; color: #4285F4; }
.tag-hk { background: #FDEAEA; color: #EA4335; }
.tag-fut { background: #E7F3FF; color: #1677FF; }

/* Page enter animation */
.page-enter { animation: fadeUp .22s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px);} to {opacity:1; transform: none;} }

/* slider track */
.dp-slider { -webkit-appearance: none; appearance: none; height: 3px; background: #E6E6E6; border-radius: 3px; outline: none; }
.dp-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #bbb; cursor: pointer; }

/* depth row bg bars */
.depth-bar { position: absolute; top: 0; bottom: 0; right: 0; opacity: .12; }

/* pill toggle */
.pill { transition: all .15s; }

/* toast */
#toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.9);
  background: rgba(0,0,0,.8); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 999; max-width: 80%; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* demo banner */
.demo-badge {
  background: linear-gradient(90deg,#FFC500,#F5B300); color:#1A1A1A;
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
}

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }

/* live indicator dot */
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #C9CDD4; vertical-align: middle;
}
.live-dot.on {
  background: #10B981; box-shadow: 0 0 0 0 rgba(16,185,129,.6);
  animation: livePulse 1.6s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
  70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* coin logo */
.coin-logo { border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #F2F3F5; display: inline-flex; align-items: center; justify-content: center; }
.coin-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-fallback { border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; }
/* 股票品牌 logo：白底圆形容器，logo 内缩留白 */
.stock-logo { border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #fff; border: 1px solid #EFEFEF; display: inline-flex; align-items: center; justify-content: center; }
.stock-logo img { width: 78%; height: 78%; object-fit: contain; display: block; }
.stock-logo .cl-fallback { width: 100% !important; height: 100% !important; border-radius: 50%; }

/* kline */
.kline-wrap { margin-top: 8px; }
.k-iv { transition: all .12s; cursor: pointer; user-select: none; }
#kcanvas { width: 100%; }

/* 数据总览 */
.shadow-card { box-shadow: 0 1px 8px rgba(0,0,0,.05); border: 1px solid #F0F1F3; }
.alt-track { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg,#F5872E,#FFC500,#4A90E2); }
.alt-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 3px; background: transparent; }
.alt-knob { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #1A1A1A; transform: translate(-50%,-50%); }
.grow-bar { flex: 2; height: 8px; border-radius: 4px; background: #FF3168; overflow: hidden; }
.grow-up { height: 100%; background: #14C2C2; border-radius: 4px 0 0 4px; }
.sector-card { background: #F8F9FA; border-radius: 12px; padding: 10px 10px; }

/* price flash on update */
.flash-up { animation: flashUp .6s ease; }
.flash-down { animation: flashDown .6s ease; }
@keyframes flashUp { 0% { background: rgba(16,185,129,.18);} 100% { background: transparent;} }
@keyframes flashDown { 0% { background: rgba(239,68,68,.18);} 100% { background: transparent;} }
