/* v3：左侧导航 + 页面标题栏（与参考站区分），新手教程与名词解释 */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidenav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; border-right: 1px solid var(--line); background: #050505; z-index: 20; }
.sidenav .brand { padding: 4px 8px 18px; gap: 10px; align-items: center; }
.sidenav .brand img { width: 34px; height: 34px; border-radius: 9px; }
.sidenav .brand b { display: block; font-size: 15px; }
.sidenav .brand small { display: block; font-size: 11px; line-height: 1.4; white-space: normal; }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--muted); transition: background .2s, color .2s; }
.snav a svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.snav a span { display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.snav a em { font-style: normal; font-size: 11px; color: var(--dim); margin-top: 2px; }
.snav a:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.snav a.on { color: var(--text); background: var(--panel2); font-weight: 600; }
.snav a.on::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acc); }
.snav a.on em { color: var(--muted); font-weight: 400; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.side-btn { display: flex; align-items: center; gap: 8px; justify-content: flex-start; width: 100%; color: var(--muted); border-color: var(--line); }
.side-btn:hover { color: var(--text); }
.side-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.side-status { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.side-status .pill { justify-content: flex-start; background: transparent; border-color: var(--line); color: var(--muted); }
.maincol { min-width: 0; }
.pagebar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 16px; padding: 18px 28px 14px; background: rgba(0, 0, 0, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.pagebar h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.pagebar p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.pb-r { margin-left: auto; display: flex; gap: 8px; }
main { padding: 22px 28px 110px; max-width: 1360px; margin: 0; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidenav { height: auto; flex-direction: row; align-items: center; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); gap: 8px; }
  .sidenav .brand { padding: 0; }
  .sidenav .brand div { display: none; }
  .snav { flex-direction: row; overflow-x: auto; scrollbar-width: none; flex: 1; }
  .snav a { padding: 7px 10px; gap: 6px; white-space: nowrap; }
  .snav a em, .snav a svg { display: none; }
  .snav a.on::before { left: 10px; right: 10px; top: auto; bottom: 0; width: auto; height: 2px; border-radius: 2px; }
  .side-foot { display: none; }
  .pagebar { position: static; padding: 14px 16px 10px; }
  .pagebar p { font-size: 12px; }
  main { padding: 16px 16px 110px; }
}

/* 教程按钮 */
.help-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: 12px; font-weight: 500; border-radius: 999px; background: transparent; border: 1px solid var(--line2); color: var(--muted); }
.help-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.help-btn:hover { color: var(--acc); border-color: var(--acc); }
.help-btn.big { padding: 7px 14px; font-size: 13px; }
.card h3 .r { display: inline-flex; align-items: center; gap: 8px; }

/* 名词下划线与气泡 */
.term { display: inline; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; border-bottom: 1px dashed rgba(227, 178, 91, .65); cursor: help; }
.term:hover { color: var(--acc); }
.gloss-pop { position: fixed; z-index: 95; background: #141414; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .18s, transform .18s, visibility .18s; font-size: 13px; }
.gloss-pop.on { opacity: 1; visibility: visible; transform: none; }
.gloss-pop b { color: var(--acc); }
.gloss-pop p { margin: 6px 0 8px; line-height: 1.65; color: #ddd; }
.gloss-pop a { font-size: 12px; color: var(--muted); }
.gloss-pop a:hover { color: var(--text); }

/* 教程弹窗 */
.help-modal { z-index: 80; }
.help-box { position: relative; width: 600px; max-height: 86vh; overflow-y: auto; }
.help-box .x { position: absolute; right: 14px; top: 12px; background: none; border: 0; color: var(--muted); font-size: 16px; }
.help-tag { display: inline-block; font-size: 11px; color: var(--acc); border: 1px solid rgba(227, 178, 91, .4); border-radius: 6px; padding: 1px 8px; margin-bottom: 8px; }
.help-box h2 { margin: 0 0 6px; font-size: 20px; }
.help-what { color: #ddd; margin: 0 0 6px; }
.help-box h4 { margin: 18px 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.help-box ol { margin: 0; padding-left: 20px; }
.help-box ol li { margin-bottom: 6px; line-height: 1.65; }
.help-box ul.tips { margin: 0; padding: 10px 14px 10px 30px; background: rgba(227, 178, 91, .06); border: 1px solid rgba(227, 178, 91, .2); border-radius: 10px; }
.help-box dl { margin: 0; }
.help-box dt { font-weight: 600; margin-top: 10px; color: var(--acc); }
.help-box dd { margin: 2px 0 0; color: #ccc; line-height: 1.65; font-size: 13px; }
.gl-list dt { margin-top: 12px; }

/* 新手三步 */
.starter { border-color: rgba(227, 178, 91, .25); background: linear-gradient(180deg, rgba(227, 178, 91, .05), transparent 60%), var(--panel); }
.steps-bar { height: 4px; background: var(--panel3); border-radius: 2px; overflow: hidden; margin-bottom: 14px; }
.steps-bar i { display: block; height: 100%; background: var(--acc); transition: width .5s var(--ease); }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1100px) { .steps-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps-grid { grid-template-columns: 1fr; } }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 4px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .3); }
.step .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--panel3); font-size: 12px; font-weight: 700; }
.step.ok .num { background: var(--acc); color: #000; }
.step b { display: block; font-size: 14px; }
.step span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.step button { grid-column: 2; justify-self: start; margin-top: 6px; }
.step.ok b { color: var(--muted); }

/* 首页：快捷入口改为横向图标 + 文字，放在速览下方 */
.quick .act { display: flex; align-items: center; gap: 14px; min-height: 0; padding: 16px 18px; }
.quick .act .ic { margin: 0; flex-shrink: 0; }
.quick .act b { font-size: 15px; margin-bottom: 2px; }
.hero { margin: 0 0 18px; }
.hero h1 { font-size: 22px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.flow > span { padding: 3px 10px; border: 1px solid var(--line2); border-radius: 999px; background: var(--panel2); }
.flow i { font-style: normal; color: var(--dim); }
.chips-q { margin-top: 10px; gap: 6px; }

/* 欢迎弹窗 */
.welcome { width: 520px; }
.welcome img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.welcome h2 { margin: 12px 0 4px; font-size: 20px; }
.wlist { margin: 14px 0; padding: 14px; background: var(--panel2); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.wlist div { display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
.wlist svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: var(--acc); stroke-width: 1.7; }
.wlist u { text-decoration: none; border-bottom: 1px dashed var(--acc); }

/* AI 悬浮按钮：头像 + 文字胶囊 */
.ai-fab { width: auto; height: 52px; padding: 4px 18px 4px 4px; border-radius: 999px; display: flex; align-items: center; gap: 10px; background: #fff; color: #000; font-weight: 600; border: 0; }
.ai-fab img { width: 44px; height: 44px; border-radius: 50%; }
.ai-fab span { font-size: 14px; }
@media (max-width: 600px) { .ai-fab { padding: 4px; } .ai-fab span { display: none; } }
.drawer header #drNew { margin-left: auto; }
.drawer header #drClose { margin-left: 0; }

/* 后台：区块标题栏同样带教程按钮 */
.adm .card h3 { flex-wrap: wrap; }

/* 访问密码页 / 后台登录 */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: #000; z-index: 90; padding: 16px; }
.login .box { width: 350px; max-width: 100%; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 28px; text-align: center; }
.login img { width: 70px; height: 70px; border-radius: 14px; object-fit: cover; margin-bottom: 14px; }
.login h2 { margin: 0 0 6px; font-size: 18px; }
.login input, .login button { width: 100%; margin-top: 12px; padding: 11px 12px; }

/* 页面内加载动画（个股分析、AI 深度研究） */
.ld-card { min-height: 360px; display: grid; place-items: center; }
.ld { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 10px; }
.ld-logo { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; animation: pulse 1.4s var(--ease) infinite; position: relative; z-index: 1; }
.ld-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ld-ring { position: absolute; top: 18px; width: 88px; height: 88px; border-radius: 50%; border: 2px solid var(--panel3); border-top-color: var(--acc); animation: spin 1s linear infinite; }
.ld-title { margin-top: 26px; font-size: 16px; }
.ld-sub { margin-top: 6px; color: var(--muted); font-size: 13px; min-height: 20px; transition: opacity .3s; }
.ld-bar { width: 220px; height: 3px; background: var(--panel3); border-radius: 2px; overflow: hidden; margin-top: 16px; }
.ld-bar i { display: block; width: 40%; height: 100%; background: var(--acc); border-radius: 2px; animation: ldslide 1.4s ease-in-out infinite; }
@keyframes ldslide { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
.research-box { position: relative; width: 680px; max-height: 86vh; overflow-y: auto; }
.research-box .x { position: absolute; right: 14px; top: 12px; background: none; border: 0; color: var(--muted); font-size: 16px; z-index: 2; }
.center { text-align: center; }

/* ===== 交互动画 ===== */
button, .btn, .snav a, .seg button, .tag, .help-btn, .li, tr.click td, .card.click { transition: transform .18s var(--ease), background-color .2s, border-color .2s, color .2s, box-shadow .25s, opacity .2s; }
button:not(:disabled):active, .snav a:active, .act:active { transform: scale(.96); }
button.pri:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 255, 255, .12); }
.card.click:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .45); border-color: #3a3a3a; }
.li:hover { transform: translateX(2px); }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .16; transform: scale(0); animation: ripple .6s var(--ease) forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.seg button.on { box-shadow: 0 2px 10px rgba(255, 255, 255, .12); }
.snav a svg { transition: transform .25s var(--ease); }
.snav a:hover svg { transform: scale(1.12); }
.ai-fab:hover img { transform: rotate(-8deg); } .ai-fab img { transition: transform .3s var(--ease); }
.help-btn:hover svg { transform: rotate(-12deg); } .help-btn svg { transition: transform .25s var(--ease); }
.modal-mask { transition: opacity .25s; }
.modal-mask.on .modal { animation: modalIn .35s var(--ease); }
@keyframes modalIn { 0% { opacity: 0; transform: translateY(14px) scale(.97); } }
.gloss-pop.on { transition: opacity .2s, transform .25s var(--ease); }
.bar > i, .meter i, .steps-bar i { transition: width .9s var(--ease); }
/* 切换页面时卡片依次入场（只在换页时触发） */
.page.entering .card, .page.entering .hero, .page.entering .kpi { animation: cardIn .5s var(--ease) both; }
.page.entering > :nth-child(1), .page.entering .g2 > :nth-child(1), .page.entering .g3 > :nth-child(1) { animation-delay: .02s; }
.page.entering > :nth-child(2), .page.entering .g2 > :nth-child(2), .page.entering .g3 > :nth-child(2) { animation-delay: .07s; }
.page.entering > :nth-child(3), .page.entering .g3 > :nth-child(3) { animation-delay: .12s; }
.page.entering > :nth-child(4) { animation-delay: .16s; }
.page.entering > :nth-child(n+5) { animation-delay: .2s; }
@keyframes cardIn { 0% { opacity: 0; transform: translateY(14px); } }
.page.on { animation: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* 名词解释：单个名词不出现输入框；名词大全的搜索栏带放大镜，明确是「搜索」 */
.gl-one { font-size: 15px; line-height: 1.8; color: #e6e6e6; margin: 4px 0 0; }
.gl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gl-search { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; padding: 0 12px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); }
.gl-search svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex-shrink: 0; }
.gl-search input { flex: 1; border: 0; background: transparent; padding: 9px 0; }
.gl-search input:focus { border: 0; }
.gl-search:focus-within { border-color: #555; }
