:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1f232c;
  --line: #2a2f3a;
  --text: #e6e8ee;
  --muted: #8a93a6;
  --accent: #d4a64a;
  --accent-hi: #f4c969;
  --ok: #2fbf71;
  --err: #ff5c6c;
  --vip: linear-gradient(135deg,#d4a64a,#f4c969);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1000px 600px at 20% -10%, #1c2030 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 13px; }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.brand {
  font-weight: 700; font-size: 18px; color: var(--accent-hi);
  letter-spacing: 1px;
}
.top-right { display: flex; align-items: center; gap: 14px; }
.top-right a { color: var(--text); }

.badge {
  font-size: 11px; padding: 3px 8px; border-radius: 10px;
  letter-spacing: 1px; font-weight: 700;
}
.badge-vip { background: var(--vip); color: #2b1f00; }
.badge-normal { background: #2a2f3a; color: var(--muted); }

.container { max-width: 980px; margin: 40px auto; padding: 0 24px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 22px;
  max-width: 460px;
  margin-left: auto; margin-right: auto;
}
.card h1 { margin-top: 0; font-size: 22px; }
.card h2 { font-size: 16px; margin-top: 0; color: var(--accent-hi); }

form label {
  display: block; margin: 14px 0 6px;
  font-size: 13px; color: var(--muted);
}
form input {
  width: 100%; padding: 11px 13px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text); font-size: 14px;
  outline: none; transition: border-color .15s;
}
form input:focus { border-color: var(--accent); }
form button {
  margin-top: 18px; width: 100%; padding: 12px;
  background: var(--accent); color: #1a1300; border: 0;
  border-radius: 8px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
form button:hover { background: var(--accent-hi); }

.flash {
  padding: 11px 14px; border-radius: 8px; margin: 0 auto 16px;
  max-width: 460px; font-size: 13px;
}
.flash-err { background: rgba(255,92,108,.12); border: 1px solid rgba(255,92,108,.4); color: #ffb3bb; }
.flash-ok  { background: rgba(47,191,113,.12); border: 1px solid rgba(47,191,113,.4); color: #b6f0cf; }
.notice {
  font-size: 12px; color: var(--muted); margin-top: 14px;
  padding: 10px 12px; background: rgba(255,255,255,.03);
  border-left: 3px solid var(--accent); border-radius: 4px;
}

.hero { text-align: center; padding: 30px 10px 10px; }
.hero h1 { font-size: 28px; margin-bottom: 10px; }
.lede { color: var(--muted); font-size: 15px; }
.gold { color: var(--accent-hi); }

.mt4-box {
  display: inline-block; margin-top: 22px;
  padding: 14px 28px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(212,166,74,.15), rgba(244,201,105,.08));
  border: 1px solid rgba(212,166,74,.35);
}
.mt4-box .muted { font-size: 12px; letter-spacing: 2px; }
.mt4-num {
  font-size: 26px; font-weight: 700; letter-spacing: 2px;
  color: var(--accent-hi); font-family: "SF Mono", Menlo, monospace;
  margin-top: 4px;
}

.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 16px; margin-top: 30px;
}
.tile {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 22px; transition: transform .15s, border-color .15s;
}
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile h3 { margin: 0 0 8px; font-size: 15px; }

.info { list-style: none; padding: 0; margin: 0; }
.info li {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.info li:last-child { border-bottom: 0; }
.info span { color: var(--muted); font-size: 13px; }
.info b { font-size: 14px; }

/* ===== 聚贤量化助理 浮动聊天窗 ===== */
#ja-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 9000;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 30px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hi));
  color: #1a1305; font-weight: 600; font-size: 14px;
  cursor: pointer; user-select: none;
  box-shadow: 0 8px 24px rgba(212, 166, 74, 0.35), 0 2px 6px rgba(0,0,0,0.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
#ja-launcher:hover { transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(212, 166, 74, 0.45), 0 3px 8px rgba(0,0,0,0.35); }
.ja-launcher-icon { font-size: 18px; }

#ja-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 9001;
  width: 380px; max-width: calc(100vw - 30px);
  height: 560px; max-height: calc(100vh - 60px);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
  transform-origin: bottom right;
  transition: transform .2s ease, opacity .2s ease;
}
#ja-panel.ja-collapsed {
  transform: scale(0.6) translateY(40px); opacity: 0; pointer-events: none;
}

.ja-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.ja-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ja-title strong { color: var(--text); font-size: 14px; }
.ja-sub { color: var(--muted); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-dot { width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted); flex-shrink: 0; }
.ja-dot-ok  { background: var(--ok);  box-shadow: 0 0 6px var(--ok); }
.ja-dot-bad { background: #c84747; }

.ja-actions { display: flex; gap: 4px; }
.ja-btn-icon {
  background: transparent; border: 0; color: var(--muted);
  width: 26px; height: 26px; border-radius: 6px;
  font-size: 16px; cursor: pointer; line-height: 1;
}
.ja-btn-icon:hover { background: var(--line); color: var(--text); }

.ja-body {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.ja-body::-webkit-scrollbar { width: 6px; }
.ja-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.ja-msg {
  max-width: 85%; padding: 9px 12px; border-radius: 12px;
  font-size: 14px; line-height: 1.55; word-wrap: break-word;
}
.ja-msg-bot {
  align-self: flex-start; background: var(--panel-2);
  color: var(--text); border-top-left-radius: 4px;
}
.ja-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-hi));
  color: #1a1305; border-top-right-radius: 4px;
}
.ja-msg.ja-streaming::after {
  content: '▋'; color: var(--accent-hi);
  animation: ja-blink 1s steps(1) infinite; margin-left: 2px;
}
@keyframes ja-blink { 50% { opacity: 0; } }
.ja-err { color: #ff8585; font-style: normal; }

.ja-input-wrap {
  display: flex; gap: 6px; padding: 10px;
  border-top: 1px solid var(--line); background: var(--panel-2);
}
#ja-input {
  flex: 1; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: 14px; line-height: 1.4;
  resize: none; outline: none; font-family: inherit;
  max-height: 140px;
}
#ja-input:focus { border-color: var(--accent); }
#ja-input:disabled { opacity: .5; }
#ja-send {
  background: linear-gradient(135deg, var(--accent), var(--accent-hi));
  color: #1a1305; border: 0; border-radius: 10px;
  width: 42px; font-size: 16px; cursor: pointer;
  font-weight: 600;
}
#ja-send:disabled { opacity: .5; cursor: wait; }

@media (max-width: 480px) {
  #ja-panel {
    right: 10px; left: 10px; bottom: 10px; width: auto;
    height: 75vh;
  }
  .ja-launcher-text { display: none; }
  #ja-launcher { padding: 12px; }
}

/* 思考过程折叠框 */
.ja-think {
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; margin-bottom: 6px;
  font-size: 12.5px; color: var(--muted);
}
.ja-think summary {
  cursor: pointer; user-select: none; color: var(--muted);
  list-style: none; padding: 2px 0;
}
.ja-think summary::-webkit-details-marker { display: none; }
.ja-think-body {
  margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line);
  white-space: pre-wrap; line-height: 1.5; max-height: 180px; overflow-y: auto;
}
.ja-final { color: var(--text); }
.ja-final:empty { display: none; }

/* 可点击磁贴 */
.tile-clickable { cursor: pointer; transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; position: relative; }
.tile-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(212, 166, 74, 0.18);
}
.tile-cta {
  display: inline-block; margin-top: 8px;
  font-size: 13px; color: var(--accent-hi); font-weight: 600;
}
