@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/Manrope-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-main: #0a0b0f;
  --bg-panel: #121317;
  --bg-card: #1a1a1a;
  --white: #ffffff;
  --muted: #8b909a;
  --muted-2: #9ca3af;
  --line: rgba(255, 255, 255, 0.08);
  --qwen-accent-gradient: linear-gradient(90deg, #4a58d1 0%, #6e57e1 100%);
  /* 底栏：原型深炭灰玻璃 #2A2A2E 系，约 70% 通透 + 顶缘高光，非实黑、非大白底 */
  --bottom-nav-bg: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.03) 42%,
      rgba(255, 255, 255, 0) 58%
    ),
    linear-gradient(
      180deg,
      rgba(48, 48, 54, 0.62) 0%,
      rgba(42, 42, 46, 0.7) 45%,
      rgba(34, 35, 40, 0.74) 100%
    );
  --accent-purple-blue: linear-gradient(135deg, #7b61ff 0%, #4a90e2 100%);
  --up: #4cd964;
  --down: #ff3b30;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% -10%, #1b1c24 0%, #0a0b0f 42%, #06070b 100%);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  display: flex;
  justify-content: center;
  padding: 12px 12px 104px;
}

.phone-shell {
  width: min(100%, 420px);
  min-height: calc(100vh - 116px);
  border-radius: 24px;
  background: linear-gradient(180deg, #111217 0%, #090b0f 80%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 40px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 12px 12px 94px;
  position: relative;
  overflow: hidden;
}

.phone-shell::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  top: -180px;
  right: -110px;
  background: radial-gradient(circle, rgba(91, 69, 255, 0.35), rgba(91, 69, 255, 0) 72%);
  pointer-events: none;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.engine-toggle .running-pill-wrap {
  display: none;
}

.engine-toggle.is-running .start-btn {
  display: none;
}

.engine-toggle.is-running .running-pill-wrap {
  display: block;
}

.engine-toggle--sm {
  flex-shrink: 0;
}

.engine-toggle--sm .start-btn {
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
  min-width: 88px;
}

.engine-toggle--sm .running-pill-wrap .running-pill {
  padding: 8px 12px;
  font-size: 11px;
  white-space: nowrap;
}

.engine-toggle--sm .running-pill-wrap {
  margin-top: 0;
}

.start-btn {
  border-radius: 999px;
  border: 1.5px solid rgba(174, 210, 255, 0.85);
  background: linear-gradient(90deg, #7eb6ff 0%, #5b42f3 50%, #af87ff 100%);
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.2),
    0 6px 18px rgba(91, 66, 243, 0.35);
  display: grid;
  place-items: center;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  color: #fff;
  font-family: inherit;
}

.running-pill-wrap {
  border-radius: 999px;
  padding: 1px;
  background: linear-gradient(125deg, #a5e9ff 0%, #8e99f7 35%, #f096ff 70%, #a5e9ff 100%);
  box-shadow:
    0 0 16px rgba(192, 96, 255, 0.3),
    0 3px 12px rgba(96, 160, 255, 0.22);
}

.running-pill {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--qwen-accent-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 396px);
  bottom: max(8px, env(safe-area-inset-bottom));
  height: 62px;
  border-radius: 999px;
  isolation: isolate;
  background: var(--bottom-nav-bg);
  backdrop-filter: blur(20px) saturate(0.88) brightness(1.04);
  -webkit-backdrop-filter: blur(20px) saturate(0.88) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 14px 36px rgba(0, 0, 0, 0.42);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  z-index: 10000;
}

.nav-item {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a8aeb8;
  font-size: 11px;
  font-weight: 600;
  gap: 6px;
  border-radius: 999px;
  transition: background 0.22s ease, color 0.22s ease, flex 0.22s ease;
  white-space: nowrap;
  text-decoration: none;
}

a.nav-item {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

span.nav-item.nav-item--disabled {
  cursor: default;
}
.nav-item--disabled {
  pointer-events: none;
  user-select: none;
}

.nav-label {
  display: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-item.active .nav-label {
  display: inline;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  flex-shrink: 0;
}

/* 第二个 Tab：行情（柱状图）略放大，便于识别 */
.bottom-nav > .nav-item:nth-child(2) svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.05;
}

.nav-item.active {
  color: #ffffff;
  flex: 1.95;
  min-width: 0;
  background: linear-gradient(90deg, #6332fa 0%, #8257ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 4px 16px rgba(99, 50, 250, 0.42);
  padding: 0 10px;
  justify-content: center;
  align-items: center;
  gap: 7px;
}
