/* 主区、历史 pane、欢迎页和纯 CSS 图标。从 A2_styles.css 拆出来, 页面按顺序加载。 */

/* ---------------- 主区 ---------------- */

#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/**
 主区一次只显示一轮。当前这一轮在「当前」, 旧的都在「历史」——
 一直往下堆的话, 图会被挤到看不见, 每次还要滚半天才找到最新那张。
 */
#main-tabs {
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}
#main-tabs button {
  font: inherit;
  font-size: 13px;
  font-weight: 520;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px 8px;
  cursor: pointer;
  transition: color 0.14s, border-color 0.14s;
}
#main-tabs button:hover { color: var(--text-primary); }
#main-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.pane-note { margin-left: auto; font-size: 11.5px; color: var(--text-muted); }

/* 历史 pane */

#history-pane { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }

.hist-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.hist-body { flex: 1; min-width: 0; }
.hist-q { font-size: 14px; font-weight: 560; }
.hist-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.hist-a {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.empty.wide { max-width: 460px; margin: 40px auto; }
#canvas { flex: 1; overflow-y: auto; padding: 30px 32px 52px; scroll-behavior: smooth; }

/* 欢迎页 */

.welcome { max-width: 660px; margin: 9vh auto 0; text-align: center; }

.welcome-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 13px;
  margin-bottom: 18px;
}

.welcome h1 {
  font-size: 34px;
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 10px;
}
.grad {
  background: linear-gradient(96deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.welcome-sub { color: var(--text-secondary); margin: 0 0 26px; font-size: 14.5px; }

.starters { display: grid; gap: 9px; text-align: left; }

.starter {
  display: flex;
  align-items: center;
  gap: 13px;
  font: inherit;
  width: 100%;
  padding: 13px 15px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.starter:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.starter-icon {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 9px;
  position: relative;
  background: var(--accent-soft);
}
.starter-icon::before,
.starter-icon::after { content: ""; position: absolute; }

/* 三个图标都用纯 CSS 画, 不引外部资源 */
.icon-rank::before {
  left: 9px; bottom: 9px; width: 4px; height: 8px;
  background: var(--accent); border-radius: 1px;
  box-shadow: 6px 0 0 -0px var(--accent-2), 12px 0 0 0 var(--warm);
}
.icon-rank::after {
  left: 15px; bottom: 9px; width: 4px; height: 13px;
  background: var(--accent-2); border-radius: 1px;
}
.icon-trend::before {
  left: 8px; bottom: 11px; width: 18px; height: 9px;
  border-left: 2px solid transparent;
  border-bottom: 2px solid var(--accent);
  transform: skewY(-24deg);
}
.icon-trend::after {
  right: 8px; top: 9px; width: 6px; height: 6px;
  background: var(--accent-2); border-radius: 50%;
}
.icon-alert { background: rgba(237, 161, 0, 0.14); }
.icon-alert::before {
  left: 15px; top: 9px; width: 3px; height: 9px;
  background: var(--warm); border-radius: 2px;
}
.icon-alert::after {
  left: 15px; bottom: 8px; width: 3px; height: 3px;
  background: var(--warm); border-radius: 50%;
}

.starter-body { display: flex; flex-direction: column; min-width: 0; }
.starter-title { font-size: 13px; font-weight: 600; }
.starter-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.welcome-foot { margin-top: 22px; font-size: 12.5px; color: var(--text-muted); }
.link {
  font: inherit;
  font-size: 12.5px;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
