* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f7f8fa;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", Arial;
  color: #1d2129;
}
body::before {
  content: "";
  position: fixed;
  inset: -40px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 15% 10%, rgba(250, 140, 123, 0.416) 0%, transparent 29%), radial-gradient(ellipse at 75% 47%, rgba(191, 250, 123, 0.416) 0%, transparent 37%);;
  background: #f7f8fa;
  filter: blur(30px);
  opacity: 1;
  transform: translateZ(0);
}

.btn-box {
  display: flex;
  gap: 5px;
}
.hide-btn {
  display: none !important;
}

#banner {
  margin: 10px 0;
}
#banner img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.detail-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .1);
  color: #86909c;
  /* color: rgba(255, 255, 255, .9); */
}
.detail-mask div {
  display: flex;
  position: relative;
  top: 50vh;
  left: 50vw;
  transform: translate(-50%);
  justify-content: center;
  font-size: 21px;
}

.no-results-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.no-results-message strong {
  font-size: 18px;
} 
#addFavoriteBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 16px;
  padding: 10px;
}
#removeFavoriteBtn {
  background: #f04343;
}

.page {
  position: relative;
  padding: 12px;
  padding-bottom: 80px;
}

/* 搜索 */
.search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e5e6eb;
  margin-bottom: 7px;
}
/* 热门 */
.popular-box {
  margin-bottom: 5px;
  padding: 10px 0px;
  padding-left: 4px;
  display: flex;
  overflow: scroll;
}
.popular-item {
  margin-left: 2px;
  padding: 10px 15px;
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  background: #fff;
  text-wrap: nowrap;
  border-radius: 5px 0 0 5px;
}
.up-box { box-shadow: #00b42a -2px 0 0; }
.down-box { box-shadow: #f53f3f -2px 0 0; }
.popular-top {
  display: flex;
  align-items: center;
  gap: 5px;
}
.popular-top .popular-item-name {
  font-size: 15px;
}
.popular-top .popular-item-market {
  padding: 3px 2px;
  font-size: 10px;
  /* font-weight: bold; */
  /* background: #b ec2c6; */
  color: #9ca1a5;
  border: 1px solid #bec2c6;
  border-radius: 4px;
}
.popular-mid {}
.popular-mid .popular-item-code {
  display: flex;
  font-size: 11px;
  color: #86909c;
}
.popular-bot {
  margin-top: 5px;
}
.popular-bot .popular-item-change {
  display: flex;
  align-items: center;
  font-size: 14px;
}

/* 股票卡片 */
.stock-item {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 7px 7px 0 0;
  border-bottom: 3px solid #f7f8fa;
  padding: 14px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stock-item:active { background: #f2f3f5; }

.stock-name { font-size: 15px; font-weight: 500; }
.stock-code { font-size: 12px; color: #86909c; }

.stock-price { text-align: right; }
.stock-price .price { font-size: 18px; font-weight: 600; }
.stock-price .change { font-size: 13px; }

.up { color: #00b42a; }
.down { color: #f53f3f; }

/* metaDOM */
.stock-meta {
  margin-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.stock-meta-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 15px;
}
.stock-change {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.stock-meta-mid {}
.stock-meta-bot {
  color: #86909c;
  font-size: 12px;
}

/* priceDOM */
.price-box {
  padding: 5px 15px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}
.price-up { background: #00b42a; }
.price-down { background: #f53f3f; }

/* 详情 */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.detail-title { font-size: 16px; font-weight: 600; }
.detail-price { font-size: 28px; font-weight: 700; margin: 6px 0; }

/* 图表 */
.chart {
  width: 100%;
  height: 240px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
}

/* 底部按钮 */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 56px;
  padding: 10px 12px;
}
.btn {
  display: flex;
  width: 100%;
  height: 44px;
  border-radius: 4px;
  border: none;
  background: #1677ff;
  color: #fff;
  /* font-size: 16px; */
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 130px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  display: none;
}

/* Tab */
.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #e5e6eb;
  display: flex;
}
.tab-item {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #86909c;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tab-item.active { color: #1677ff; }
.tab-item .icon { font-size: 20px; }
.time-switch {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

.time-btn {
  background-color: #f0f1f6;
  border: none;
  padding: 8px 16px;
  margin: 0 8px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
}

.time-btn.active {
  background-color: #1677ff;
  color: #fff;
}
