:root {
  --bg: #12110d;
  --panel: #1f1e1a;
  --panel2: #272621;
  --ink: #efeee8;
  --muted: #a19e93;
  --line: #343128;
  --soft: rgba(255,255,255,.06);
  --green: #52c39b;
  --red: #e56a5f;
  --gold: #d6b35c;
  --chart-bg: #070907;
  --shadow: 0 24px 90px rgba(0,0,0,.36);
}
:root[data-theme="light"] {
  --bg: #f6f6f4;
  --panel: #ffffff;
  --panel2: #f0f0ed;
  --ink: #242621;
  --muted: #777a72;
  --line: #deded8;
  --soft: rgba(0,0,0,.04);
  --chart-bg: #ffffff;
  --shadow: 0 2px 10px rgba(35,37,31,.10);
}
* { box-sizing: border-box; }
html { background: var(--bg); overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.brand-mark {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: #050504; color: white; border-radius: 3px; font-weight: 950; font-size: 11px;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 26px rgba(0,0,0,.28);
}
.brand-mark::before {
  content: ""; width: 16px; height: 16px; border: 4px solid #fff; border-right-color: transparent;
  border-radius: 50%; transform: rotate(-22deg);
}
.brand-mark::after {
  content: ""; position: absolute; right: 7px; bottom: 8px; width: 8px; height: 4px;
  border-radius: 999px; background: #fff;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 420px);
  align-items: center;
  gap: 6vw;
  padding: 28px 9vw;
}
.login-brand { position: fixed; left: 28px; top: 28px; display: flex; align-items: center; gap: 12px; font-weight: 900; }
.login-copy p {
  width: min(520px, 80vw);
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.15;
  font-weight: 850;
  font-style: italic;
}
.login-card { display: grid; gap: 14px; }
.login-card h1 { margin: 0; font-size: 28px; }
.login-card p { margin: -6px 0 10px; color: var(--muted); }
label span { display: block; color: var(--ink); font-size: 12px; font-weight: 800; margin-bottom: 7px; }
input, select, textarea {
  width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--panel); color: var(--ink); padding: 0 12px; outline: 0;
}
textarea { min-height: 108px; padding: 12px; resize: vertical; }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.social-button, .primary-button, .secondary-button, .tool-button {
  min-height: 42px; border-radius: 5px; border: 1px solid var(--line); font-weight: 850;
}
.primary-button { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.secondary-button, .tool-button, .social-button.ghost { background: var(--panel); color: var(--ink); }
.social-button { background: #030303; color: white; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.social-icon {
  width: 18px; height: 18px; display: inline-grid; place-items: center; flex: 0 0 auto;
  position: relative;
}
.apple-icon::before {
  content: ""; width: 14px; height: 14px; display: block; background: currentColor;
  border-radius: 47% 47% 54% 54%;
  transform: translateY(2px);
}
.apple-icon::after {
  content: ""; position: absolute; width: 7px; height: 4px; border-radius: 999px;
  background: currentColor; transform: translate(4px, -7px) rotate(-35deg);
}
.google-icon {
  border-radius: 50%;
  background: conic-gradient(#4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
  position: relative;
}
.google-icon::before {
  content: "G"; width: 12px; height: 12px; display: grid; place-items: center;
  border-radius: 50%; background: var(--panel); color: #4285f4; font-size: 10px; font-weight: 950;
}
.compact { min-height: 38px; padding: 0 16px; }
.login-card small { color: var(--muted); text-align: center; }
.login-card small button { border: 0; background: transparent; color: var(--gold); font-weight: 850; }
.theme-float {
  position: fixed; right: 28px; top: 28px; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--ink);
}
.theme-float svg, .square-button svg {
  width: 19px; height: 19px; fill: currentColor; stroke: currentColor; stroke-width: 1.8;
}
.shell { min-height: 100vh; display: grid; grid-template-columns: 54px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: grid; grid-template-rows: auto 1fr auto;
  border-right: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 82%, transparent); padding: 10px 6px;
}
.logo-button {
  width: 42px; height: 42px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink); font-weight: 900; margin-bottom: 10px;
}
.logo-button strong { display: none; }
.logo-button .brand-mark { width: 28px; height: 28px; }
.sidebar nav { display: grid; gap: 6px; align-content: start; }
.nav-item, .sidebar-foot button {
  width: 42px; min-height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 3px; padding: 0; background: transparent; color: var(--muted); font-weight: 800; text-align: center;
}
.nav-item.active, .nav-item:hover { background: var(--panel2); color: var(--ink); }
.nav-item span { width: 18px; text-align: center; }
.nav-item b { display: none; }
.sidebar-foot { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.sidebar-foot small { display: none; color: var(--muted); font-size: 11px; }
.workspace { min-width: 0; }
.topbar {
  height: 70px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px);
  padding: 0 20px;
}
.square-button {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--ink); font-weight: 900;
}
#mobile-menu { display: none; }
.search-box { position: relative; width: min(520px, 50vw); margin: 0 auto; }
.search-box span { position: absolute; left: 12px; top: 10px; color: var(--muted); }
.search-box input { padding-left: 36px; background: var(--panel); }
.search-results {
  position: absolute; left: 0; right: 0; top: 48px; z-index: 50; padding: 8px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow);
}
.search-results button {
  width: 100%; display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center;
  border: 0; background: transparent; color: var(--ink); padding: 8px; text-align: left;
}
.search-results button:hover { background: var(--soft); }
.search-results small { color: var(--muted); display: block; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.credit-pill {
  min-height: 38px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); border-radius: 4px; padding: 0 12px; font-weight: 900;
}
.view { display: none; padding: 26px 20px 96px; }
.view.active { display: block; }
.page-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.page-head h1, .plans-head h1 { margin: 0; font-size: clamp(28px, 4vw, 44px); }
.page-head p, .plans-head p { color: var(--muted); margin: 4px 0 0; }
.dashboard-grid {
  display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 12px; max-width: 1180px;
}
.market-tile {
  height: 218px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 2px;
  padding: 14px; text-align: left; display: grid; grid-template-rows: auto auto 1fr; align-content: start; overflow: hidden;
}
.market-tile div { display: flex; align-items: center; gap: 8px; }
.market-tile em { margin-left: auto; color: var(--red); background: rgba(229,106,95,.10); font-size: 11px; padding: 4px 6px; font-style: normal; border-radius: 2px; font-weight: 900; }
.market-tile em.up { color: #28a376; background: rgba(67,214,163,.12); }
.market-tile b { margin-top: 6px; font-size: 18px; }
.market-tile canvas { width: 100%; height: 118px; margin-top: 8px; align-self: end; }
.asset-icon {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--soft); flex: 0 0 auto;
}
.asset-icon svg { width: 100%; height: 100%; display: block; }
.asset-icon.large { width: 38px; height: 38px; }
.analysis-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
.market-card, .copilot-panel, .settings-grid article, .locked-card, .pricing-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow);
}
.market-card { padding: 0; background: transparent; border: 0; box-shadow: none; }
.asset-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.asset-title-line { display: flex; align-items: center; gap: 10px; }
.asset-head h2 { margin: 0; font-size: 19px; }
.asset-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.price-box { text-align: right; }
.price-box strong { display: block; font-size: 24px; }
.price-box span { color: var(--green); font-weight: 900; font-size: 13px; }
.price-box span.down, .down { color: var(--red); }
.up { color: var(--green); }
.warning-strip {
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line)); color: var(--gold);
  background: color-mix(in srgb, var(--gold) 10%, transparent); padding: 9px 12px; border-radius: 3px; font-size: 12px; font-weight: 850; margin-bottom: 10px;
}
.chart-controls { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.chart-controls select { width: 82px; }
.tool-button { min-width: 42px; padding: 0 14px; background: var(--panel); color: var(--ink); }
.primary-tool { background: var(--ink); color: var(--bg); }
.chart-wrap {
  height: min(63vh, 620px); min-height: 440px; position: relative; overflow: hidden;
  border: 1px solid var(--line); background: var(--chart-bg); border-radius: 2px;
}
#kline-chart { width: 100%; height: 100%; display: block; }
.chart-loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.46); color: white; font-weight: 900; }
.chart-tooltip { position: absolute; background: rgba(0,0,0,.86); color: white; padding: 8px; font-size: 11px; border-radius: 4px; pointer-events: none; }
.logic-panel { margin-top: 12px; display: grid; gap: 12px; }
.logic-panel > div:first-child { border: 1px solid var(--line); padding: 14px; background: var(--panel); }
.logic-panel span, .signal-grid span, .copilot-stats span, .history-stats span { color: var(--muted); font-size: 12px; font-weight: 850; }
.logic-panel strong { display: block; margin-top: 6px; font-size: 28px; }
.logic-panel strong.long { color: var(--green); }
.logic-panel strong.short { color: var(--red); }
.logic-panel strong.neutral { color: var(--gold); }
.logic-panel p { color: var(--muted); margin: 8px 0 0; }
.rr-control { display: grid; gap: 8px; }
.rr-control input { padding: 0; min-height: 20px; }
.signal-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.signal-grid div, .history-stats div {
  border: 1px solid var(--line); background: var(--panel); padding: 12px; min-height: 62px;
}
.signal-grid strong, .history-stats strong { display: block; margin-top: 6px; font-size: 16px; }
.copilot-panel { min-height: 620px; display: grid; grid-template-rows: auto auto auto auto 1fr auto; overflow: hidden; }
.copilot-head, .copilot-ticker, .copilot-input { padding: 12px; border-bottom: 1px solid var(--line); }
.copilot-head { display: flex; justify-content: space-between; align-items: center; }
.copilot-head button { border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.copilot-ticker { color: var(--muted); font-size: 12px; background: color-mix(in srgb, var(--green) 10%, transparent); display: flex; align-items: center; gap: 6px; }
.copilot-ticker > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.copilot-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.copilot-stats div { padding: 10px; border-right: 1px solid var(--line); }
.copilot-alert { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.copilot-alert span { color: var(--muted); font-weight: 850; }
.copilot-alert b { justify-self: start; padding: 2px 7px; border-radius: 2px; background: rgba(229,106,95,.12); color: var(--red); }
.copilot-alert b.long { background: rgba(67,214,163,.12); color: var(--green); }
.copilot-alert b.neutral { background: rgba(214,179,92,.14); color: var(--gold); }
.copilot-alert button { border: 0; background: transparent; color: var(--muted); font-weight: 850; }
.copilot-feed { padding: 16px; }
.copilot-feed p { display: flex; gap: 8px; color: var(--ink); }
.copilot-feed span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 6px; }
.report-card { padding: 12px; overflow: auto; }
.report-card pre { white-space: pre-wrap; line-height: 1.65; font-size: 12px; }
.copilot-input { display: grid; grid-template-columns: 34px 1fr 38px; gap: 8px; }
.copilot-input button { border: 1px solid var(--line); background: var(--panel2); color: var(--ink); border-radius: 4px; }
.plans-head { text-align: center; margin: 0 auto 24px; }
.plans-head div { margin: 22px auto 0; display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.plans-head button { min-width: 130px; height: 38px; border: 0; background: transparent; color: var(--muted); }
.plans-head button.active { background: var(--panel2); color: var(--ink); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 18px; max-width: 1120px; margin: 0 auto; }
.pricing-card { padding: 28px; display: grid; gap: 14px; position: relative; }
.pricing-card.featured { border-color: color-mix(in srgb, var(--green) 48%, var(--line)); box-shadow: 0 24px 90px rgba(82,195,155,.12); }
.pricing-card.featured::after {
  content: "最受欢迎"; position: absolute; top: 26px; right: 22px; color: var(--green);
  background: color-mix(in srgb, var(--green) 14%, transparent); padding: 4px 8px; border-radius: 3px;
  font-size: 11px; font-weight: 900;
}
.pricing-card h3 { margin: 0; font-size: 22px; }
.pricing-card p { color: var(--muted); min-height: 44px; }
.pricing-card strong { font-size: 38px; font-weight: 650; }
.pricing-card span { color: var(--muted); }
.pricing-card ul { margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; color: var(--muted); list-style: none; }
.pricing-card li::before { content: "✓"; color: var(--green); margin-right: 8px; font-weight: 950; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 980px; }
.settings-grid article { padding: 18px; }
.settings-grid h3 { margin: 8px 0; }
.settings-grid p { color: var(--muted); }
.settings-form { display: grid; gap: 14px; max-width: 480px; margin-top: 24px; }
.check-row { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.check-row input { width: 24px; min-height: 24px; }
.locked-card { width: min(640px, 100%); margin: 90px auto; padding: 38px; text-align: center; }
.locked-card div { width: 56px; height: 56px; margin: 30px auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--panel2); }
.empty-state { padding: 40px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.history-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.onboarding-dialog, .pay-dialog {
  width: min(560px, calc(100vw - 24px)); border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); padding: 22px;
}
.onboarding-dialog::backdrop, .pay-dialog::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(8px); }
.dialog-close { position: absolute; right: 18px; top: 14px; border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.onboarding-dialog h2, .onboarding-dialog p { text-align: center; }
.onboarding-dialog p { color: var(--muted); }
.onboarding-art { height: 220px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.fake-shot { width: 76%; height: 72%; background: #050704; position: relative; border: 1px solid #343128; }
.fake-shot span, .fake-shot i, .fake-shot b, .fake-shot em { position: absolute; display: block; }
.fake-shot span { left: 20px; right: 20px; top: 48%; height: 2px; background: #43d6a3; }
.fake-shot i { left: 30%; top: 28%; width: 44%; height: 2px; background: #b8ff2d; transform: rotate(28deg); }
.fake-shot b { left: 36%; top: 36%; width: 42%; height: 2px; background: #f0a43c; transform: rotate(-50deg); }
.fake-shot em { left: 72%; top: 46%; width: 72px; height: 34px; background: rgba(229,106,95,.28); }
.onboarding-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.onboarding-controls button { min-height: 38px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); border-radius: 7px; padding: 0 14px; }
.pay-head { display: flex; justify-content: space-between; align-items: start; }
.pay-head button { border: 0; background: var(--panel2); color: var(--ink); padding: 8px 10px; }
.plan-list { display: grid; gap: 8px; margin: 14px 0; }
.plan-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); padding: 12px; text-align: left; border-radius: 6px; }
.plan-item.active { border-color: var(--green); }
.plan-item small { color: var(--muted); display: block; margin-top: 4px; }
.plan-item em { font-style: normal; color: var(--gold); display: block; text-align: right; font-size: 11px; }
.wallet-card { padding: 12px; border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line)); background: color-mix(in srgb, var(--gold) 8%, transparent); border-radius: 6px; }
.tron-badge { color: var(--green); font-weight: 900; margin-bottom: 8px; }
#receiver-address { text-align: left; overflow: hidden; text-overflow: ellipsis; }
.tx-field { display: block; margin-top: 12px; }
#pay-message { min-height: 18px; color: var(--muted); }
.mobile-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; grid-template-columns: repeat(4, 1fr);
  height: 66px; background: var(--panel); border-top: 1px solid var(--line);
}
.mobile-nav button { border: 0; background: transparent; color: var(--muted); font-weight: 900; }
.mobile-nav button.active { color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 86px; transform: translate(-50%, 12px); background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 10px 12px; opacity: 0; transition: .18s; z-index: 90; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1100px) {
  .analysis-grid { grid-template-columns: 1fr; }
  .copilot-panel { min-height: auto; }
  .dashboard-grid, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { padding-bottom: 70px; }
  .login-screen { grid-template-columns: 1fr; padding: 90px 22px 32px; }
  .login-copy p { font-size: 40px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  #mobile-menu { display: block; }
  .topbar { height: 72px; padding: 0 10px; }
  .search-box { width: 100%; }
  .credit-pill span { display: none; }
  .view { padding: 18px 10px 84px; }
  .dashboard-grid, .pricing-grid, .settings-grid, .history-stats { grid-template-columns: 1fr; }
  .analysis-grid { gap: 12px; }
  .chart-wrap { min-height: 390px; height: 52vh; }
  .signal-grid, .copilot-stats { grid-template-columns: repeat(2, 1fr); }
  .copilot-panel { display: none; }
  .copilot-panel.open { display: grid; }
  .mobile-nav { display: grid; }
}
