@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Montserrat:wght@300;400;500&family=Orbitron:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --bg: #0a0b10;
  --bg-deep: #05060a;
  --panel: rgba(14, 16, 24, 0.88);
  --panel-solid: #10121b;
  /* AURA (Dave/Arturia): blanco glow; --neon-cyan alias para no romper clases legacy */
  --heading: #ffffff;
  --aura-cyan: #5efbff;
  --neon-cyan: #ffffff;
  --neon-amber: #ff8c00;
  --neon-copper: #ba6e32;
  --neon-magenta: #ff0055;
  --text: #e8f4f7;
  --text-dim: #7a8a96;
  --font: "Chakra Petch", "Share Tech Mono", monospace;
  --font-aura: "Montserrat", "Chakra Petch", system-ui, sans-serif;
  --font-display: "Orbitron", "Chakra Petch", sans-serif;
  --font-mono: "Share Tech Mono", "Chakra Petch", monospace;
  --chamfer: polygon(
    12px 0%, calc(100% - 12px) 0%, 100% 12px,
    100% calc(100% - 12px), calc(100% - 12px) 100%,
    12px 100%, 0% calc(100% - 12px), 0% 12px
  );
  --glow-cyan: 0 0 12px rgba(255, 255, 255, 0.45), 0 0 28px rgba(255, 255, 255, 0.18);
  --glow-amber: 0 0 12px rgba(255, 140, 0, 0.4), 0 0 28px rgba(186, 110, 50, 0.2);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  background: var(--bg);
}

.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 140, 0, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 140, 0, 0.045) 1px, transparent 1px),
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #0a0b10 0%, #07080c 55%, #05060a 100%);
  background-size: 48px 48px, 48px 48px, 100% 100%, 100% 100%;
}
.scanlines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.22;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 2px,
    rgba(0, 0, 0, 0.28) 2px, rgba(0, 0, 0, 0.28) 3px
  );
}

.shell { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 18px 16px 48px; }

/* —— Marca AURA (Dave / Arturia) —— */
.vic-brand {
  font-family: var(--font-aura);
  font-weight: 300;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-transform: uppercase;
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 6px;
  font-size: clamp(1.1rem, 3.2vw, 1.45rem);
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.9),
    0 0 16px rgba(255, 255, 255, 0.55),
    0 0 32px rgba(255, 255, 255, 0.28),
    0 0 52px rgba(255, 255, 255, 0.14);
  animation: auraBrandGlow 2.4s ease-in-out infinite;
  will-change: text-shadow, opacity, filter;
  -webkit-font-smoothing: antialiased;
}
.vic-heading-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 100%;
  width: 100%;
  margin: 0 auto 12px;
  text-align: center;
}
.vic-brand--trinity {
  margin: 0;
  font-size: clamp(3.3rem, 7.8vw, 4.35rem);
  line-height: 0.96;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  color: var(--aura-cyan);
  text-shadow:
    0 0 7px rgba(94, 251, 255, 0.95),
    0 0 20px rgba(94, 251, 255, 0.62),
    0 0 42px rgba(94, 251, 255, 0.28);
}
.vic-brand--intelligence {
  margin: 8px 0 0;
  font-size: clamp(0.825rem, 1.95vw, 1.0875rem);
  line-height: 1;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  opacity: 0.92;
}
.vic-brand--card {
  font-size: clamp(0.78rem, 1.8vw, 0.95rem);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  margin: 0 0 2px;
}
.vic-product-title {
  margin: 0;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--heading);
  font-family: var(--font-display);
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.55),
    0 0 18px rgba(94, 251, 255, 0.18);
}
.card-header--brand {
  align-items: flex-start;
}
.card-brand-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
@keyframes auraBrandGlow {
  0%, 100% {
    opacity: 0.9;
    filter: brightness(1) drop-shadow(0 0 6px rgba(255, 255, 255, 0.55));
    text-shadow:
      0 0 6px rgba(255, 255, 255, 0.85),
      0 0 16px rgba(255, 255, 255, 0.5),
      0 0 32px rgba(255, 255, 255, 0.28),
      0 0 56px rgba(255, 255, 255, 0.14);
  }
  50% {
    opacity: 1;
    filter: brightness(1.35) drop-shadow(0 0 16px rgba(255, 255, 255, 0.95));
    text-shadow:
      0 0 12px rgba(255, 255, 255, 1),
      0 0 28px rgba(255, 255, 255, 0.95),
      0 0 52px rgba(255, 255, 255, 0.7),
      0 0 90px rgba(255, 255, 255, 0.45),
      0 0 140px rgba(94, 251, 255, 0.25);
  }
}
@media (prefers-reduced-motion: reduce) {
  .vic-brand { animation: none; }
}


