:root {
  --void: #06010d;
  --text: #f7f4ff;
  --muted: rgba(214, 198, 240, 0.72);
  --ion: #5ef6ff;
  --plasma: #ff4dad;
  --gold: #ffd56a;
  --violet: #9b7dff;
  --call: #3ef6c8;
  --put: #ff5a9a;
  --up: #5ee0a0;
  --down: #ff7b93;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-out: cubic-bezier(0.32, 0.72, 0, 1);
  --lx: 50%;
  --ly: 18%;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-deep: rgba(16, 8, 32, 0.42);
}

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

html, body {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--void);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}

body.has-result { overflow-y: auto; }

body {
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(155, 125, 255, 0.38), transparent 52%),
    radial-gradient(ellipse 70% 50% at 112% 88%, rgba(255, 77, 173, 0.2), transparent 48%),
    radial-gradient(ellipse 60% 42% at -8% 92%, rgba(94, 246, 255, 0.14), transparent 50%),
    var(--void);
}

.aurora {
  position: fixed;
  inset: -24%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 28% 38%, rgba(255, 77, 173, 0.22), transparent 34%),
    radial-gradient(circle at 74% 52%, rgba(94, 246, 255, 0.18), transparent 36%),
    radial-gradient(circle at 50% 82%, rgba(255, 213, 106, 0.1), transparent 38%);
  filter: blur(48px) saturate(1.15);
  animation: drift 18s ease-in-out infinite alternate;
  transition: filter 0.8s var(--spring), opacity 0.8s var(--spring);
}

.blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 42vw;
  height: 42vw;
  max-width: 420px;
  max-height: 420px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.42;
  animation: blobFloat 16s var(--spring) infinite;
}

.blob.b1 {
  top: 8%;
  left: -8%;
  background: #8a5cff;
  animation-delay: -2s;
}

.blob.b2 {
  right: -12%;
  top: 36%;
  background: #3ef6ff;
  opacity: 0.28;
  animation-duration: 21s;
}

.blob.b3 {
  left: 28%;
  bottom: -16%;
  background: #ff4dad;
  opacity: 0.3;
  animation-duration: 19s;
  animation-delay: -7s;
}

body.scanning .aurora {
  animation-duration: 7s;
  filter: blur(36px) saturate(1.4);
}

body.signal-call .aurora {
  background:
    radial-gradient(circle at 50% 46%, rgba(62, 246, 200, 0.26), transparent 40%),
    radial-gradient(circle at 70% 55%, rgba(62, 246, 255, 0.12), transparent 34%);
}

body.signal-put .aurora {
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 77, 173, 0.28), transparent 40%),
    radial-gradient(circle at 30% 40%, rgba(138, 92, 255, 0.16), transparent 32%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at center, transparent 46%, rgba(0, 0, 0, 0.5) 100%);
  opacity: 0.55;
  transition: opacity 0.7s var(--spring);
}

body.scanning .vignette { opacity: 0.78; }

.app {
  position: relative;
  z-index: 3;
  width: min(100%, 520px);
  margin: 0 auto;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    max(24px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  animation: iosIn 0.8s var(--spring) both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 13px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: conic-gradient(from 140deg, var(--ion), var(--violet), var(--plasma), var(--gold), var(--ion));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 10px 24px rgba(255, 77, 173, 0.35);
  animation: spin 14s linear infinite;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 42%);
}

.live {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 7px 11px 7px 9px;
  border-radius: 999px;
  background: var(--glass-deep);
  backdrop-filter: saturate(180%) blur(28px);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: iosIn 0.9s var(--spring) both;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ion);
  box-shadow: 0 0 10px var(--ion);
  animation: pulse 1.8s ease-in-out infinite;
}

.select-shell {
  width: 100%;
  position: relative;
  z-index: 20;
  animation: iosIn 0.85s var(--spring) 0.05s both;
}

.select-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.select-box,
.options,
.result-head,
.analysis-card,
.again,
.chart-wrap {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  background-color: var(--glass-deep);
  backdrop-filter: saturate(190%) blur(42px);
  -webkit-backdrop-filter: saturate(190%) blur(42px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -0.5px 0 rgba(255, 255, 255, 0.04),
    0 18px 48px rgba(0, 0, 0, 0.28);
}

.select-box::after,
.result-head::after,
.analysis-card::after,
.again::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--lx) var(--ly), rgba(255, 255, 255, 0.22), transparent 36%);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.select-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
  font: inherit;
  border-radius: 22px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  transition:
    transform 0.45s var(--spring),
    border-color 0.35s var(--spring),
    box-shadow 0.45s var(--spring),
    background 0.35s ease;
}

