/* ============================================
   PULSEAI - AI Meme Terminal
   Futuristic, clean, serious terminal aesthetic
   ============================================ */

:root {
  --neon-green: #00ff88;
  --neon-cyan: #00d4ff;
  --dark-bg: #0a0e14;
  --darker: #06090c;
  --text: #e0e8f0;
  --text-muted: #8892a0;
  --glow-green: rgba(0, 255, 136, 0.4);
  --glow-cyan: rgba(0, 212, 255, 0.3);
  --safe-bottom: env(safe-area-inset-bottom, 20px);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .agent-logo-swap::before,
  .hero-kicker > span:first-child,
  .degen-ticker__track {
    animation: none !important;
    transform: none !important;
  }

  .degen-ticker {
    overflow-x: auto;
  }
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--dark-bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 212, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(0, 184, 212, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(0, 212, 255, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse 40% 25% at 50% 50%, rgba(0, 255, 136, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(0, 255, 136, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 88%);
  pointer-events: none;
  z-index: 0;
}

#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  padding-bottom: calc(2rem + var(--safe-bottom));
}

/* Hero */
.hero {
  position: relative;
  text-align: center;
  padding: 3rem 0 3rem;
}

.hero-pulse-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.15);
  opacity: 0;
  animation: pulse-halo 4s ease-out infinite;
  pointer-events: none;
}

@keyframes pulse-halo {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  20% {
    opacity: 0.4;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-pulse-halo {
    display: none;
  }
}

.agent-logo-swap {
  position: relative;
  width: clamp(104px, 18vw, 132px);
  height: clamp(104px, 18vw, 132px);
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
}

.agent-logo-swap::before {
  content: '';
  position: absolute;
  inset: -7px;
  z-index: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0 12%,
    var(--neon-green) 24%,
    transparent 37% 57%,
    var(--neon-cyan) 72%,
    transparent 84% 100%
  );
  filter: drop-shadow(0 0 12px var(--glow-green));
  opacity: 0.72;
  animation: logo-orbit 9s linear infinite;
}

.agent-logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translateZ(0) scale(0.96);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
  backface-visibility: hidden;
  pointer-events: none;
  filter: drop-shadow(0 0 20px var(--glow-green));
  border-radius: 50%;
  padding: 4px;
  z-index: 1;
}

.agent-logo-img.is-active {
  opacity: 1;
  transform: translateZ(0) scale(1);
}

.agent-logo-swap.is-switching .agent-logo-img.is-active {
  transform: translateZ(0) scale(1.05);
}

@keyframes logo-orbit {
  to { transform: rotate(360deg); }
}

.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 10vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--neon-green);
  text-shadow: 0 0 30px var(--glow-green);
  margin-bottom: 0.75rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
  font-family: 'VT323', 'Consolas', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  color: rgba(224, 232, 240, 0.72);
}

.hero-kicker > span:first-child {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green);
  animation: status-pulse 1.8s ease-in-out infinite;
}

.hero-kicker.is-offline {
  color: rgba(255, 149, 143, 0.8);
}

.hero-kicker.is-offline > span:first-child {
  background: #ff5f56;
  box-shadow: 0 0 12px rgba(255, 95, 86, 0.8);
}

.hero-kicker.is-dev {
  color: rgba(255, 186, 102, 0.86);
}

.hero-kicker.is-dev > span:first-child {
  background: #ff8a00;
  box-shadow: 0 0 12px rgba(255, 138, 0, 0.8);
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

#heroTitle {
  transition: color 220ms ease, text-shadow 220ms ease, filter 220ms ease;
}

body.is-devmode #heroTitle {
  color: #ff8a00;
  text-shadow: 0 0 18px rgba(255, 138, 0, 0.28);
  filter: drop-shadow(0 0 10px rgba(255, 138, 0, 0.12));
}

body.is-devmode .hero .btn-primary {
  --dev-accent: #ff8a00;
  background: var(--dev-accent);
  border-color: var(--dev-accent);
  color: rgba(0, 0, 0, 0.9);
  box-shadow: 0 0 18px rgba(255, 138, 0, 0.25);
  transition: background 220ms ease, box-shadow 220ms ease, color 220ms ease;
}

body.is-devmode .hero .btn-primary:hover {
  background: #ff9a1a;
  box-shadow: 0 0 28px rgba(255, 138, 0, 0.35);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.launch-chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -0.75rem 0 1.4rem;
}

