@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap");

:root {
  color-scheme: dark;
}

body {
  background:
    radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.2), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(139, 92, 246, 0.22), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(34, 211, 238, 0.14), transparent 36%),
    #050b16;
  overflow-x: clip;
}

.primary-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.98;
  filter: saturate(112%) contrast(104%);
}

.glass-panel {
  background: linear-gradient(145deg, rgba(11, 22, 38, 0.78), rgba(17, 30, 48, 0.62));
  border: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(10px);
}

.dna-reveal-shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 560px;
  background:
    linear-gradient(145deg, rgba(7, 19, 36, 0.95), rgba(10, 22, 42, 0.93)),
    radial-gradient(circle at 18% 12%, rgba(45, 212, 191, 0.2), transparent 42%),
    radial-gradient(circle at 82% 22%, rgba(139, 92, 246, 0.14), transparent 46%);
  border-color: rgba(125, 211, 252, 0.2);
  backdrop-filter: blur(16px);
}

.dna-reveal-shell::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  left: -80px;
  top: -100px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.2), rgba(45, 212, 191, 0));
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

.dna-reveal-shell::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -110px;
  top: -118px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18), rgba(139, 92, 246, 0));
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

.dna-reveal-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
}

.dna-id-card {
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: linear-gradient(155deg, rgba(8, 21, 39, 0.88), rgba(17, 30, 48, 0.8));
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.12), 0 12px 34px rgba(8, 47, 73, 0.28);
}

.dna-avatar-shell::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 2rem;
  border: 1px dashed rgba(34, 211, 238, 0.3);
  animation: spin 13s linear infinite;
  pointer-events: none;
}

.dna-user-avatar-badge {
  object-fit: cover;
  background: rgba(15, 23, 42, 0.9);
}

.dna-mini-stat {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.84);
}

.dna-signal-tile {
  border: 1px solid rgba(125, 211, 252, 0.24);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.8));
}

.reveal-chip {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reveal-chip.is-live {
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.1);
  color: #99f6e4;
}

.reveal-chip.is-demo {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

.reveal-chip.is-partial {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(71, 85, 105, 0.26);
  color: #e2e8f0;
}

.reveal-achievement-chip {
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.12);
  color: #fef3c7;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.28rem 0.62rem;
}

@media (min-width: 900px) {
  .dna-reveal-grid {
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }
}

.core-shell {
  position: relative;
  width: 240px;
  height: 240px;
}

.core-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1.5px dashed rgba(34, 211, 238, 0.45);
  animation: spin 18s linear infinite;
}

.core-ring.ring-2 {
  inset: 18px;
  animation-duration: 22s;
  animation-direction: reverse;
  border-color: rgba(20, 184, 166, 0.52);
}

.core-ring.ring-3 {
  inset: 34px;
  animation-duration: 28s;
  border-color: rgba(245, 158, 11, 0.42);
}

.core-node {
  position: absolute;
  inset: 50%;
  width: 112px;
  height: 112px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #22d3ee, #0f766e);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.45), 0 0 64px rgba(20, 184, 166, 0.32);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.core-particles {
  position: absolute;
  inset: 0;
}

.core-particles span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(167, 243, 208, 0.85);
  left: var(--x);
  top: var(--y);
  animation: twinkle 2.8s ease-in-out infinite;
  animation-delay: var(--delay);
}

.scan-helix {
  position: relative;
  width: 180px;
  height: 74px;
  margin: 0 auto;
}

.scan-helix::before,
.scan-helix::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px dashed rgba(34, 211, 238, 0.5);
  animation: helix 1.6s linear infinite;
}

.scan-helix::after {
  border-color: rgba(139, 92, 246, 0.56);
  animation-delay: -0.8s;
}

.constellation-bg {
  background:
    radial-gradient(circle at 50% 48%, #13253e 0%, #0b1626 50%, #050b16 100%),
    #050b16;
}

.constellation-stars {
  background-image: radial-gradient(circle, rgba(226, 232, 240, 0.25) 1px, transparent 1px);
  background-size: 24px 24px;
}

.constellation-nebula::before {
  content: "";
  position: absolute;
  inset: -25% -10%;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.18), transparent 32%),
    radial-gradient(circle at 82% 28%, rgba(139, 92, 246, 0.2), transparent 35%),
    radial-gradient(circle at 42% 78%, rgba(45, 212, 191, 0.16), transparent 38%);
  filter: blur(22px);
  pointer-events: none;
}

.constellation-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 11, 22, 0.2), rgba(5, 11, 22, 0.5));
  pointer-events: none;
  z-index: 0;
}

.constellation-drag-surface {
  touch-action: none;
}

