:root {
  --vq-cyan: #00f5d4;
  --vq-magenta: #ff2a6d;
  --vq-gold: #ffe566;
  --vq-purple: #9d4edd;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  font-family: "JetBrains Mono", monospace;
  color: #e8f4ff;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(157, 78, 221, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 245, 212, 0.12), transparent),
    #0a0618;
}

.vq-window {
  width: min(100%, 520px);
  border: 2px solid rgba(255, 229, 102, 0.55);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(26, 10, 62, 0.98), rgba(18, 8, 42, 0.99));
  box-shadow: 0 0 40px rgba(255, 42, 109, 0.25), 0 0 80px rgba(0, 245, 212, 0.12);
  overflow: hidden;
}

.vq-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  background: linear-gradient(90deg, rgba(60, 20, 100, 0.9), rgba(30, 10, 60, 0.95));
  border-bottom: 1px solid rgba(255, 229, 102, 0.35);
  font-family: "Press Start 2P", monospace;
  font-size: 0.42rem;
  color: var(--vq-gold);
}

.vq-titlebar > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vq-titlebar-controls { display: flex; flex-shrink: 0; gap: 0.35rem; }
.vq-titlebar-controls span {
  width: 10px; height: 10px;
  border: 1px solid var(--vq-magenta);
  background: rgba(255, 42, 109, 0.35);
}

.vq-menu {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid rgba(0, 245, 212, 0.2);
}

.vq-menu button {
  border: none; background: transparent;
  color: rgba(232, 244, 255, 0.55);
  font-family: "Press Start 2P", monospace;
  font-size: 0.38rem; cursor: pointer; padding: 0.25rem 0.35rem;
}

.vq-menu button.is-active, .vq-menu button:hover {
  color: var(--vq-gold);
  text-shadow: 0 0 12px rgba(255, 229, 102, 0.5);
}

.vq-main { position: relative; padding: 1.25rem 1rem 1rem; min-height: 380px; overflow: hidden; }
.vq-main.vq-manifesting .vq-infinity-svg { animation-duration: 1.2s, 1.8s; filter: drop-shadow(0 0 16px rgba(255, 42, 109, 1)) drop-shadow(0 0 28px rgba(0, 245, 212, 0.8)); }
.vq-machine-overlay {
  display: none;
  position: absolute; inset: 0; z-index: 5;
  place-items: center;
  background: rgba(10, 6, 24, 0.72);
  font-family: "Press Start 2P", monospace;
  font-size: 0.42rem;
  color: var(--vq-gold);
  letter-spacing: 0.12em;
  text-shadow: 0 0 18px rgba(255, 229, 102, 0.6);
  pointer-events: none;
}
.vq-main.vq-manifesting .vq-machine-overlay {
  display: grid;
}

.vq-tab-panel { position: relative; z-index: 2; }

.vq-nebula {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 30% 40%, rgba(157, 78, 221, 0.35), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(0, 245, 212, 0.2), transparent 50%);
}

.vq-mandala {
  position: absolute; left: 50%; top: 46%;
  width: 280px; height: 280px;
  transform: translate(-50%, -50%);
  opacity: 0.35; pointer-events: none;
  animation: vq-mandala-spin 48s linear infinite;
}

@keyframes vq-mandala-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.vq-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.62rem; letter-spacing: 0.22em;
  color: var(--vq-cyan); text-align: center; margin-bottom: 0.5rem;
}

.vq-infinity-wrap { display: flex; flex-direction: column; align-items: center; margin: 0.5rem 0 1rem; }

.vq-infinity-svg {
  width: 140px; height: 70px;
  animation: vq-infinity-breathe 3.6s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 42, 109, 0.8)) drop-shadow(0 0 18px rgba(0, 245, 212, 0.45));
}

.vq-infinity-svg path {
  fill: none; stroke: url(#infinityGrad); stroke-width: 6;
  stroke-linecap: round; stroke-dasharray: 180;
  animation: vq-infinity-trace 8s linear infinite;
}

@keyframes vq-infinity-trace { 0% { stroke-dashoffset: 180; } 100% { stroke-dashoffset: 0; } }
@keyframes vq-infinity-breathe { 0%, 100% { transform: scale(0.96); } 50% { transform: scale(1.04); } }

.vq-readout { text-align: center; }
.vq-readout .gb {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 700; color: var(--vq-gold);
  text-shadow: 0 0 24px rgba(255, 229, 102, 0.55);
}
.vq-readout .beyond { font-style: italic; font-size: 0.85rem; color: rgba(255, 182, 193, 0.9); }

.vq-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 1rem 0; }
.vq-widget {
  border: 1px solid rgba(0, 245, 212, 0.45); border-radius: 6px;
  padding: 0.45rem; background: rgba(0,0,0,0.35); font-size: 0.55rem; text-align: center;
}
.vq-widget strong { display: block; color: var(--vq-cyan); font-size: 0.48rem; margin-bottom: 0.2rem; }
.vq-widget span { color: var(--vq-gold); font-family: "Orbitron", sans-serif; font-size: 0.62rem; }

