/* css/style.css — H5 自用看板 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: #0f0f10;
  color: #e8e8ea;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.page { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 64px; }

header.top {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,15,16,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between;
}
header.top h1 { margin: 0; font-size: 20px; font-weight: 600; }
header.top .meta { font-size: 11px; color: #888; }

.tabbar { display: flex; gap: 8px; }
.tabbar a {
  padding: 6px 14px; border-radius: 14px;
  font-size: 13px; color: #ccc; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.tabbar a.active { color: #fff; background: #ff5b5e; border-color: #ff5b5e; }

/* 全球市场 5 单元 */
.markets { padding: 12px 14px 6px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.market-cell {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 10px 4px 8px;
  text-align: center;
  font-size: 11px;
}
.market-cell .flag { font-size: 14px; line-height: 1; }
.market-cell .name { color: #aaa; margin-top: 4px; }
.market-cell .chg { font-size: 13px; font-weight: 600; margin-top: 4px; }
.market-cell .idx { font-size: 10px; color: #777; margin-top: 2px; }
.up { color: #ff5050; }
.down { color: #4cd964; }
.flat { color: #aaa; }

/* 全球主要指数 */
.section-title {
  padding: 14px 16px 6px;
  font-size: 13px; color: #888; font-weight: 500;
  display: flex; justify-content: space-between;
}
.idx-grid {
  padding: 4px 14px 14px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
}
.idx-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 10px 10px;
}
.idx-card .nm { font-size: 11px; color: #aaa; }
.idx-card .px { font-size: 18px; font-weight: 600; margin-top: 2px; }
.idx-card .ch { font-size: 11px; margin-top: 2px; }
.idx-card.empty .px { color: #555; }

/* 板块列表 */
.sector-list { padding: 0 14px; }
.sector-row {
  display: flex; align-items: center; padding: 12px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  margin-bottom: 8px;
  cursor: pointer;
}
.sector-row:hover { background: rgba(255,255,255,.06); }
.sector-row .icon { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.06); border-radius: 8px; font-size: 20px; margin-right: 12px; }
.sector-row .info { flex: 1; }
.sector-row .info .nm { font-size: 14px; font-weight: 500; }
.sector-row .info .desc { font-size: 11px; color: #777; margin-top: 3px; }
.sector-row .chg { font-size: 18px; font-weight: 600; min-width: 70px; text-align: right; }
.sector-row .pv { font-size: 11px; color: #777; text-align: right; min-width: 70px; }

/* 板块详情页 */
.detail-list { padding: 0 14px 30px; }
.stock-row {
  display: flex; align-items: center; padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.stock-row:last-child { border-bottom: none; }
.stock-row .nm-block { flex: 1; }
.stock-row .nm { font-size: 15px; font-weight: 500; }
.stock-row .cd { font-size: 11px; color: #777; margin-top: 3px; font-family: monospace; }
.stock-row .price-block { text-align: right; min-width: 100px; }
.stock-row .px { font-size: 17px; font-weight: 600; }
.stock-row .ch { font-size: 11px; margin-top: 3px; }

/* footer / loading */
.footer-tip { text-align: center; padding: 30px 0 40px; font-size: 11px; color: #666; }
.loading { text-align: center; padding: 30px; color: #888; }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 100%);
  background-size: 200% 100%;
  animation: skel 1.2s linear infinite;
  border-radius: 6px;
  color: transparent !important;
}
@keyframes skel { from { background-position: 0 0; } to { background-position: -200% 0; } }

.disclaimer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(15,15,16,.92); backdrop-filter: blur(10px);
  text-align: center; padding: 6px;
  font-size: 10px; color: #888;
  border-top: 1px solid rgba(255,255,255,.05);
  z-index: 99;
}