/* Premium trading-desk layer */

:root {
  --down: #f31260;
  --down-soft: rgba(243, 18, 96, 0.12);
  --desk: #0b0e14;
  --desk-2: #121722;
  --desk-line: rgba(255, 255, 255, 0.08);
}

body.page-home,
body.page-features,
body.page-install,
body.page-tariffs {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 175, 55, 0.08), transparent 55%),
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
}

/* ===== Live binary chart ===== */
.live-desk {
  --live-up: #17c964;
  --live-down: #f31260;
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(23, 201, 100, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 90%, rgba(243, 18, 96, 0.07), transparent 50%),
    var(--desk);
  border: 1px solid var(--desk-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(212, 175, 55, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #f4f4f5;
  isolation: isolate;
}
.live-desk::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.012) 3px
  );
  z-index: 4;
}
.live-desk.is-win { box-shadow: 0 30px 80px rgba(23, 201, 100, 0.22), 0 0 0 1px rgba(23, 201, 100, 0.35); }
.live-desk.is-lose { box-shadow: 0 30px 80px rgba(243, 18, 96, 0.18), 0 0 0 1px rgba(243, 18, 96, 0.3); }

.live-desk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--desk-line);
  background: rgba(255, 255, 255, 0.02);
}
.live-desk-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live-up);
  box-shadow: 0 0 0 4px rgba(23, 201, 100, 0.18);
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.75); opacity: 0.65; }
}
.live-otc {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold);
}
.live-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--live-up);
}
.live-desk-meta {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}
.live-desk-meta b { color: #fff; font-weight: 700; }

.live-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}
.live-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--live-up));
  box-shadow: 0 0 12px rgba(23, 201, 100, 0.6);
  transition: width 0.12s linear;
}
.live-desk.is-put .live-progress i { background: linear-gradient(90deg, var(--gold), var(--live-down)); }

.live-desk-stage {
  position: relative;
  height: 360px;
}
.live-desk-hero .live-desk-stage { height: 380px; }
.live-desk-compact .live-desk-stage { height: 248px; }
.live-desk-mini .live-desk-stage { height: 188px; }
.live-desk-canvas { display: block; width: 100%; height: 100%; }

.live-status {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.live-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.86);
  z-index: 5;
  min-width: 180px;
  padding: 16px 22px;
  border-radius: 14px;
  text-align: center;
  backdrop-filter: blur(12px);
  animation: toastPop 0.45s cubic-bezier(0.2, 1.4, 0.3, 1) forwards;
}
.live-toast.is-win {
  background: rgba(23, 201, 100, 0.16);
  border: 1px solid rgba(23, 201, 100, 0.45);
  color: var(--live-up);
  box-shadow: 0 20px 50px rgba(23, 201, 100, 0.2);
}
.live-toast.is-lose {
  background: rgba(243, 18, 96, 0.16);
  border: 1px solid rgba(243, 18, 96, 0.45);
  color: var(--live-down);
}
.live-toast strong {
  display: block;
  font-size: 22px;
  letter-spacing: 0.12em;
  font-weight: 800;
}
.live-toast span {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 18px;
}
@keyframes toastPop {
  to { transform: translate(-50%, -50%) scale(1); }
}

.live-desk-bar {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--desk-line);
  background: var(--desk-2);
}
.live-stat {
  display: grid;
  gap: 2px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
}
.live-stat b {
  font-size: 14px;
  color: #fff;
  letter-spacing: 0;
  text-transform: none;
}
.live-stat-price b.is-up { color: var(--live-up); }
.live-stat-price b.is-down { color: var(--live-down); }
.live-actions { display: flex; gap: 8px; }
.live-btn {
  min-width: 118px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.live-btn i { font-size: 16px; }
.live-btn-call {
  background: linear-gradient(180deg, #2ee57a, #0ea34a);
  box-shadow: 0 8px 20px rgba(23, 201, 100, 0.28);
}
.live-btn-put {
  background: linear-gradient(180deg, #ff5d8a, #d10a4e);
  box-shadow: 0 8px 20px rgba(243, 18, 96, 0.28);
}
.live-btn:hover { transform: translateY(-1px) scale(1.02); filter: brightness(1.06); }
.live-btn.is-active {
  transform: scale(1.04);
  box-shadow: 0 0 0 2px #fff, 0 10px 24px rgba(0, 0, 0, 0.35);
}
.live-desk[data-empty="1"] .live-actions { opacity: 0.45; pointer-events: none; }
.live-desk-note { display: none; }

.live-desk-compact .live-desk-meta span:last-child,
.live-desk-mini .live-stat:first-child,
.live-desk-mini .live-desk-note { display: none; }
.live-desk-mini .live-btn { min-width: 96px; height: 38px; font-size: 12px; }

/* ===== Desk heroes ===== */
.desk-hero {
  position: relative;
  padding: clamp(28px, 5vw, 56px) 0 clamp(36px, 6vw, 72px);
  overflow: hidden;
}
.desk-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 70% at 80% 40%, rgba(23, 201, 100, 0.08), transparent 60%),
    radial-gradient(ellipse 40% 50% at 10% 80%, rgba(212, 175, 55, 0.1), transparent 55%);
}
.desk-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, var(--bg));
}
.desk-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.desk-hero-copy { max-width: 560px; }
.desk-hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.desk-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.desk-hero-copy .lead,
.desk-hero-copy .hero-home-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.desk-page-hero {
  position: relative;
  padding: clamp(28px, 5vw, 48px) 0 12px;
}
.desk-page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 32px;
  align-items: center;
}
.desk-page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}

