:root {
  color-scheme: dark;
  --bg: #06070b;
  --bg-2: #0a0e16;
  --panel: rgba(14, 18, 28, 0.92);
  --panel-2: rgba(20, 25, 38, 0.86);
  --line: rgba(234, 188, 92, 0.18);
  --line-blue: rgba(74, 188, 255, 0.25);
  --gold: #f1c76b;
  --gold-2: #a9782c;
  --blue: #44b9ff;
  --cyan: #63f0e4;
  --red: #ff5f6f;
  --green: #48d597;
  --violet: #b88cff;
  --orange: #ffad4d;
  --text: #f5f0e5;
  --muted: #8f9aad;
  --soft: #c5d2e8;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.4);
  --radius: 8px;
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(68, 185, 255, 0.18), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(241, 199, 107, 0.13), transparent 24%),
    linear-gradient(135deg, #050609 0%, #090d14 42%, #0a111d 100%);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.ambient-line {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--blue), var(--cyan), transparent);
  box-shadow: 0 0 24px rgba(68, 185, 255, 0.55);
  z-index: 20;
  animation: pulseLine 4s ease-in-out infinite;
}

@keyframes pulseLine {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.app-shell {
  min-height: 100vh;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 12px;
}

.boot-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(12, 16, 25, 0.8);
  box-shadow: 0 0 40px rgba(241, 199, 107, 0.18);
  font-weight: 800;
}

.boot-screen h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.boot-screen p {
  margin: 0;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 19, 30, 0.94), rgba(10, 14, 22, 0.94));
  box-shadow: var(--shadow);
}

.panel-blue {
  border-color: var(--line-blue);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  white-space: nowrap;
}

.tag.gold {
  border-color: rgba(241, 199, 107, 0.35);
  color: var(--gold);
  background: rgba(241, 199, 107, 0.09);
}

.tag.blue {
  border-color: rgba(68, 185, 255, 0.32);
  color: var(--blue);
  background: rgba(68, 185, 255, 0.09);
}

.tag.red {
  border-color: rgba(255, 95, 111, 0.32);
  color: var(--red);
  background: rgba(255, 95, 111, 0.09);
}

.tag.green {
  border-color: rgba(72, 213, 151, 0.32);
  color: var(--green);
  background: rgba(72, 213, 151, 0.09);
}

.muted {
  color: var(--muted);
}

.num-up {
  color: var(--red);
}

.num-down {
  color: var(--green);
}

.num-flat {
  color: var(--soft);
}

.score {
  font-weight: 800;
  color: var(--gold);
}

.ghost-button {
  min-width: 34px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.ghost-button:hover,
.ghost-button.active {
  color: var(--gold);
  border-color: rgba(241, 199, 107, 0.42);
  background: rgba(241, 199, 107, 0.1);
}

.data-warn {
  color: var(--orange);
}

.canvas-wrap {
  position: relative;
  width: 100%;
  min-height: 300px;
  background: #000;
}

.chart-tooltip {
  position: absolute;
  z-index: 8;
  display: none;
  min-width: 176px;
  max-width: 240px;
  padding: 9px 10px;
  border: 1px solid #d00000;
  border-radius: 2px;
  color: #f2f2f2;
  background: rgba(0, 0, 0, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  font-size: 12px;
  line-height: 1.35;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 7px;
  color: #ffff00;
  font-size: 13px;
}

.chart-tooltip.pinned {
  border-color: #ffff00;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 0, 0.25);
}

.chart-tooltip.pinned::after {
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 0, 0.55);
  border-radius: 2px;
  color: #ffff00;
  background: rgba(0, 0, 0, 0.9);
  content: "已锁定";
  font-size: 10px;
  line-height: 1.35;
}

.chart-tooltip dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  margin: 0;
}

.chart-tooltip div {
  min-width: 0;
}

.chart-tooltip dt {
  color: #8d8d8d;
}

.chart-tooltip dd {
  margin: 2px 0 0;
  overflow: hidden;
  color: #f2f2f2;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-crosshair {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: none;
  pointer-events: none;
}

.chart-crosshair-v,
.chart-crosshair-h {
  position: absolute;
  display: block;
  background: rgba(255, 255, 0, 0.72);
}

.chart-crosshair-v {
  width: 1px;
}

.chart-crosshair-h {
  height: 1px;
}

.chart-crosshair-dot {
  position: absolute;
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 0, 0.95);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.96);
  transform: translate(-3px, -3px);
  box-shadow: 0 0 10px rgba(255, 255, 0, 0.45);
}

.chart-crosshair-x-label,
.chart-crosshair-y-label {
  position: absolute;
  display: none;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 0, 0.55);
  border-radius: 2px;
  color: #ffff00;
  background: rgba(0, 0, 0, 0.95);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.chart-crosshair-x-label {
  transform: translateX(-50%);
}

.chart-crosshair-y-label {
  transform: translate(-100%, -50%);
}

canvas {
  width: 100%;
  display: block;
  touch-action: pan-y;
}

canvas.chart-pinned {
  cursor: default;
}

.empty {
  padding: 18px;
  color: var(--muted);
}