.launch-chips span {
  padding: 0.34rem 0.68rem;
  border: 1px solid rgba(0, 255, 136, 0.32);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(224, 232, 240, 0.82);
  font-family: 'VT323', 'Consolas', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 14px rgba(0, 255, 136, 0.04);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.degen-ticker {
  overflow: hidden;
  border-top: 1px solid rgba(0, 255, 136, 0.34);
  border-bottom: 1px solid rgba(0, 212, 255, 0.28);
  background: rgba(0, 255, 136, 0.045);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.06);
}

.degen-ticker__track {
  display: flex;
  width: max-content;
  padding: 0.58rem 0;
  color: var(--neon-green);
  font-family: 'VT323', 'Consolas', monospace;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.28);
  animation: degen-ticker-scroll 22s linear infinite;
}

@keyframes degen-ticker-scroll {
  to { transform: translateX(-50%); }
}

.btn {
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--neon-green);
  color: var(--dark-bg);
  box-shadow: 0 0 20px var(--glow-green);
}

.btn-primary:hover {
  box-shadow: 0 0 35px var(--glow-green);
}

.btn-secondary {
  background: transparent;
  color: var(--neon-cyan);
  border: 2px solid var(--neon-cyan);
}

.btn-secondary:hover {
  box-shadow: 0 0 25px var(--glow-cyan);
}

/* ===== AI Agent Terminal ===== */
.terminal-section {
  padding: 2rem 0;
}

.terminal-panel {
  background:
    repeating-linear-gradient(180deg, rgba(0, 255, 136, 0.022) 0 1px, transparent 1px 4px),
    rgba(6, 9, 12, 0.95);
  border: 1px solid rgba(0, 212, 255, 0.34);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 255, 136, 0.08),
    0 0 44px rgba(0, 255, 136, 0.09),
    inset 0 0 60px rgba(0, 0, 0, 0.3);
}

.terminal {
  position: relative;
  overflow: hidden;
}

/* Power lightning transition overlay */
.terminal-transition {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
}

.terminal-transition.play {
  opacity: 1;
}

.terminal-transition .zap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 255, 136, 0.9) 20%,
    rgba(0, 245, 255, 0.9) 50%,
    rgba(0, 255, 136, 0.9) 80%,
    transparent 100%
  );
  filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.8)) drop-shadow(0 0 20px rgba(0, 245, 255, 0.5));
  opacity: 0;
}

.terminal-transition.play .zap-left {
  left: 0;
  animation: zap-left 420ms ease-out forwards;
}

.terminal-transition.play .zap-right {
  right: 0;
  animation: zap-right 420ms ease-out forwards;
}

@keyframes zap-left {
  0% {
    transform: translateX(-35%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  60% {
    transform: translateX(55%);
    opacity: 1;
  }
  100% {
    transform: translateX(55%);
    opacity: 0;
  }
}

@keyframes zap-right {
  0% {
    transform: translateX(35%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  60% {
    transform: translateX(-55%);
    opacity: 1;
  }
  100% {
    transform: translateX(-55%);
    opacity: 0;
  }
}

.terminal.is-transitioning .terminal-blur-target {
  filter: blur(2px) saturate(1.05);
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  .terminal-transition.play .zap-left,
  .terminal-transition.play .zap-right {
    animation: none;
    opacity: 0;
  }
}

.terminal-header {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  overflow: hidden;
}

.terminal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

/* 3-state terminal power switch (OFF / ON / DEV MODE) */
.terminal-switch,
.terminal-switch *,
.ts-option {
  -webkit-tap-highlight-color: transparent;
}

.terminal-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: clamp(280px, 42vw, 420px);
  padding: 4px;
  border-radius: 14px;
  background: rgba(10, 10, 15, 0.35);
  border: 1px solid rgba(0, 212, 255, 0.22);
  box-shadow:
    inset 0 0 18px rgba(0, 212, 255, 0.08),
    0 0 10px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  user-select: none;
}

.ts-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  height: 28px;
  padding: 0.18rem 0.35rem;
  border: 0;
  background: transparent;
  border-radius: 10px;
  font-family: 'VT323', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: rgba(232, 232, 240, 0.55);
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color 220ms ease, transform 120ms ease, opacity 220ms ease;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.ts-option:focus {
  outline: none;
}

.ts-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.4);
  border-radius: 6px;
}

.ts-option:hover {
  color: rgba(255, 255, 255, 0.85);
}

.ts-option:active {
  transform: scale(0.98);
}

.ts-option.active {
  color: rgba(235, 255, 245, 0.92);
}

.ts-option.active[data-state="off"] {
  color: #ff5f56;
}

.ts-option.active[data-state="on"] {
  color: var(--neon-green);
  text-shadow: 0 0 8px var(--glow-green);
}

.ts-option.active[data-state="dev"] {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.ts-label {
  display: inline;
}

.ts-badge--mode {
  font-size: 0.52rem;
  padding: 0.06rem 0.28rem;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.14);
  border: 1px solid rgba(0, 212, 255, 0.28);
  color: rgba(0, 212, 255, 0.9);
  letter-spacing: 0.08em;
  margin-left: 0.3rem;
  display: inline-block;
}

.ts-option--dev {
  justify-content: center;
}

.ts-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 10px;
  background: rgba(0, 212, 255, 0.10);
  border: 1px solid rgba(0, 212, 255, 0.18);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.12);
  pointer-events: none;
  z-index: 1;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease, background 280ms ease, border-color 280ms ease;
}