/* —— Top bar —— */
.topbar {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 140, 0, 0.45);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
}
.topbar__left { display: flex; gap: 12px; align-items: flex-start; }
.menu-glyph {
  background: transparent; border: 1px solid var(--neon-amber); color: var(--neon-amber);
  width: 36px; height: 36px; font-size: 1.1rem; clip-path: var(--chamfer);
  box-shadow: var(--glow-amber);
}
.eyebrow {
  margin: 0; letter-spacing: 0.22em; font-size: 0.68rem; color: var(--heading);
  font-family: var(--font-display); text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.55),
    0 0 18px rgba(94, 251, 255, 0.18);
}
h1 {
  margin: 6px 0 4px; font-size: 1.55rem; font-family: var(--font-display); font-weight: 600;
  color: var(--text); text-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
}
.sub { margin: 0; color: var(--text-dim); font-size: 0.86rem; max-width: 34rem; }
.topbar__right { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ambient-btn {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  padding: 0.45rem 0.7rem;
  min-height: 2rem;
  opacity: 0.85;
}
.ambient-btn[aria-pressed="false"] {
  opacity: 0.45;
  color: #8aa;
  border-color: #456;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.55); color: var(--neon-cyan);
  font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.12em;
  clip-path: var(--chamfer); background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.28);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan); animation: pulseDot 1.6s ease-in-out infinite;
}
.status-pill.is-offline {
  border-color: rgba(255, 40, 60, 0.7); color: #ff2a3c;
  background: rgba(255, 40, 60, 0.1);
  box-shadow: 0 0 14px rgba(255, 40, 60, 0.35);
}
.status-pill.is-offline .status-dot {
  background: #ff2a3c; box-shadow: 0 0 8px #ff2a3c;
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.health, .telemetry {
  min-width: 220px; max-width: 320px; padding: 10px 12px;
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.4);
  clip-path: var(--chamfer); font-size: 0.72rem; color: var(--text-dim);
  white-space: pre-wrap; font-family: var(--font-mono);
  box-shadow: var(--glow-cyan);
}

.banner-error {
  display: none; margin-bottom: 12px; padding: 10px 12px;
  border: 1px solid var(--neon-magenta); background: rgba(255, 0, 85, 0.12);
  color: var(--text); clip-path: var(--chamfer); font-size: 0.86rem;
}
.banner-error.visible { display: block; }

/* Franja señalada entre cabecera y monitores: subtítulo español de la voz en-US. */
.alexis-subtitle-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 96px;
  margin: -2px 0 18px;
  padding: 24px 46px 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.06) 50%, transparent),
    rgba(5, 6, 10, 0.54);
  border-top: 1px solid rgba(255, 140, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.44);
}
.alexis-subtitle-stage::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28%;
  right: 28%;
  height: 1px;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.7);
}
.alexis-subtitle-stage__label {
  position: absolute;
  top: 8px;
  left: 12px;
  color: var(--neon-amber);
  font: 0.62rem/1 var(--font-display);
  letter-spacing: 0.16em;
}
.alexis-subtitle-stage__text {
  width: min(100%, 920px);
  margin: 0;
  color: rgba(232, 244, 247, 0.72);
  font: 500 clamp(0.84rem, 1.5vw, 1.08rem)/1.42 var(--font-aura);
  letter-spacing: 0.075em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  transition: color 180ms ease, text-shadow 180ms ease, opacity 180ms ease;
}
.alexis-subtitle-stage.is-speaking .alexis-subtitle-stage__text {
  color: #fff;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.72),
    0 0 22px rgba(94, 251, 255, 0.28);
}
@media (max-width: 640px) {
  .vic-brand--trinity {
    font-size: clamp(2.25rem, 12vw, 3.3rem);
    letter-spacing: 0.12em;
    text-indent: 0.12em;
  }
  .alexis-subtitle-stage {
    min-height: 86px;
    padding: 24px 14px 14px;
  }
}

/* —— Layout —— */
.layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }
.col-left, .col-right { display: flex; flex-direction: column; gap: 14px; }

