/* Pansod Global Styles */
@import url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist.min.css');

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

body {
  font-family: 'Geist', system-ui, sans-serif;
  background-color: #131314;
  color: #e5e2e3;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #131314; }
::-webkit-scrollbar-thumb { background: #353436; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #00f0ff; }

/* ── Glass panel ───────────────────────────────────────────────────────────── */
.glass-panel {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ── Full-quality loader panel ─────────────────────────────────────────────── */
#fullq-loader {
  animation: fullq-enter 0.32s cubic-bezier(.16,1,.3,1);
  font-family: 'Geist', system-ui, sans-serif;
}
#fullq-loader.fullq-leave { animation: fullq-leave 0.4s ease-in forwards; }
#fullq-loader .fullq-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 8px #00f0ff, 0 0 16px rgba(0,240,255,0.5);
  animation: fullq-pulse 1.1s ease-in-out infinite;
  display: inline-block;
}
#fullq-loader .fullq-shine {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
  animation: fullq-shine 1.8s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}
@keyframes fullq-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
@keyframes fullq-leave {
  to { opacity: 0; transform: translateY(14px) scale(0.96); }
}
@keyframes fullq-pulse {
  0%,100% { opacity: 1;   transform: scale(1);   }
  50%    { opacity: 0.35; transform: scale(0.6); }
}
@keyframes fullq-shine {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

/* ── Editor hotspot overlay divs ───────────────────────────────────────────── */
.hotspot-overlay {
  position: fixed;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 20;
  pointer-events: auto;
  touch-action: none;
}
.hotspot-overlay.dragging { cursor: grabbing; }
.hotspot-overlay.dragging .hs-glyph { transform: scale(1.15); transition: transform 0.1s ease; }

.hotspot-overlay .hs-ping {
  position: absolute;
  width: 32px; height: 32px;
  border: 1px solid var(--hs-dim, rgba(0,240,255,0.7));
  border-radius: 50%;
  animation: hs-ping 5s ease-out infinite;
  pointer-events: none;
}
.hotspot-overlay .hs-ping-2 { animation-delay: 2.5s; }

.hotspot-overlay .hs-center {
  width: 6px; height: 6px;
  background: var(--hs-color, #00f0ff);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--hs-color, #00f0ff);
  position: relative; z-index: 2; flex-shrink: 0;
  animation: hs-breathe 4s ease-in-out infinite;
}
.hotspot-overlay .hs-glyph {
  position: relative; z-index: 3;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  color: var(--hs-color, #00f0ff);
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.6));
  animation: hs-breathe 4s ease-in-out infinite;
}
.hotspot-overlay .hs-glyph svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hotspot-overlay .hs-outer {
  position: absolute; width: 32px; height: 32px;
  border: 1.5px solid var(--hs-dim, rgba(0,240,255,0.6));
  border-radius: 50%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hotspot-overlay .hs-outer::before {
  content: ''; position: absolute;
  top: -5px; left: 50%; transform: translateX(-50%);
  width: 1px; height: 4px;
  background: var(--hs-color, #00f0ff);
}
.hotspot-overlay .hs-outer::after {
  content: ''; position: absolute;
  bottom: -5px; left: 50%; transform: translateX(-50%);
  width: 1px; height: 4px;
  background: var(--hs-color, #00f0ff);
}
.hotspot-overlay:hover .hs-outer,
.hotspot-overlay.selected .hs-outer {
  transform: scale(1.25);
  box-shadow: 0 0 15px var(--hs-dim, rgba(0,240,255,0.4));
}
.hotspot-overlay.selected .hs-outer { border-color: var(--hs-color, #00f0ff); border-width: 2px; }
.hotspot-overlay .hs-label {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(32,31,32,0.85); backdrop-filter: blur(8px);
  border: 1px solid var(--hs-dim, rgba(0,240,255,0.25));
  color: var(--hs-color, #00f0ff);
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px; pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
.hotspot-overlay:hover .hs-label,
.hotspot-overlay.selected .hs-label { opacity: 1; }

/* ── Viewer hotspots ────────────────────────────────────────────────────────── */
/* ── Hotspot icon keyframes (from design spec) ───────────────────────────── */
@keyframes hs-breathe      { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes hs-arrow-idle   { 0%,100% { transform: translateY(-2%); } 50% { transform: translateY(6%); } }
@keyframes hs-fade-soft    { 0%,100% { opacity: 0.55; } 50% { opacity: 0.9; } }
@keyframes hs-spin         { to { transform: rotate(360deg); } }
@keyframes hs-ripple       { 0% { transform: scale(0.7); opacity: 0.75; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes hs-arrow-push   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(14%); } }
@keyframes hs-pin-hop      { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-22%); } }
@keyframes hs-ground-pulse { 0%,100% { transform: scale(1); opacity: 0.55; } 50% { transform: scale(1.35); opacity: 0.2; } }

/* ── Base wrapper ────────────────────────────────────────────────────────── */
.viewer-hotspot {
  --hs-size: 64px;
  --hs-color: #00f0ff;
  --hs-dim: rgba(0,240,255,0.55);
  position: fixed;
  width: var(--hs-size);
  height: var(--hs-size);
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 20;
  pointer-events: auto;
  display: inline-block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}

/* ── Unified glyph (matches editor sidebar picker icons) ─────────────────── */
.viewer-hotspot .hs-glyph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--hs-color);
  pointer-events: none;
  animation: hs-breathe 2.6s ease-in-out infinite;
}
.viewer-hotspot .hs-glyph svg {
  width: 65%; height: 65%;
  display: block; overflow: visible;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.viewer-hotspot:hover .hs-glyph svg {
  transform: scale(1.15);
  filter: drop-shadow(0 0 10px var(--hs-color));
}
.viewer-hotspot .hs-ripple {
  position: absolute; inset: 0; border-radius: 50%;
  border: calc(var(--hs-size) * 0.05) solid var(--hs-color);
  opacity: 0; pointer-events: none;
}
.viewer-hotspot:hover .hs-ripple         { animation: hs-ripple 1.6s ease-out infinite; }
.viewer-hotspot:hover .hs-ripple.delayed { animation-delay: 0.8s; }

/* ── CIRCLE ──────────────────────────────────────────────────────────────── */
.viewer-hotspot.hs-type-circle .hs-ring {
  position: absolute; inset: 0;
  transform-origin: 50% 50%;
}
.viewer-hotspot.hs-type-circle .hs-ring svg { display: block; overflow: visible; }
.viewer-hotspot.hs-type-circle .hs-ring path { stroke: var(--hs-color); }
.viewer-hotspot.hs-type-circle .hs-ring circle { fill: var(--hs-color); }
.viewer-hotspot.hs-type-circle .hs-dot {
  position: absolute; left: 50%; top: 50%;
  width: 20%; height: 20%;
  margin: -10% 0 0 -10%;
  border-radius: 50%;
  background: var(--hs-color);
  animation: hs-breathe 2.4s ease-in-out infinite;
}
.viewer-hotspot.hs-type-circle .hs-ripple {
  position: absolute; inset: 0; border-radius: 50%;
  border: calc(var(--hs-size) * 0.055) solid var(--hs-color);
  opacity: 0;
  pointer-events: none;
}
.viewer-hotspot.hs-type-circle:hover .hs-ring { animation: hs-spin 4s linear infinite; }
.viewer-hotspot.hs-type-circle:hover .hs-ring path { stroke: var(--hs-color); }
.viewer-hotspot.hs-type-circle:hover .hs-ring circle { fill: var(--hs-color); }
.viewer-hotspot.hs-type-circle:hover .hs-dot {
  animation: none;
  box-shadow: 0 0 calc(var(--hs-size) * 0.18) var(--hs-color);
}
.viewer-hotspot.hs-type-circle:hover .hs-ripple { animation: hs-ripple 1.6s ease-out infinite; }
.viewer-hotspot.hs-type-circle:hover .hs-ripple.delayed { animation-delay: 0.8s; }

/* ── ARROW ───────────────────────────────────────────────────────────────── */
.viewer-hotspot.hs-type-arrow .hs-disc {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: calc(var(--hs-size) * 0.045) solid var(--hs-color);
  box-sizing: border-box;
  transition: border-color .25s ease;
}
.viewer-hotspot.hs-type-arrow .hs-chev {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  animation: hs-arrow-idle 2.8s ease-in-out infinite;
}
.viewer-hotspot.hs-type-arrow .hs-chev svg { display: block; overflow: visible; }
.viewer-hotspot.hs-type-arrow .hs-chev line,
.viewer-hotspot.hs-type-arrow .hs-chev polyline { stroke: var(--hs-color); }
.viewer-hotspot.hs-type-arrow .hs-ripple {
  position: absolute; inset: 0; border-radius: 50%;
  border: calc(var(--hs-size) * 0.045) solid var(--hs-color);
  opacity: 0; pointer-events: none;
}
.viewer-hotspot.hs-type-arrow:hover .hs-chev { animation: hs-arrow-push 0.9s cubic-bezier(.4,0,.6,1) infinite; }
.viewer-hotspot.hs-type-arrow:hover .hs-ripple { animation: hs-ripple 1.4s ease-out infinite; }

/* ── PIN ─────────────────────────────────────────────────────────────────── */
.viewer-hotspot.hs-type-pin .hs-pin-body {
  position: absolute; left: 0; top: 0;
  width: 100%; height: var(--hs-size);
  animation: hs-breathe 2.6s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}
.viewer-hotspot.hs-type-pin .hs-pin-body svg { display: block; overflow: visible; width: 100%; height: 100%; }
.viewer-hotspot.hs-type-pin .hs-pin-body path { fill: var(--hs-color); stroke: rgba(0,0,0,0.15); stroke-width: 0.18; }
.viewer-hotspot.hs-type-pin .hs-pin-body .hole { fill: #0E1116; stroke: none; }
.viewer-hotspot.hs-type-pin .hs-ground {
  position: absolute; left: 50%; bottom: 0;
  width: 55%; height: 18%;
  margin-left: -27.5%;
  border-radius: 50%;
  border: calc(var(--hs-size) * 0.025) solid var(--hs-color);
  box-sizing: border-box;
  animation: hs-fade-soft 2.6s ease-in-out infinite;
}
.viewer-hotspot.hs-type-pin:hover .hs-pin-body { animation: hs-pin-hop 0.9s cubic-bezier(.4,0,.6,1) infinite; }
.viewer-hotspot.hs-type-pin:hover .hs-ground {
  animation: hs-ground-pulse 1.4s ease-out infinite;
  box-shadow: 0 0 calc(var(--hs-size) * 0.2) var(--hs-color);
}

/* ── Label ───────────────────────────────────────────────────────────────── */
.viewer-hotspot .hs-label {
  position: absolute;
  top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(14,17,22,0.85); backdrop-filter: blur(8px);
  border: 1px solid var(--hs-dim);
  color: var(--hs-label-color, var(--hs-color));
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.viewer-hotspot:hover .hs-label { opacity: 1; }

/* ── Form inputs (stealth) ──────────────────────────────────────────────────── */
input[type=text],
input[type=email],
input[type=password] {
  background: transparent;
  outline: none;
  border-radius: 0;
}
input:focus { outline: none; box-shadow: none; }

/* ── Animate pulse for reticle ──────────────────────────────────────────────── */
@keyframes reticle-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.15); }
}
.animate-pulse { animation: reticle-pulse 1.8s ease-in-out infinite; }

/* ── Spinner ────────────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 0.9s linear infinite; }

/* ── Pansod Reticle (logo mark + loader) ──────────────────────────────────────
   The "Reticle" is a notched ring with a pip at the top of the notch and a
   small solid inner disc — like a camera viewfinder. As a loader, the ring
   spins (radar-sweep) while a pulsing dot breathes over the inner disc.
   Set color via `color:` on the wrapper (inherits to currentColor in SVG). */

@keyframes pansod-spin { to { transform: rotate(360deg); } }
@keyframes pansod-pulse-dot {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(0.55); opacity: 0.55; }
}

.pansod-reticle {
  position: relative;
  display: inline-block;
  color: #00f0ff;
  width: 96px;
  height: 96px;
}
.pansod-reticle.is-static .reticle-mark { animation: none; }
.pansod-reticle.is-static .reticle-dot  { display: none; }

/* one-shot spin triggered by JS — overrides is-static */
.pansod-reticle.is-static.do-spin .reticle-mark {
  animation: pansod-spin 0.65s cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

.pansod-reticle .reticle-mark {
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: pansod-spin 1.6s linear infinite;
  transform-origin: 50% 50%;
}

.pansod-reticle .reticle-dot {
  position: absolute;
  left: 50%; top: 50%;
  width: 18%; height: 18%;
  margin: -9% 0 0 -9%;
  border-radius: 50%;
  background: currentColor;
  animation: pansod-pulse-dot 1.36s ease-in-out infinite;
}

/* size modifiers */
.pansod-reticle.sm { width: 24px; height: 24px; }
.pansod-reticle.md { width: 48px; height: 48px; }
.pansod-reticle.lg { width: 96px; height: 96px; }

/* ── Component classes ──────────────────────────────────────────────────────── */

/* Primary filled button */
.btn-primary {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #00f0ff;
  color: #006970;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover  { filter: brightness(1.1); }
.btn-primary:active { transform: scale(0.95); }

/* Ghost / outline button */
.btn-ghost {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  color: #b9cacb;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 0.25rem;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); }

/* Card — glass panel with standard padding */
.card {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  background-color: #1c1b1c;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

/* Modal inner box */
.modal-box {
  position: relative;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  background-color: #201f20;
  border-radius: 0.75rem;
  padding: 2rem;
  width: 100%;
  max-width: 28rem;
  z-index: 10;
}

/* Underline text input */
.form-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  color: #e5e2e3;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.form-input:focus { border-bottom-color: #00f0ff; }
.form-input::placeholder { color: rgba(185,202,203,0.4); }

/* Badge pill — e.g. "BASE PLAN", "Premium", "Live" */
.badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}
.badge-cyan   { color: #00f0ff; border: 1px solid rgba(0,240,255,0.4); }
.badge-dim    { color: #b9cacb; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.4); }
.badge-filled { background-color: rgba(0,240,255,0.9); color: #006970; }
.badge-live   { background-color: rgba(22,163,74,0.8); color: #fff; }

/* ── Spatial grid (editor bg) ──────────────────────────────────────────────── */
.spatial-grid {
  background-image:
    linear-gradient(to right, rgba(0,240,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,240,255,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}