.terminal-switch[data-active="off"] .ts-thumb {
  transform: translateX(0%);
  background: rgba(255, 95, 86, 0.10);
  border-color: rgba(255, 95, 86, 0.22);
  box-shadow: 0 0 14px rgba(255, 95, 86, 0.12);
}

.terminal-switch[data-active="on"] .ts-thumb {
  transform: translateX(100%);
  background: rgba(0, 255, 136, 0.10);
  border-color: rgba(0, 255, 136, 0.22);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.14);
}

.terminal-switch[data-active="dev"] .ts-thumb {
  transform: translateX(200%);
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.28);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.18);
}

/* Mobile: terminal power switch layout fix */
@media (max-width: 520px) {
  .terminal-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .terminal-switch {
    width: 100%;
    max-width: 320px;
    min-width: 260px;
    flex: 0 0 auto;
  }

  .ts-option {
    font-size: 0.58rem;
    padding: 0.14rem 0.28rem;
    white-space: nowrap;
    min-width: 0;
  }

  .ts-thumb {
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(33.333% - 0.18rem);
    border-radius: 8px;
  }

  /* Shorten "DEV MODE" to "DEV" on mobile (aria-label unchanged) */
  .ts-option--dev {
    font-size: 0;
  }

  .ts-option--dev::after {
    content: "DEV";
    font-size: 0.58rem;
    font-family: 'VT323', monospace;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 360px) {
  .terminal-switch {
    min-width: 240px;
  }

  .ts-option {
    padding: 0.1rem 0.2rem;
    font-size: 0.54rem;
  }

  .ts-option--dev::after {
    font-size: 0.54rem;
  }
}

.term-title {
  font-family: 'VT323', 'Consolas', monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-mode {
  font-family: 'VT323', monospace;
  font-size: 0.75rem;
  color: #ffbd2e;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-wallet-label {
  font-family: 'VT323', monospace;
  font-size: 0.75rem;
  color: var(--neon-green);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-wallet-label:empty {
  display: none;
}

.btn-term-control {
  font-family: 'VT323', monospace;
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--neon-cyan);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.terminal-header .btn-term-control {
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
}

.btn-term-control:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 10px var(--glow-cyan);
}

.btn-term-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-term-control.active {
  background: rgba(0, 212, 255, 0.25);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px var(--glow-cyan);
}

/* Terminal content wrapper (for offline blur/opacity) */
.terminal-content-wrap {
  position: relative;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Status overlay (OFFLINE / ONLINE) */
.terminal-status-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon-green);
  text-shadow: 0 0 20px var(--glow-green);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.terminal-status-overlay.visible {
  opacity: 1;
}

.terminal-status-overlay.offline {
  color: var(--text-muted);
  text-shadow: none;
}

.terminal-status-overlay.dev {
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Lockdown banner */
.terminal-lockdown-banner {
  display: none;
  padding: 0.4rem 1rem;
  font-family: 'VT323', monospace;
  font-size: 0.8rem;
  color: #ffbd2e;
  background: rgba(255, 189, 46, 0.08);
  border-bottom: 1px solid rgba(255, 189, 46, 0.2);
  text-align: center;
}

.terminal.is-lockdown .terminal-lockdown-banner,
.terminal.is-dev .terminal-lockdown-banner {
  display: block;
}

/* Terminal blur target - base transition for power effect */
.terminal-blur-target {
  position: relative;
  transition: filter 250ms ease, opacity 250ms ease;
}

/* Terminal OFFLINE state */
.terminal.is-offline .terminal-blur-target {
  opacity: 0.35;
  filter: blur(3px);
  pointer-events: none;
}

.terminal.is-offline .terminal-content-wrap {
  pointer-events: none;
}

.terminal.is-offline .terminal-status-overlay.offline {
  opacity: 1;
}

/* Terminal DEV MODE state - muted cyan/blue accent */
.terminal.is-dev {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.08), inset 0 0 60px rgba(0, 0, 0, 0.3);
}

.terminal.is-dev .terminal-lockdown-banner {
  color: var(--neon-cyan);
  background: rgba(0, 212, 255, 0.06);
  border-bottom-color: rgba(0, 212, 255, 0.2);
}

.terminal.is-dev .terminal-inputs input,
.terminal.is-dev .btn-line-copy,
.terminal.is-dev .btn-action:not(#runScan) {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.terminal.is-dev #runScan {
  opacity: 1;
  cursor: pointer;
}

.terminal.is-dev .terminal-mode {
  color: var(--neon-cyan);
}

/* DEV panel wrapper (expand/shrink animation) */
.dev-panel {
  transform-origin: top center;
  will-change: transform, opacity, filter;
}

/* OPEN: expand in when dev panel is shown */
.terminal.is-dev-prompt .dev-panel:not(.is-closing) {
  animation: devIn 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* CLOSE: retract out before hiding */
.dev-panel.is-closing {
  animation: devOut 210ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes devIn {
  from { opacity: 0; transform: scale(0.98) translateY(-8px); filter: blur(5px); }
  to   { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

@keyframes devOut {
  from { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
  to   { opacity: 0; transform: scale(0.965) translateY(-8px); filter: blur(5px); }
}

@media (prefers-reduced-motion: reduce) {
  .terminal.is-dev-prompt .dev-panel {
    animation: none;
  }
  .dev-panel.is-closing {
    animation: none;
    opacity: 0;
    pointer-events: none;
  }
}

/* DEV auth inline panel (inside terminal, not modal) */
.dev-auth {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: rgba(10, 12, 18, 0.6);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px;
  font-family: 'VT323', 'Consolas', monospace;
}

.dev-auth__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-family: 'VT323', 'Consolas', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--neon-cyan);
}

.dev-auth__hint {
  font-family: 'VT323', 'Consolas', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.dev-auth__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.dev-auth__row input {
  flex: 1;
  min-width: 120px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  font-family: 'VT323', 'Consolas', monospace;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 6px;
  color: var(--text);
}

.dev-auth__row input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.2);
}

.dev-auth__row button {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-family: 'VT323', 'Consolas', monospace;
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.dev-auth__row button:hover {
  background: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 8px var(--glow-cyan);
}

.dev-auth__row button:last-of-type {
  background: transparent;
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--text-muted);
}

.dev-auth__row button:last-of-type:hover {
  color: var(--neon-cyan);
}

.dev-auth__error {
  font-size: 0.75rem;
  color: #ff5f56;
  text-shadow: 0 0 6px rgba(255, 95, 86, 0.4);
  min-height: 1.2em;
}

.dev-auth.shake {
  animation: dev-auth-shake 0.4s ease;
}

@keyframes dev-auth-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
  .dev-auth.shake {
    animation: none;
  }
}

.terminal.is-dev-prompt {
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.12);
}

/* User inputs */
.terminal-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.input-row label {
  font-family: 'VT323', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.input-row input {
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  font-family: 'Consolas', monospace;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(0,212,255,0.4)' stroke-width='2'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 14px;
  padding-right: 1.75rem;
}

.input-row input:hover:not(:disabled) {
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.15);
}

.input-row input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.input-row input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px var(--glow-cyan);
}

/* Terminal meta + signal bars */
.terminal-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.term-label {
  font-family: 'VT323', 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--neon-cyan);
}