.cyber-card {
  background: var(--panel);
  border: 1px solid rgba(255, 140, 0, 0.55);
  clip-path: var(--chamfer);
  padding: 14px;
  position: relative;
  box-shadow: var(--glow-amber), inset 0 0 24px rgba(255, 255, 255, 0.03);
}
.cyber-card::before {
  content: "";
  position: absolute; left: 12px; right: 12px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-amber), transparent);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.card-header {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-bottom: 10px; font-family: var(--font-display); font-size: 0.72rem;
  letter-spacing: 0.14em; color: var(--neon-amber); text-transform: uppercase;
}
.live-tag { color: var(--neon-cyan); text-shadow: 0 0 8px rgba(255, 255, 255, 0.6); }

.lbl {
  display: block; margin: 0 0 8px;
  font-size: 0.68rem; color: var(--neon-amber); text-transform: uppercase;
  letter-spacing: 0.14em; font-family: var(--font-display);
  text-shadow: 0 0 8px rgba(255, 140, 0, 0.35);
}

/* City feed */
.video-container {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 18px rgba(255, 255, 255, 0.18);
  background: #000;
}
.cyber-video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: contrast(1.08) brightness(0.95) saturate(1.1);
}
.hud-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%);
  background-size: 100% 4px;
  mix-blend-mode: soft-light;
}
.hud-corner {
  position: absolute; width: 14px; height: 14px; border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.55); pointer-events: none;
}
.top-left { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.top-right { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.bottom-left { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.bottom-right { bottom: 6px; right: 6px; border-left: none; border-top: none; }
.feed-caption {
  position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em;
  color: var(--neon-cyan); text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  pointer-events: none;
}
.controls-bar {
  display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap;
}
.micro { font-size: 0.72rem; color: var(--text-dim); font-family: var(--font-mono); }

/* Form controls */
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip, .cyber-btn, select, textarea, .btn-primary, .btn-secondary {
  font-family: var(--font);
}
.chip {
  border: 1px solid rgba(255, 140, 0, 0.5); background: rgba(8, 10, 16, 0.9); color: var(--text);
  padding: 7px 12px; cursor: pointer; font-size: 0.78rem; clip-path: var(--chamfer);
}
.chip--cyan { border-color: rgba(255, 255, 255, 0.55); color: var(--neon-cyan); }
.chip.active, .chip:hover {
  border-color: var(--neon-cyan); color: var(--neon-cyan);
  box-shadow: var(--glow-cyan); background: rgba(255, 255, 255, 0.08);
}
.preview {
  width: 100%; max-height: 220px; object-fit: cover; background: #000;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.15);
}

/* Imagen base + banco de voces */
.media-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) {
  .media-split { grid-template-columns: 1fr; }
}
.voice-name {
  margin-bottom: 10px;
  min-height: auto !important;
  height: 42px;
  color: var(--text) !important;
}
.voice-file-name {
  margin: 0 0 10px;
  min-height: 1.2em;
  word-break: break-all;
}
.voice-bank-list {
  max-height: 160px; overflow: auto;
  background: #07090f; border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 8px 10px; clip-path: var(--chamfer);
  font-family: var(--font-mono);
}
.voice-bank-item {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.voice-bank-item:last-child { border-bottom: none; }
.voice-bank-item > span:first-child { color: var(--neon-amber); text-shadow: 0 0 8px rgba(255, 140, 0, 0.35); }
.voice-bank-item .vid { color: var(--text-dim); }
.voice-bank-item .vok { color: var(--neon-cyan); }
.voice-bank-item .vmiss { color: #ff2a3c; }
.voice-bank-item .vsys { color: var(--neon-amber); }
#btnVoiceClone { width: 100%; margin-top: 4px; }
.terminal-input, textarea, select {
  width: 100%; background: #07090f; color: #9dffb0;
  border: 1px solid rgba(255, 255, 255, 0.35); padding: 11px 12px;
  font: inherit; font-family: var(--font-mono); clip-path: var(--chamfer);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.05);
}
textarea { resize: vertical; min-height: 110px; color: #b8ffc8; }
textarea:focus, select:focus {
  outline: none; border-color: var(--neon-cyan);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), var(--glow-cyan);
}
select { color: var(--text); }
.row2 { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 10px; margin-top: 10px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.cyber-btn {
  background: transparent; color: var(--neon-amber);
  border: 1px solid var(--neon-amber); padding: 10px 14px; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem;
  font-family: var(--font-display); clip-path: var(--chamfer);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.cyber-btn--cyan { color: var(--neon-cyan); border-color: var(--neon-cyan); }
.cyber-btn--amber { color: var(--neon-amber); border-color: var(--neon-amber); }
.cyber-btn--primary {
  width: 100%; margin-top: 12px; padding: 14px 16px;
  color: #0a0b10; background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(210, 230, 240, 0.55));
  border-color: var(--neon-cyan); font-weight: 700; box-shadow: var(--glow-cyan);
}
.cyber-btn:hover {
  box-shadow: var(--glow-cyan);
  filter: brightness(1.08);
  animation: textGlitch 0.35s linear;
}
.status-pill:hover .glitch-text,
.live-tag:hover {
  animation: textGlitch 0.35s linear;
}
.cyber-btn--cyan:hover { background: var(--neon-cyan); color: #0a0b10; }
.cyber-btn--primary:hover { filter: brightness(1.12); }
.cyber-btn:disabled { opacity: 0.45; cursor: wait; }

/* Alias legacy buttons */
.btn-primary { /* mapped via class on btnGen if needed */ }
.log {
  margin: 0; min-height: 120px; max-height: 200px; overflow: auto;
  background: #07090f; border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 10px; font-size: 0.74rem; color: var(--text-dim);
  white-space: pre-wrap; clip-path: var(--chamfer); font-family: var(--font-mono);
}
.player {
  width: 100%; min-height: 200px; background: #000;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
}

/* Progress cyan */
.render-progress { margin: 12px 0; }
.render-progress__meta {
  display: flex; justify-content: space-between; margin-bottom: 6px;
  font-family: var(--font-display); font-size: 0.68rem; letter-spacing: 0.12em;
  color: var(--neon-cyan);
}
.render-progress__track {
  height: 8px; background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35); overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.render-progress__bar {
  height: 100%; width: 8%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), #ffffff, rgba(255, 255, 255, 0.55));
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.55), 0 0 22px rgba(255, 255, 255, 0.25);
  animation: progressPulse 1.8s ease-in-out infinite;
  transition: width 0.45s ease;
}
@keyframes progressPulse {
  0%, 100% { filter: brightness(0.95); }
  50% { filter: brightness(1.2); }
}

/* —— Chat dock + orb cyan —— */
.chat-dock {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: stretch;
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: var(--glow-cyan), inset 0 0 24px rgba(255, 255, 255, 0.04) !important;
}
@media (max-width: 720px) {
  .chat-dock { grid-template-columns: 1fr; justify-items: center; }
}

.alexis-orb-btn {
  background: transparent; border: none; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.alexis-orb-wrap {
  position: relative; width: 124px; height: 124px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: visible;
}
.alexis-orb-glow {
  position: absolute; inset: -12px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 42%, transparent 70%);
  animation: orbPulse 2.6s ease-in-out infinite;
}
.alexis-orb-ring {
  position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent;
  border-top-color: #ffffff; border-right-color: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.35); border-left-color: rgba(220, 235, 245, 0.55);
  animation: hudSpin 4s linear infinite; z-index: 3; pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.85)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.45));
}
.alexis-orb-ring--inner {
  inset: 9px; border-width: 2px;
  border-top-color: rgba(255, 255, 255, 0.25); border-right-color: transparent;
  border-bottom-color: #ffffff; border-left-color: rgba(255, 255, 255, 0.5);
  animation: hudSpin 6.5s linear infinite reverse;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.55));
}
.alexis-orb-avatar {
  position: relative; width: calc(100% - 18px); height: calc(100% - 18px);
  border-radius: 50%; overflow: hidden; z-index: 2; background: #000;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.65),
    0 0 16px rgba(255, 255, 255, 0.55),
    0 0 34px rgba(255, 255, 255, 0.28),
    inset 0 0 20px rgba(255, 255, 255, 0.15);
}
.alexis-orb-avatar video {
  width: 100%; height: 100%; object-fit: cover; object-position: center 16%;
  display: block; border-radius: 50%; background: #000;
}
.alexis-orb-holo {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  pointer-events: none; z-index: 4; opacity: 0.45; mix-blend-mode: screen;
}
.alexis-orb-holo__scan {
  position: absolute; inset: -25% 0;
  background: repeating-linear-gradient(
    to bottom, transparent 0, transparent 2px, rgba(255, 255, 255, 0.08) 2px, rgba(255, 255, 255, 0.08) 3px
  );
  animation: scanDrift 3.4s linear infinite;
}
.alexis-orb-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; color: var(--neon-cyan);
  font-family: var(--font-display);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 22px rgba(255, 255, 255, 0.4);
}
.alexis-orb-btn:hover .alexis-orb-ring {
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 1)) drop-shadow(0 0 28px rgba(255, 255, 255, 0.6));
}