.select-box:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.select-box:active { transform: scale(0.985); }

.select-box.open,
.select-box:focus-visible {
  outline: none;
  border-color: rgba(155, 125, 255, 0.7);
  box-shadow:
    0 0 0 4px rgba(155, 125, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 18px 48px rgba(0, 0, 0, 0.28);
}

.sb-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.sb-dot,
.opt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ion);
  box-shadow: 0 0 10px var(--ion);
  flex-shrink: 0;
}

.opt-dot { width: 7px; height: 7px; }

.sb-text, .opt-text {
  text-align: left;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sb-name { display: block; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-name { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }

.sb-meta,
.opt-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  min-width: 0;
}

.sb-cat, .opt-cat { font-size: 12px; color: var(--muted); }
.opt-cat { font-size: 11px; }

.sb-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 72px;
  justify-content: flex-end;
}

.sb-payout,
.opt-payout {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.opt-payout { font-size: 12.5px; }

.sb-change,
.opt-change {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.opt-change { font-size: 11px; }

.sb-loading {
  display: none;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ion);
}

.select-box.is-loading .sb-loading { display: flex; }
.select-box.is-loading .sb-payout { display: none; }

.sb-spin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(62, 246, 255, 0.25);
  border-top-color: var(--ion);
  animation: spin 0.7s linear infinite;
}

.up { color: var(--up); }
.down { color: var(--down); }

.chev {
  color: var(--muted);
  transition: transform 0.5s var(--spring);
  flex-shrink: 0;
}

.select-box.open .chev { transform: rotate(180deg); }

.sb-search {
  display: none;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 700 16px/1.2 Inter, -apple-system, sans-serif;
  letter-spacing: -0.02em;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.sb-search::placeholder { color: rgba(214, 198, 240, 0.48); }

.select-box.open .sb-name { display: none; }
.select-box.open .sb-search { display: block; }
.select-box.open .sb-meta { display: none; }

@media (max-width: 420px) {
  .select-box.open .sb-payout { display: none; }
}

.sb-change.smart,
.opt-change.smart {
  color: var(--ion);
  font-weight: 700;
}

.options {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: min(62dvh, 480px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.96);
  transform-origin: top center;
  pointer-events: none;
  transition:
    opacity 0.42s var(--spring),
    transform 0.5s var(--spring),
    visibility 0.42s;
}

.options.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.opt-tools {
  flex-shrink: 0;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 4, 18, 0.2);
}

.type-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.type-pills::-webkit-scrollbar { display: none; }

.type-pill {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font: 700 12px/1 Inter, -apple-system, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.28s var(--spring), color 0.28s var(--spring), border-color 0.28s var(--spring), transform 0.28s var(--spring);
}

.type-pill:active { transform: scale(0.96); }