.term-status {
  font-family: 'VT323', 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--neon-green);
}

.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  margin-left: auto;
}

.signal-bars .bar {
  width: 4px;
  height: 6px;
  background: rgba(0, 255, 136, 0.25);
  border-radius: 1px;
  transition: background 0.2s, height 0.2s, box-shadow 0.2s;
}

.signal-bars .bar.active {
  background: var(--neon-green);
  box-shadow: 0 0 6px var(--glow-green);
}

.signal-bars .bar[data-bar="1"] { height: 6px; }
.signal-bars .bar[data-bar="2"] { height: 10px; }
.signal-bars .bar[data-bar="3"] { height: 14px; }
.signal-bars .bar[data-bar="4"] { height: 18px; }
.signal-bars .bar[data-bar="5"] { height: 22px; }

/* Phrase feed (scrollable) */
.terminal-body {
  position: relative;
  padding: 1rem;
  min-height: 200px;
  font-family: 'VT323', 'Consolas', 'Monaco', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--neon-green);
}

.terminal-output {
  max-height: 220px;
  overflow-y: auto;
  min-height: 80px;
  padding-right: 22px;
  padding-bottom: 12px;
  scrollbar-gutter: stable;
}

.terminal-output::-webkit-scrollbar {
  width: 6px;
}