/* —— Orb Andrea (+50% vs Alexis 124px → 186px) bajo Generar —— */
.andrea-orb-slot {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  padding: 12px 8px 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.andrea-orb-btn {
  background: transparent; border: none; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.andrea-orb-wrap {
  position: relative; width: 186px; height: 186px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: visible;
}
.andrea-orb-glow {
  position: absolute; inset: -14px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(186, 110, 50, 0.45) 0%, rgba(255, 140, 0, 0.12) 42%, transparent 70%);
  animation: orbPulse 2.8s ease-in-out infinite;
}
.andrea-orb-ring {
  position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent;
  border-top-color: #ff8c00; border-right-color: rgba(255, 140, 0, 0.85);
  border-bottom-color: rgba(186, 110, 50, 0.4); border-left-color: rgba(255, 180, 80, 0.55);
  animation: hudSpin 4.2s linear infinite; z-index: 3; pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.8)) drop-shadow(0 0 18px rgba(186, 110, 50, 0.45));
}
.andrea-orb-ring--inner {
  inset: 12px; border-width: 2px;
  border-top-color: rgba(255, 140, 0, 0.25); border-right-color: transparent;
  border-bottom-color: #ff8c00; border-left-color: rgba(255, 160, 60, 0.5);
  animation: hudSpin 6.8s linear infinite reverse;
  filter: drop-shadow(0 0 6px rgba(255, 140, 0, 0.55));
}
.andrea-orb-avatar {
  position: relative; width: calc(100% - 22px); height: calc(100% - 22px);
  border-radius: 50%; overflow: hidden; z-index: 2; background: #000;
  box-shadow:
    0 0 0 1px rgba(255, 140, 0, 0.65),
    0 0 18px rgba(255, 140, 0, 0.5),
    0 0 36px rgba(186, 110, 50, 0.3),
    inset 0 0 22px rgba(255, 140, 0, 0.12);
}
.andrea-orb-avatar video {
  width: 100%; height: 100%; object-fit: cover; object-position: center 18%;
  display: block; border-radius: 50%; background: #000;
}
.andrea-orb-holo {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  pointer-events: none; z-index: 4; opacity: 0.4; mix-blend-mode: screen;
}
.andrea-orb-holo__scan {
  position: absolute; inset: -25% 0;
  background: repeating-linear-gradient(
    to bottom, transparent 0, transparent 2px, rgba(255, 140, 0, 0.07) 2px, rgba(255, 140, 0, 0.07) 3px
  );
  animation: scanDrift 3.4s linear infinite;
}
.andrea-orb-label {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.22em; color: var(--neon-amber);
  font-family: var(--font-display);
  text-shadow: 0 0 10px rgba(255, 140, 0, 0.8), 0 0 22px rgba(186, 110, 50, 0.45);
}
.andrea-orb-btn:hover .andrea-orb-ring {
  filter: drop-shadow(0 0 14px rgba(255, 140, 0, 1)) drop-shadow(0 0 28px rgba(186, 110, 50, 0.55));
}
.andrea-orb-wrap.is-glitching .andrea-orb-avatar { animation: orbLoopGlitch 0.32s steps(2, end); }
.andrea-orb-wrap.is-glitching .andrea-orb-avatar video {
  filter: contrast(1.2) saturate(1.25) hue-rotate(6deg);
}

