* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; background: #0f0f23; color: #d1d4dc; font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
#toolbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: #1a1a2e; border-bottom: 1px solid #2B2B43; flex-wrap: wrap;
}
#toolbar label { font-size: 13px; color: #888; }
#toolbar input {
  background: #0f0f23; border: 1px solid #2B2B43; color: #d1d4dc;
  padding: 5px 10px; border-radius: 4px; font-size: 14px; width: 120px;
}
#suggest-box {
  display: none; position: absolute; top: 100%; left: 90px; z-index: 100;
  background: #1a1a2e; border: 1px solid #2B2B43; border-radius: 4px;
  min-width: 260px; max-height: 300px; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
#suggest-box .item {
  padding: 8px 12px; cursor: pointer; display: flex; gap: 12px; font-size: 13px;
}
#suggest-box .item:hover, #suggest-box .item.active { background: #2962FF; }
#suggest-box .item .code { color: #d1d4dc; width: 60px; }
#suggest-box .item .name { color: #888; }
#toolbar input[type="date"] { width: 140px; }
#toolbar button {
  background: #2962FF; color: #fff; border: none; padding: 6px 18px;
  border-radius: 4px; font-size: 14px; cursor: pointer;
}
#toolbar button:hover { background: #1E53E0; }
#toolbar button:disabled { background: #333; cursor: not-allowed; }
#status { font-size: 13px; margin-left: auto; }
#status .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
#status .dot.live { background: #26a69a; animation: pulse 1.5s infinite; }
#status .dot.closed { background: #666; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
#chart { flex: 1; min-height: 0; }
body { display: flex; flex-direction: column; }
#info-bar {
  display: flex; gap: 20px; padding: 4px 16px; background: #1a1a2e;
  border-bottom: 1px solid #2B2B43; font-size: 12px; color: #888;
}
#info-bar span { color: #d1d4dc; }
#legend {
  position: absolute; top: 90px; left: 16px; z-index: 10;
  font-size: 11px; background: rgba(15,15,35,0.85); padding: 8px 12px;
  border-radius: 6px; border: 1px solid #2B2B43; line-height: 1.8;
}
#legend i { display: inline-block; width: 14px; height: 3px; margin-right: 4px; vertical-align: middle; }
#maToggle { cursor: pointer; margin-left: 12px; vertical-align: middle; opacity: 0.7; }
#maToggle:hover { opacity: 1; }
#maToggle svg { width: 16px; height: 16px; fill: none; stroke: #d1d4dc; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#maToggle.off svg .eye-open { display: none; }
#maToggle:not(.off) svg .eye-shut { display: none; }
.tag-binance { font-size: 10px; padding: 1px 4px; border-radius: 2px; background: #F0B90B22; color: #F0B90B; margin-left: 4px; }
#infoScore, #infoPosition, #infoAction { font-weight: 600; }
#colorSettingsToggle {
  position: absolute; top: 8px; right: 8px; z-index: 20;
  font-size: 18px; cursor: pointer; opacity: 0.5; transition: opacity 0.2s;
  user-select: none;
}
#colorSettingsToggle:hover { opacity: 1; }
#colorModal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 100; display: flex; align-items: center; justify-content: center; }
#colorModalOverlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
#colorModalCard {
  position: relative; z-index: 1; background: #1a1a2e; border: 1px solid #2B2B43;
  border-radius: 10px; padding: 20px 24px; min-width: 280px; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
#colorModalHeader {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 600; margin-bottom: 14px; color: #d1d4dc;
}
#colorModalClose { font-size: 20px; cursor: pointer; color: #888; line-height: 1; }
#colorModalClose:hover { color: #d1d4dc; }
.color-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.color-row label { font-size: 12px; color: #888; min-width: 56px; }
.color-inputs { display: flex; align-items: center; gap: 6px; }
.color-inputs input[type="color"] {
  width: 28px; height: 24px; border: 1px solid #2B2B43; border-radius: 4px;
  background: transparent; cursor: pointer; padding: 0;
}
.color-inputs input[type="text"] {
  width: 80px; height: 24px; border: 1px solid #2B2B43; border-radius: 4px;
  background: #0f0f23; color: #d1d4dc; font-size: 12px; font-family: monospace; padding: 3px 6px;
}
#colorModalBtns { display: flex; gap: 8px; margin-top: 14px; }
#colorModalBtns button {
  flex: 1; padding: 6px 0; border-radius: 4px; font-size: 12px; cursor: pointer;
}
#colorModalBtns button:first-child { border: none; background: #1E53E0; color: #fff; }
#colorModalBtns button:nth-child(2) { border: 1px solid #2B2B43; background: transparent; color: #888; }
#colorModalBtns button:last-child { border: 1px solid #2B2B43; background: transparent; color: #888; }