.type-pill.on {
  color: #120816;
  background: linear-gradient(180deg, #ffffff, #dccfff);
  border-color: rgba(255, 255, 255, 0.7);
}

.opt-list {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.opt-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.opt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  min-height: 52px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.28s var(--spring), transform 0.28s var(--spring);
}

.opt:last-child { border-bottom: 0; }

.opt:hover,
.opt.sel,
.opt:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.opt:active { transform: scale(0.99); }

.opt.auto {
  background: rgba(138, 92, 255, 0.14);
}

.opt.auto:hover,
.opt.auto.sel,
.opt.auto:focus-visible {
  background: rgba(138, 92, 255, 0.22);
}

.opt.auto .opt-payout { color: var(--ion); }

.opt.closed {
  opacity: 1;
  background: rgba(0, 0, 0, 0.12);
}

.opt.closed .opt-dot {
  background: #8a7a9a;
  box-shadow: none;
}

.opt.closed .opt-name {
  color: rgba(244, 236, 255, 0.62);
}

.opt.closed .opt-payout {
  color: #ff8aa0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.opt-change.off,
.sb-change.off {
  color: #ff8aa0;
  font-weight: 700;
}

.opt-closed-label {
  padding: 10px 16px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ff8aa0;
  border-top: 1px solid rgba(255, 138, 160, 0.18);
}

.opt-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.select-shell.is-locked {
  pointer-events: none;
  opacity: 0.38;
  filter: saturate(0.7);
  transition: opacity 0.5s var(--spring), filter 0.5s var(--spring);
}

.stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  gap: 10px;
}

.selected-name {
  position: relative;
  z-index: 4;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 0 24px rgba(255, 211, 106, 0.22);
  transition: opacity 0.5s var(--spring), transform 0.5s var(--spring), color 0.45s ease, letter-spacing 0.5s var(--spring);
  animation: iosIn 0.9s var(--spring) 0.08s both;
}

body.scanning .selected-name {
  color: rgba(244, 236, 255, 0.78);
  letter-spacing: 0.12em;
}

.orb {
  position: relative;
  z-index: 5;
  width: 248px;
  height: 248px;
  display: grid;
  place-items: center;
  animation: iosIn 1s var(--spring) 0.1s both;
}

.accretion,
.horizon,
.ring,
.pulse,
.scan-beam,
.progress {
  position: absolute;
  pointer-events: none;
}

.accretion,
.horizon,
.ring { border-radius: 50%; }

.accretion {
  inset: -22px;
  background: conic-gradient(
    from 0deg,
    transparent 0 8%,
    var(--gold) 14%,
    var(--plasma) 28%,
    var(--violet) 42%,
    var(--ion) 58%,
    transparent 70% 100%
  );
  filter: blur(12px);
  opacity: 0.38;
  animation: spin 9s linear infinite;
  transition: opacity 0.6s var(--spring), filter 0.6s var(--spring);
}

.horizon {
  inset: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 22px rgba(255, 61, 154, 0.22),
    inset 0 0 24px rgba(62, 246, 255, 0.1);
  animation: spin 18s linear infinite reverse;
  transition: inset 0.6s var(--spring), border-color 0.5s ease;
}

.ring {
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: spin 26s linear infinite;
}

.ring.dash {
  inset: 16px;
  border-style: dashed;
  border-color: rgba(62, 246, 255, 0.3);
  animation-duration: 14s;
  animation-direction: reverse;
}

.progress {
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  transform: rotate(-90deg);
  opacity: 0;
  transition: opacity 0.45s var(--spring);
}

.progress circle {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.progress .track { stroke: rgba(255, 255, 255, 0.1); }

.progress .bar {
  stroke: url(#scanGrad);
  stroke-dasharray: 722;
  stroke-dashoffset: 722;
  filter: drop-shadow(0 0 8px rgba(62, 246, 255, 0.7));
  transition: stroke-dashoffset 0.08s linear;
}

.scan-beam {
  inset: 8px;
  border-radius: 50%;
  opacity: 0;
  background: conic-gradient(from 0deg, transparent 0 78%, rgba(62, 246, 255, 0.6) 88%, transparent 100%);
  mask-image: radial-gradient(circle, transparent 58%, #000 62%, #000 72%, transparent 76%);
  -webkit-mask-image: radial-gradient(circle, transparent 58%, #000 62%, #000 72%, transparent 76%);
}

.pulse {
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(62, 246, 255, 0.45);
  opacity: 0;
}

.go {
  position: relative;
  z-index: 2;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  color: #120814;
  font: 800 18px/1 Inter, -apple-system, sans-serif;
  letter-spacing: 0.2em;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.78), transparent 36%),
    radial-gradient(circle at 50% 54%, #ffb4e0 0%, #c45cff 38%, #3ef6ff 74%, #14081c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -18px 28px rgba(20, 8, 40, 0.28),
    0 0 0 8px rgba(255, 61, 154, 0.08),
    0 22px 50px rgba(90, 20, 80, 0.45),
    0 0 70px rgba(62, 246, 255, 0.28);
  overflow: hidden;
  display: grid;
  place-items: center;
  transition:
    transform 0.5s var(--spring),
    box-shadow 0.5s var(--spring),
    filter 0.45s var(--spring),
    background 0.55s ease,
    color 0.35s ease;
  animation: floatIdle 4.6s ease-in-out infinite;
  will-change: transform;
}

.go-glass,
.go-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.go-glass {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%),
    radial-gradient(circle at var(--lx) var(--ly), rgba(255, 255, 255, 0.28), transparent 36%);
  mix-blend-mode: screen;
}

.go-shine {
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 48%, transparent 62%);
  background-size: 220% 100%;
  animation: sheenSweep 5.5s ease-in-out infinite;
  opacity: 0.55;
}

.go-label {
  position: relative;
  z-index: 1;
  transition: opacity 0.25s ease, transform 0.45s var(--spring), letter-spacing 0.35s ease;
}

.go:hover:not(:disabled) { filter: brightness(1.06); }
.go.pressed:not(:disabled),
.go:active:not(:disabled) {
  transform: scale(0.94) !important;
  animation: none;
  filter: brightness(1.08);
}

.go:disabled {
  cursor: default;
  opacity: 1;
  color: inherit;
  -webkit-text-fill-color: inherit;
  filter: none;
  animation: none;
}

.status {
  min-height: 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--spring), transform 0.45s var(--spring), color 0.35s ease;
}

.status.show {
  opacity: 1;
  transform: translateY(0);
}

body.scanning .status.show { color: var(--ion); }

.again {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 2px;
  padding: 14px 18px;
  border-radius: 18px;
  color: var(--text);
  font: 800 13px/1 Inter, -apple-system, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.45s var(--spring), border-color 0.35s var(--spring), box-shadow 0.45s var(--spring);
}

.again:hover,
.again:focus-visible {
  color: var(--text);
  outline: none;
  border-color: rgba(94, 246, 255, 0.5);
  transform: translateY(-1px);
}

.again:active { transform: scale(0.975); }

.result-board {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-top: 4px;
}

body.has-result .result-board { display: flex; }

body.has-result .result-board.in > * {
  animation: iosIn 0.78s var(--spring) both;
}

body.has-result .result-board.in > *:nth-child(1) { animation-delay: 0.02s; }
body.has-result .result-board.in > *:nth-child(2) { animation-delay: 0.1s; }
body.has-result .result-board.in > *:nth-child(3) { animation-delay: 0.18s; }
body.has-result .result-board.in > *:nth-child(4) { animation-delay: 0.26s; }

body.has-result .select-shell,
body.has-result .orb,
body.has-result .status,
body.has-result .selected-name {
  display: none;
}

body.has-result .stage {
  justify-content: flex-start;
  min-height: 0;
  padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 22px;
  overflow: hidden;
}

.result-name {
  font-size: clamp(15px, 4.6vw, 18px);
  font-weight: 800;
  letter-spacing: -0.03em;
  min-width: 0;
  overflow-wrap: anywhere;
}

.result-side {
  font-family: Syne, Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.result-side svg { width: 22px; height: 22px; }

body.signal-call .result-head { border-color: rgba(62, 246, 194, 0.38); }
body.signal-put .result-head { border-color: rgba(255, 77, 141, 0.38); }
body.signal-call .result-side { color: var(--call); text-shadow: 0 0 18px rgba(62, 246, 194, 0.4); }
body.signal-put .result-side { color: var(--put); text-shadow: 0 0 18px rgba(255, 77, 141, 0.4); }

.chart-wrap {
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  min-height: min(42vw, 220px);
}

.chart-wrap img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.chart-wrap.is-loading::after {
  content: "Loading chart…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(5, 2, 8, 0.42);
  backdrop-filter: blur(8px);
}

.analysis-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  overflow: hidden;
}

.ana-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ana-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.ana-dir {
  font-family: Syne, Inter, sans-serif;
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.05;
  word-break: break-word;
}

.ana-dir.is-up { color: var(--call); text-shadow: 0 0 18px rgba(62, 246, 194, 0.35); }
.ana-dir.is-down { color: var(--put); text-shadow: 0 0 18px rgba(255, 77, 141, 0.35); }
.ana-dir.is-wait { color: var(--gold); }

.ana-conf {
  font-size: clamp(22px, 6.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.ana-action {
  font-size: clamp(14px, 4.2vw, 16px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  overflow-wrap: anywhere;
}

.ana-notes {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  overflow-wrap: anywhere;
}

body.scanning .accretion {
  opacity: 0.78;
  filter: blur(8px) saturate(1.25);
  animation-duration: 2.2s;
}

body.scanning .horizon {
  inset: 32px;
  animation-duration: 6s;
  border-color: rgba(62, 246, 255, 0.55);
}

body.scanning .ring { animation-duration: 8s; }
body.scanning .ring.dash { animation-duration: 5.5s; }
body.scanning .progress { opacity: 1; }

body.scanning .scan-beam {
  opacity: 1;
  animation: spin 1.7s linear infinite;
}

body.scanning .pulse { animation: ripple 2.2s ease-out infinite; }
body.scanning .pulse-2 { animation-delay: 0.7s; }
body.scanning .pulse-3 { animation-delay: 1.4s; }

body.scanning .go {
  color: var(--text);
  letter-spacing: 0.08em;
  animation: breathe 1.8s ease-in-out infinite;
  background:
    radial-gradient(circle at 50% 42%, rgba(62, 246, 255, 0.22), transparent 42%),
    radial-gradient(circle at 50% 54%, rgba(26, 10, 40, 0.92) 0%, #14081c 72%, #07010f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 6px rgba(62, 246, 255, 0.08),
    0 16px 50px rgba(20, 8, 40, 0.55),
    0 0 50px rgba(62, 246, 255, 0.22);
}

body.scanning .go-label {
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

body.locking .go {
  animation: none;
  transform: scale(1.05);
}

body.locking .progress .bar {
  filter: drop-shadow(0 0 10px rgba(255, 211, 106, 0.9));
}

body.signal-call .go {
  color: #041410;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.75), transparent 34%),
    radial-gradient(circle at 50% 54%, #9affd8 0%, #3ef6c2 38%, #1aa37a 78%, #06241c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 8px rgba(62, 246, 194, 0.12),
    0 16px 50px rgba(20, 90, 70, 0.45),
    0 0 70px rgba(62, 246, 194, 0.38);
  animation: popIn 0.7s var(--spring);
}

body.signal-put .go {
  color: #1a0610;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.75), transparent 34%),
    radial-gradient(circle at 50% 54%, #ff9ad4 0%, #ff4d8d 38%, #c4125a 78%, #240612 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 8px rgba(255, 77, 141, 0.12),
    0 16px 50px rgba(90, 20, 50, 0.5),
    0 0 70px rgba(255, 77, 141, 0.38);
  animation: popIn 0.7s var(--spring);
}

body.signal-call .accretion,
body.signal-put .accretion {
  opacity: 0.55;
  animation-duration: 9s;
}

body.signal-call .go-label,
body.signal-put .go-label {
  font-size: 22px;
  letter-spacing: 0.18em;
}

@keyframes drift {
  from { transform: translate3d(-4%, -2%, 0) scale(1); }
  to { transform: translate3d(5%, 3%, 0) scale(1.08); }
}

@keyframes blobFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6%, -8%, 0) scale(1.12); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.28; }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes ripple {
  0% { transform: scale(0.86); opacity: 0.55; }
  100% { transform: scale(1.55); opacity: 0; }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes floatIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes sheenSweep {
  0% { background-position: 120% 50%; }
  100% { background-position: -40% 50%; }
}

@keyframes popIn {
  0% { transform: scale(0.86); filter: brightness(1.55); }
  58% { transform: scale(1.05); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes iosIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

@media (max-height: 740px) {
  .orb { width: 214px; height: 214px; }
  .go { width: 148px; height: 148px; }
  .stage { min-height: 300px; gap: 4px; }
  .selected-name { font-size: 18px; }
}

    @media (max-width: 380px) {
      .app { padding-left: 12px; padding-right: 12px; }
      .result-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }
      .result-side { font-size: 20px; }
      .sb-name, .sb-search { font-size: 15px; }
      .go { width: 140px; height: 140px; }
      .orb { width: 200px; height: 200px; }
      .go-label { font-size: 16px; }
      .type-pill { min-height: 32px; padding: 6px 11px; font-size: 11px; }
      .options { max-height: min(58dvh, 420px); }
    }

@media (min-width: 768px) {
  .app { width: min(100%, 560px); padding-top: 28px; }
  .stage { min-height: 480px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .app { min-height: auto; }
  .stage { min-height: 220px; justify-content: flex-start; }
  .orb { width: 150px; height: 150px; }
  .go { width: 108px; height: 108px; }
  .selected-name { font-size: 16px; }
  header { margin-bottom: 10px; }
  .options { max-height: min(72dvh, 260px); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora, .brand-mark, .accretion, .horizon, .ring, .go, .scan-beam, .pulse, .blob, .go-shine, .live-dot {
    animation: none !important;
  }
  .select-box, .options, .go, .again, .result-board.in > * {
    transition: none !important;
    animation: none !important;
  }
}