/* HUD stats */
.hud-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--border);
}
.hud-item {
  background: var(--bg-elevated);
  padding: 16px 14px;
  display: grid;
  gap: 4px;
}
.hud-item strong {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hud-item span {
  font-size: 12px;
  color: var(--muted);
}

/* Signal tape */
.signal-tape {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elevated);
  overflow: hidden;
}
.signal-tape-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.signal-tape-list { display: grid; }
.signal-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-family: var(--mono);
  animation: rowIn 0.45s ease;
}
.signal-row:last-child { border-bottom: 0; }
.signal-row .sr-time { color: var(--dim); }
.signal-row .sr-pair { font-weight: 700; color: var(--text); font-family: inherit; min-width: 0; }
.signal-row .sr-tf {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold);
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-soft);
}
.signal-dir {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
}
.signal-dir.call { background: var(--up-soft); color: var(--up); }
.signal-dir.put { background: var(--down-soft); color: var(--down); }
.signal-res { font-weight: 800; font-size: 11px; letter-spacing: 0.06em; }
.signal-res.win { color: var(--up); }
.signal-res.lose { color: var(--down); }
.signal-res.wait { color: var(--gold); }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* Pipeline */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  counter-reset: pipe;
}
.pipeline-step {
  position: relative;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elevated);
  overflow: hidden;
}
.pipeline-step::before {
  counter-increment: pipe;
  content: counter(pipe, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.pipeline-step strong { display: block; margin: 10px 0 6px; font-size: 15px; }
.pipeline-step span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.pipeline-step::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--up));
  animation: pipeScan 3.2s ease-in-out infinite;
}
.pipeline-step:nth-child(2)::after { animation-delay: 0.4s; }
.pipeline-step:nth-child(3)::after { animation-delay: 0.8s; }
.pipeline-step:nth-child(4)::after { animation-delay: 1.2s; }
@keyframes pipeScan {
  0% { width: 0; opacity: 0; }
  30% { width: 100%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}

.module-card {
  position: relative;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%),
    var(--bg-elevated);
  overflow: hidden;
}
.module-card::after {
  content: '';
  position: absolute;
  inset: auto -20% -40% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--gold-glow);
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.module-card:hover::after { opacity: 0.7; }

.terminal-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elevated);
  overflow: hidden;
}
.terminal-panel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.terminal-panel-body { padding: 18px; }

.cta-band {
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: -40% 20% auto;
  height: 180px;
  background: radial-gradient(circle, var(--gold-glow), transparent 65%);
  pointer-events: none;
  animation: ctaGlow 8s ease-in-out infinite;
}
@keyframes ctaGlow {
  0%, 100% { transform: translateX(-8%); opacity: 0.55; }
  50% { transform: translateX(8%); opacity: 1; }
}

.module-card h3 { margin: 0 0 8px; font-size: 1rem; }
.module-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.split-section .terminal-panel + .signal-tape,
.reveal-right > .signal-tape { margin-top: 16px; }
.gallery-item img { transition: transform 0.55s ease; }
.gallery-item:hover img { transform: scale(1.045); }

.changelog-item {
  position: relative;
}
.changelog-item::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), transparent);
}

.page-404-stage {
  display: grid;
  gap: 24px;
  justify-items: center;
  text-align: center;
  padding: 32px 0 48px;
}
.page-404-stage .live-desk { width: min(100%, 640px); margin-inline: auto; }

@media (max-width: 960px) {
  .desk-hero-grid,
  .desk-page-hero-grid {
    grid-template-columns: 1fr;
  }
  .desk-hero-copy { max-width: none; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .hud-bar { grid-template-columns: 1fr 1fr; }
  .live-desk-bar { grid-template-columns: 1fr 1fr; }
  .live-actions { grid-column: 1 / -1; }
  .live-btn { flex: 1; }
  .live-desk-hero .live-desk-stage { height: 300px; }
}

@media (max-width: 640px) {
  .pipeline { grid-template-columns: 1fr; }
  .signal-row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .signal-row .sr-time { display: none; }
  .live-desk-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot,
  .pipeline-step::after,
  .cta-band::before,
  .float-y,
  .float-y-delay { animation: none; }
  .live-toast { animation: none; transform: translate(-50%, -50%); }
}