.orbit-track {
  fill: none;
  stroke: rgba(125, 211, 252, 0.2);
  stroke-width: 1.25;
  stroke-dasharray: 3 9;
}

.link-glow {
  stroke: rgba(56, 189, 248, 0.6);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 5 7;
  animation: dash 3.2s linear infinite;
}

.link-mesh {
  stroke: rgba(186, 230, 253, 0.36);
  stroke-width: 1.1;
  fill: none;
  stroke-dasharray: 2 8;
  animation: dash 4.2s linear infinite reverse;
}

.core-aura {
  fill: rgba(34, 211, 238, 0.16);
  animation: pulse 2.8s ease-in-out infinite;
}

.core-aura-2 {
  fill: rgba(20, 184, 166, 0.2);
  animation-duration: 3.6s;
}

.signal-pulse {
  fill: rgba(34, 211, 238, 0.09);
  animation: pulse 2.4s ease-in-out infinite;
  animation-delay: var(--pulse-delay);
}

.signal-pill {
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.72));
  color: #dbeafe;
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font-size: 0.81rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 180ms ease;
}

.signal-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 212, 191, 0.62);
}

.signal-pill.is-active {
  border-color: rgba(253, 224, 71, 0.62);
  box-shadow: 0 0 0 1px rgba(253, 224, 71, 0.22), 0 0 18px rgba(253, 224, 71, 0.18);
}

.signal-chip {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.72));
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
}

.badge-shell {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(6, 16, 33, 0.95), rgba(9, 22, 42, 0.92)),
    radial-gradient(circle at 12% 12%, rgba(45, 212, 191, 0.18), transparent 36%),
    radial-gradient(circle at 84% 18%, rgba(139, 92, 246, 0.16), transparent 42%);
  border-color: rgba(125, 211, 252, 0.2);
}

.badge-shell::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  left: -130px;
  bottom: -190px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16), transparent 70%);
  filter: blur(2px);
  pointer-events: none;
}

.badge-shell::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -120px;
  top: -160px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.14), transparent 70%);
  pointer-events: none;
}

.badge-shell > * {
  position: relative;
  z-index: 1;
}

.badge-chip-live {
  border: 1px solid rgba(45, 212, 191, 0.48);
  background: rgba(45, 212, 191, 0.1);
  color: #99f6e4;
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.badge-preview-wrap {
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: linear-gradient(155deg, rgba(8, 21, 39, 0.88), rgba(17, 30, 48, 0.82));
}

.badge-preview-hero {
  border: 1px solid rgba(125, 211, 252, 0.24);
  background:
    linear-gradient(145deg, rgba(14, 27, 48, 0.9), rgba(20, 36, 58, 0.84)),
    radial-gradient(circle at 25% 20%, rgba(34, 211, 238, 0.2), transparent 42%);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.16);
}

.nebula-svg-preview {
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(2, 6, 23, 0.45);
}

.nebula-svg-preview svg {
  width: 100%;
  height: auto;
  display: block;
}

.nebula-svg-preview-large svg {
  min-height: 220px;
  object-fit: cover;
}

.badge-code {
  border-radius: 0.75rem;
  border: 1px solid rgba(71, 85, 105, 0.8);
  background: rgba(2, 6, 23, 0.72);
  color: #a5f3fc;
  font-size: 0.74rem;
  line-height: 1.45;
  padding: 0.72rem;
  overflow: auto;
}

.badge-code-tall {
  max-height: 190px;
}

.badge-code-panel > summary {
  list-style: none;
}

.badge-code-panel > summary::-webkit-details-marker {
  display: none;
}

.badge-toggle-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.badge-toggle-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(100, 116, 139, 0.58);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 0.7rem;
  padding: 0.5rem 0.65rem;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.badge-toggle-item input {
  accent-color: #22d3ee;
}

.badge-toggle-item.is-on {
  border-color: rgba(34, 211, 238, 0.52);
  background: rgba(6, 29, 43, 0.84);
}

.reveal-orbit {
  position: relative;
  height: 38px;
  width: 38px;
  margin-left: auto;
}

.reveal-orbit .ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1.5px solid rgba(34, 211, 238, 0.4);
  animation: spin 5s linear infinite;
}

.reveal-orbit .ring-2 {
  inset: -8px;
  border-color: rgba(139, 92, 246, 0.45);
  animation-duration: 7s;
  animation-direction: reverse;
}

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

@keyframes twinkle {
  0%,
  100% {
    transform: scale(0.7);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes helix {
  0% {
    transform: scaleX(0.7) rotate(0deg);
    opacity: 0.35;
  }
  50% {
    transform: scaleX(1) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scaleX(0.7) rotate(360deg);
    opacity: 0.35;
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: -20;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.9;
  }
}