.terminal-output::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.terminal-output::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 136, 0.3);
  border-radius: 3px;
}

.terminal-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.terminal-line.fresh {
  opacity: 1;
  text-shadow: 0 0 8px var(--glow-green);
  animation: line-glow 1.5s ease-out forwards;
}

.terminal-line .line-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  white-space: pre-wrap;
}

.terminal-line.log-line .line-text {
  color: var(--text-muted);
}

.terminal-line .btn-line-copy {
  flex-shrink: 0;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-family: 'VT323', monospace;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: var(--neon-green);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.terminal-line .btn-line-copy:hover {
  background: rgba(0, 255, 136, 0.3);
  box-shadow: 0 0 8px var(--glow-green);
}

@keyframes line-glow {
  to { text-shadow: none; }
}

.terminal-prompt-line {
  margin-top: 0.25rem;
}

.terminal-prompt {
  color: var(--neon-green);
  opacity: 0.8;
}

.terminal-cursor {
  display: inline-block;
  width: 6px;
  height: 1em;
  background: var(--neon-green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 1s step-end infinite;
  opacity: 0.9;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

/* Inline toast (inside terminal) */
.toast-inline {
  position: absolute;
  bottom: 0.5rem;
  right: 1rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-family: 'VT323', monospace;
  background: var(--neon-green);
  color: var(--dark-bg);
  border-radius: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast-inline.show {
  opacity: 1;
  transform: translateY(0);
}

/* Quick actions bar */
.terminal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.btn-action {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: 'VT323', 'Consolas', monospace;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action:hover {
  background: rgba(0, 255, 136, 0.2);
  box-shadow: 0 0 15px var(--glow-green);
}

.btn-action:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  background: rgba(136, 146, 160, 0.06);
  border-color: rgba(136, 146, 160, 0.35);
  color: var(--text-muted);
  box-shadow: none;
}

/* Product section */
.product-section {
  padding: 3rem 0 2rem;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  color: var(--neon-cyan);
  margin-bottom: 1.5rem;
  text-align: center;
}

.product-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 520px) {
  .product-cards {
    grid-template-columns: 1fr;
  }
}

.product-card {
  background: rgba(10, 14, 20, 0.9);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--glow-cyan);
  border-color: var(--neon-cyan);
}

.product-card-featured {
  position: relative;
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.08);
}

.product-card-featured:hover {
  box-shadow: 0 0 25px var(--glow-cyan);
  border-color: var(--neon-cyan);
}

.product-card-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--neon-cyan);
  opacity: 0.9;
}

.product-card-title {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.product-card-body {
  display: block;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text-muted);
}

/* How to use */
.howto-section {
  padding: 2rem 0 3rem;
}

.howto-steps {
  max-width: 400px;
  margin: 0 auto;
  padding-left: 0;
  list-style-position: inside;
  text-align: center;
  font-size: 1rem;
  line-height: 2;
  color: var(--text-muted);
}

.howto-steps li {
  margin-bottom: 0.5rem;
}

.howto-steps li::marker {
  color: var(--neon-green);
}

/* Contract row */
.contract-section {
  padding: 2rem 0;
  scroll-margin-top: 1.5rem;
  text-align: center;
}

.contract-note {
  max-width: 560px;
  margin: -0.55rem auto 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.contract-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.contract-addr {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.btn-copy {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  border-radius: 6px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.15);
  box-shadow: 0 0 15px var(--glow-cyan);
}

.btn-copy:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  border-color: rgba(136, 146, 160, 0.45);
  color: var(--text-muted);
  box-shadow: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 0.25rem;
  border-top: 1px solid rgba(0, 212, 255, 0.14);
  color: rgba(136, 146, 160, 0.72);
  font-family: 'VT323', 'Consolas', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
}