.alexis-orb-wrap.is-glitching .alexis-orb-avatar { animation: orbLoopGlitch 0.32s steps(2, end); }
.alexis-orb-wrap.is-glitching .alexis-orb-avatar video {
  filter: contrast(1.25) saturate(1.35) hue-rotate(-8deg);
}
.alexis-orb-wrap.is-glitching::after {
  content: "";
  position: absolute; inset: 8px; border-radius: 50%;
  pointer-events: none; z-index: 5;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, 0.16) 2px 3px);
  mix-blend-mode: screen; opacity: 0.85; animation: orbScanFlash 0.32s ease-out;
}

.chat-panel { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.chat-log {
  min-height: 160px; max-height: 280px; overflow: auto;
  background: #07090f; border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 12px; font-size: 0.86rem; color: var(--text-dim);
  clip-path: var(--chamfer); display: flex; flex-direction: column; gap: 10px;
}
.chat-bubble {
  max-width: 92%; padding: 8px 11px; line-height: 1.45;
  clip-path: var(--chamfer); white-space: pre-wrap;
}
.chat-bubble.user {
  align-self: flex-end; background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.5); color: var(--text);
}
.chat-bubble.assistant {
  align-self: flex-start; background: rgba(12, 14, 20, 0.95);
  border: 1px solid rgba(255, 140, 0, 0.35); color: #e8dfd4;
}
.chat-prompt-copy {
  display: block; width: 100%; margin: 8px 0 4px; padding: 10px 12px;
  text-align: left; cursor: pointer; color: #f3e6d6;
  background: rgba(186, 110, 50, 0.14);
  border: 1px solid rgba(186, 110, 50, 0.5);
  clip-path: var(--chamfer); font: inherit;
}
.chat-prompt-copy:hover,
.chat-prompt-copy:focus {
  border-color: #ba6e32; outline: none;
  box-shadow: 0 0 12px rgba(186, 110, 50, 0.28);
}
.chat-prompt-copy__label {
  display: block; font-size: 0.62rem; letter-spacing: 0.14em; color: #ba6e32;
}
.chat-prompt-copy pre {
  margin: 6px 0 0; white-space: pre-wrap; color: #f6efe4;
  font: 0.78rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.chat-prompt-copy.is-copied { border-color: #7fdcce; }
.chat-prompt-copy.is-copied .chat-prompt-copy__label { color: #7fdcce; }
.chat-bubble.thinking {
  display: inline-flex; align-items: center; gap: 7px; min-width: 64px; padding: 12px 16px;
}
.chat-thinking-dots { display: inline-flex; align-items: center; gap: 5px; height: 14px; }
.chat-thinking-dots span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  animation: thinkBounce 1.05s ease-in-out infinite;
}
.chat-thinking-dots span:nth-child(2) { animation-delay: 0.18s; }
.chat-thinking-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes thinkBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-5px); opacity: 1; }
}
.chat-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 720px) { .chat-row { grid-template-columns: 1fr; } }
.chat-actions { display: flex; flex-direction: column; gap: 8px; min-width: 120px; }
.chat-actions .cyber-btn { width: 100%; }