.vq-intention label { display: block; font-size: 0.5rem; color: var(--vq-cyan); margin-bottom: 0.35rem; }
.vq-intention-row { display: flex; gap: 0.5rem; min-width: 0; }
.vq-intention input {
  flex: 1; min-width: 0; max-width: 100%; box-sizing: border-box;
  padding: 0.45rem; border: 1px solid rgba(0, 245, 212, 0.35);
  border-radius: 4px; background: #050308; color: #4ade80; font-family: inherit; font-size: 0.62rem;
}
.vq-intention button {
  padding: 0.45rem 0.65rem; border: 2px solid var(--vq-gold); border-radius: 4px;
  background: linear-gradient(180deg, #ffe566, #f5c542); color: #1a0a08;
  font-family: "Press Start 2P", monospace; font-size: 0.42rem; cursor: pointer;
}

.vq-status { margin-top: 0.5rem; min-height: 1.2em; font-size: 0.52rem; color: var(--vq-cyan); text-align: center; }
.vq-quote { margin-top: 0.85rem; font-size: 0.48rem; color: rgba(232,244,255,0.55); text-align: center; }

.vq-entangle { display: flex; justify-content: center; min-height: 180px; align-items: center; }
.vq-entangle svg { width: 200px; height: 120px; }
.vq-link { stroke-dasharray: 8 6; animation: vq-link-flow 3s linear infinite; }
.vq-node { animation: vq-node-pulse 2s ease-in-out infinite alternate; }
.vq-node--b { animation-delay: 0.5s; }
@keyframes vq-link-flow { from { stroke-dashoffset: 28; } to { stroke-dashoffset: 0; } }
@keyframes vq-node-pulse { from { opacity: 0.7; } to { opacity: 1; } }

.vq-observe { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; min-height: 200px; }
.vq-radar {
  width: 160px; height: 160px; border-radius: 50%;
  border: 2px solid rgba(0, 245, 212, 0.45); position: relative; overflow: hidden;
  background: radial-gradient(circle, rgba(0,245,212,0.08), transparent 70%);
}
.vq-radar::after {
  content: ""; position: absolute; inset: 0;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(0,245,212,0.35) 40deg, transparent 80deg);
  animation: vq-radar-sweep 2.8s linear infinite;
}
@keyframes vq-radar-sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.vq-believe { min-height: 200px; display: flex; align-items: flex-end; justify-content: center; }
.vq-believe-orbs { position: relative; width: 180px; height: 140px; }
.vq-believe-orbs span {
  position: absolute; bottom: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--vq-gold); box-shadow: 0 0 12px rgba(255,229,102,0.6);
  animation: vq-believe-rise 3.2s ease-in infinite;
}
.vq-believe-orbs span:nth-child(1) { left: 15%; }
.vq-believe-orbs span:nth-child(2) { left: 35%; animation-delay: 0.6s; background: var(--vq-magenta); }
.vq-believe-orbs span:nth-child(3) { left: 55%; animation-delay: 1.2s; background: var(--vq-cyan); }
.vq-believe-orbs span:nth-child(4) { left: 75%; animation-delay: 0.3s; }
.vq-believe-orbs span:nth-child(5) { left: 45%; animation-delay: 1.8s; background: var(--vq-purple); }
@keyframes vq-believe-rise {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-120px) scale(1.1); opacity: 0; }
}

.vq-download { display: flex; flex-direction: column; gap: 0.75rem; }
.vq-dl-bar { height: 22px; border-radius: 4px; background: #1a1040; overflow: hidden; border: 1px solid rgba(0,245,212,0.35); }
.vq-dl-fill {
  height: 100%; width: 67%;
  background: linear-gradient(90deg, #ff2a6d, #00f5d4, #ffe566);
  animation: vq-dl-stall 3.5s ease-in-out infinite;
}
@keyframes vq-dl-stall { 0%, 100% { width: 67%; } 50% { width: 71%; } }
.vq-dl-label { font-size: 0.55rem; color: var(--vq-cyan); text-align: center; }
.vq-dl-btn {
  align-self: center; padding: 0.55rem 1rem; border: 2px solid var(--vq-gold); border-radius: 4px;
  background: linear-gradient(180deg, #00f5d4, #1de9b6); color: #0a0a1a;
  font-family: "Press Start 2P", monospace; font-size: 0.42rem; cursor: pointer;
}

.vq-demo-note {
  margin-top: 1rem; font-size: 0.65rem; color: rgba(232,244,255,0.45); text-align: center;
}
.vq-demo-note a { color: var(--vq-cyan); }

.vq-entangle-active .vq-link { animation-duration: 0.6s; }
.vq-entangle-active .vq-node { animation-duration: 0.5s; }
.vq-radar-fast::after { animation-duration: 0.45s; }

.vq-believe-levels {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.vq-belief-btn {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(0, 245, 212, 0.45);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--vq-cyan);
  font-family: "Orbitron", sans-serif;
  font-size: 0.55rem;
  cursor: pointer;
  text-transform: lowercase;
}
.vq-belief-btn.is-active {
  border-color: var(--vq-gold);
  color: var(--vq-gold);
  box-shadow: 0 0 12px rgba(255, 229, 102, 0.45);
}
.vq-action-btn {
  display: block; margin: 0.75rem auto 0;
  padding: 0.5rem 0.85rem;
  border: 2px solid var(--vq-cyan);
  border-radius: 4px;
  background: rgba(0, 245, 212, 0.12);
  color: var(--vq-cyan);
  font-family: "Press Start 2P", monospace;
  font-size: 0.4rem;
  cursor: pointer;
}
.vq-action-btn:disabled { opacity: 0.5; cursor: wait; }
.vq-intention button:disabled { opacity: 0.55; cursor: wait; }

@media (prefers-reduced-motion: reduce) {
  .vq-infinity-svg, .vq-infinity-svg path, .vq-mandala, .vq-link, .vq-node,
  .vq-radar::after, .vq-believe-orbs span, .vq-dl-fill { animation: none; }
  .vq-infinity-svg path { stroke-dashoffset: 0; }
}