@media (max-width: 520px) {
  main {
    padding-inline: 1rem;
  }

  .hero {
    padding-top: 2.25rem;
  }

  .agent-logo-swap {
    width: 104px;
    height: 104px;
  }

  .hero-title {
    letter-spacing: 0.05em;
  }

  .launch-chips span {
    font-size: 0.76rem;
  }

  .degen-ticker__track {
    font-size: 0.82rem;
    animation-duration: 18s;
  }

  .terminal-panel {
    border-radius: 6px;
    box-shadow:
      0 0 0 1px rgba(0, 255, 136, 0.06),
      0 0 24px rgba(0, 255, 136, 0.07),
      inset 0 0 36px rgba(0, 0, 0, 0.28);
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Global toast */
.toast {
  position: fixed;
  bottom: calc(2rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.5rem;
  background: var(--neon-green);
  color: var(--dark-bg);
  border-radius: 8px;
  font-weight: 600;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 200;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========== AUTO X AGENT (in-terminal panel) ========== */
.terminal.is-xmode .terminal-inputs,
.terminal.is-xmode .terminal-meta,
.terminal.is-xmode .terminal-body,
.terminal.is-xmode .terminal-actions,
.terminal.is-xmode .dev-panel {
  display: none !important;
}

.xagent-panel {
  display: none;
  padding: 1rem 1rem 1.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
  border-top: 1px solid rgba(0, 212, 255, 0.15);
  margin: 0;
}

.xagent-panel[hidden] {
  display: none !important;
}

.terminal.is-xmode .xagent-panel {
  display: block;
}

.terminal.is-xmode .xagent-panel[hidden] {
  display: none !important;
}

.terminal.is-xmode {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.06);
}

.xagent-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.xagent-title {
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  color: var(--neon-cyan);
}

.xagent-back {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-family: 'VT323', monospace;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.xagent-back:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.25);
  box-shadow: 0 0 10px var(--glow-cyan);
}

.xagent-back:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.xagent-modes {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.xagent-mode {
  flex: 1;
  padding: 0.4rem 0.6rem;
  font-size: 0.7rem;
  font-family: 'VT323', monospace;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--text-muted);
  border-radius: 4px;
  cursor: default;
}

.xagent-mode.active {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.xagent-mode:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.xagent-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.xagent-controls {
  margin-bottom: 1rem;
}

.xagent-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.xagent-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--text);
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.xagent-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
}

.xagent-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Content Type select - neon/terminal theme */
.xagent-select {
  width: 100%;
  padding: 12px 42px 12px 14px;
  font-size: 0.9rem;
  font-family: 'VT323', 'Consolas', monospace;
  background-color: rgba(10, 10, 15, 0.65);
  border: 1px solid rgba(0, 255, 136, 0.25);
  color: rgba(235, 255, 245, 0.92);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.25),
    0 0 8px rgba(0, 255, 136, 0.06);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(235,255,245,0.7)' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  cursor: pointer;
}

.xagent-select:focus {
  outline: none;
}

.xagent-select:focus-visible {
  box-shadow:
    0 0 0 2px rgba(0, 255, 136, 0.35),
    0 0 18px rgba(0, 255, 136, 0.18),
    inset 0 0 12px rgba(0, 0, 0, 0.25);
}

.xagent-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.xagent-select option {
  background: #0b0f14;
  color: rgba(235, 255, 245, 0.95);
}

.xagent-select option:checked {
  background: rgba(0, 255, 136, 0.18);
}

.xagent-generate {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: 'VT323', monospace;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.xagent-generate:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.25);
  box-shadow: 0 0 10px var(--glow-cyan);
}

.xagent-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.xagent-output {
  margin-top: 1rem;
}

.xagent-textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.85rem;
  font-family: 'VT323', 'Consolas', monospace;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--neon-green);
  border-radius: 6px;
  resize: vertical;
  margin-bottom: 0.75rem;
}

.xagent-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.xagent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.xagent-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-family: 'VT323', monospace;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.xagent-btn:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 10px var(--glow-cyan);
}

.xagent-btn.primary {
  background: rgba(0, 212, 255, 0.2);
}

.xagent-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.terminal.is-offline .xagent-panel .xagent-select,
.terminal.is-offline .xagent-panel .xagent-input,
.terminal.is-offline .xagent-panel .xagent-generate,
.terminal.is-offline .xagent-panel .xagent-btn,
.terminal.is-offline .xagent-panel .xagent-back {
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 480px) {
  .xagent-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .xagent-modes {
    flex-direction: column;
  }
}
