* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f7f8fa;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", Arial;
  color: #1d2129;
}

.page {
  padding: 12px;
  padding-bottom: 80px;
}

/* 搜索 */
.search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e5e6eb;
  margin-bottom: 12px;
}

/* 股票卡片 */
.stock-item {
  background: #fff;
  border-radius: 10px;
  padding: 14px 12px;
  margin-bottom: 10px;
  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: #f53f3f; }
.down { color: #00b42a; }

/* 详情 */
.detail-header {
  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 {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  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;
}
