/* A股智选 —— 深色主题，红涨绿跌（A股惯例） */
:root {
  --bg: #0f1420;
  --card: #1a2130;
  --card2: #202940;
  --line: #2a3348;
  --text: #e8ecf5;
  --text2: #8b96ad;
  --up: #ef5350;    /* 红涨 */
  --down: #26c281;  /* 绿跌 */
  --flat: #8b96ad;
  --accent: #4a8cff;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased;
}
button, input, select { font-family: inherit; }

/* 头部 */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: rgba(15,20,32,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 19px; font-weight: 700; }
.header-meta { display: flex; align-items: center; gap: 10px; }
.date-badge { font-size: 12px; color: var(--text2); }
.icon-btn {
  width: 32px; height: 32px; border-radius: 9px; background: var(--card2);
  color: var(--text); font-size: 16px; border: none; cursor: pointer;
}

/* 主区域 */
.app-main { max-width: 640px; margin: 0 auto; padding: 12px 12px 40px; display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--card); border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); }
.card-title { margin: 0 0 12px; font-size: 15px; font-weight: 600; }

/* 指数 */
.indices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.idx-item { background: var(--card2); border-radius: 12px; padding: 12px; }
.idx-name { font-size: 12px; color: var(--text2); }
.idx-price { font-size: 20px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.idx-change { font-size: 13px; font-variant-numeric: tabular-nums; }

/* 涨跌分布 */
.breadth { display: flex; flex-wrap: wrap; gap: 10px; }
.b-stat { flex: 1; min-width: 90px; background: var(--card2); border-radius: 12px; padding: 12px; text-align: center; }
.b-stat .num { font-size: 22px; font-weight: 700; }
.b-stat .label { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* 板块 */
.sector-list { display: flex; flex-direction: column; gap: 8px; }
.sector-item { display: flex; align-items: center; gap: 10px; }
.sector-name { flex: 0 0 84px; font-size: 14px; }
.sector-bar { flex: 1; height: 8px; background: var(--card2); border-radius: 4px; overflow: hidden; }
.sector-bar-fill { height: 100%; border-radius: 4px; }
.sector-pct { flex: 0 0 60px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }

/* 涨跌幅榜 / 选股结果 表格 */
.stock-table-wrap { overflow-x: auto; }
table.stock-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.stock-table th { color: var(--text2); font-weight: 500; text-align: right; padding: 8px 6px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.stock-table th:first-child, .stock-table td:first-child { text-align: left; }
.stock-table td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.stock-table td.name { text-align: left; }

/* 颜色 */
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }

/* 选股表单 */
.screen-group { margin-bottom: 12px; }
.group-label { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.field-row label { font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.field-row input, .field-row select {
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 9px; width: 84px; font-size: 13px;
}
.field-row input:focus, .field-row select:focus { outline: none; border-color: var(--accent); }
.btn-primary {
  background: var(--accent); color: #fff; border: none; border-radius: 9px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.screen-summary { font-size: 13px; color: var(--text2); margin-bottom: 10px; }
.screen-result { margin-top: 14px; }

/* 日报 */
.report-box { background: var(--card2); border-radius: 12px; padding: 14px; line-height: 1.7; font-size: 14px; white-space: pre-wrap; }
.report-empty { color: var(--text2); font-size: 13px; }

.movers-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.movers-tab {
  padding: 6px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text2); font-size: 13px; cursor: pointer;
}
.movers-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.empty { color: var(--text2); text-align: center; padding: 24px; font-size: 13px; }