/* Glitch hover text */
.glitch-text { position: relative; display: inline-block; }
.glitch-text:hover {
  animation: textGlitch 0.35s linear;
  text-shadow: 1px 0 var(--neon-magenta), -1px 0 var(--neon-cyan);
}
@keyframes textGlitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  60% { transform: translate(-1px, 0); }
  80% { transform: translate(1px, 1px); }
}

/* Modal */
.ax-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 6, 10, 0.82);
}
.ax-modal[hidden] { display: none !important; }
.ax-modal__card {
  width: min(420px, 92vw); padding: 22px 20px; text-align: center;
  background: var(--panel-solid); border: 1px solid var(--neon-cyan);
  clip-path: var(--chamfer); box-shadow: var(--glow-cyan);
}
.ax-modal__eyebrow {
  margin: 0 0 8px; font-size: 0.65rem; letter-spacing: 0.16em;
  color: var(--neon-cyan); font-family: var(--font-display);
}
.ax-modal__card h3 { margin: 0 0 10px; color: var(--neon-amber); font-family: var(--font-display); }
.ax-modal__msg { margin: 0 0 18px; color: var(--text-dim); line-height: 1.45; }

@keyframes hudSpin { to { transform: rotate(360deg); } }
@keyframes orbPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes scanDrift {
  from { transform: translateY(0); }
  to { transform: translateY(20%); }
}
@keyframes orbLoopGlitch {
  0% { transform: translate(0, 0) skewX(0); }
  20% { transform: translate(-2px, 1px) skewX(-1deg); }
  45% { transform: translate(2px, -1px) skewX(1deg); }
  70% { transform: translate(-1px, 0) skewX(0.4deg); }
  100% { transform: translate(0, 0) skewX(0); }
}
@keyframes orbScanFlash {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}
