:root {
      --bg-grad-1: #e4f2fe;
      --bg-grad-2: #cae5ff;
      --bg-grad-3: #d8ecff;
    }

    * {
      box-sizing: border-box;
      user-select: none;
      -webkit-font-smoothing: antialiased;
    }

    body {
      margin: 0;
      padding: 0;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background: linear-gradient(135deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 52%, var(--bg-grad-3) 100%);
      min-height: 100vh;
      width: 100vw;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      color: #1e293b;
    }

    /* Contenedor responsivo que centra y escala el lienzo 1000x740 sin recortar nada */
    .viewport-host {
      position: relative;
      width: 100%;
      height: calc(100vh - 115px);
      min-height: 420px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      padding: 12px;
    }

    body.clean-mode .viewport-host {
      height: 100vh;
      padding: 0;
    }

    /* Escenario con sistema de coordenadas absoluto 1000x740 compartido entre SVG y Nodos */
    .stage {
      position: relative;
      width: 1000px;
      height: 740px;
      flex-shrink: 0;
      transform-origin: center center;
      border-radius: 32px;
      background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.62) 0%, rgba(206, 232, 255, 0.38) 58%, rgba(182, 218, 252, 0.52) 100%);
      box-shadow:
        0 28px 65px -15px rgba(15, 75, 145, 0.16),
        inset 0 1.5px 3px rgba(255, 255, 255, 0.95);
      overflow: hidden;
    }

    body.clean-mode .ui-controls {
      opacity: 0;
      pointer-events: none;
      transform: translateY(20px);
    }

    body.clean-mode .stage {
      border-radius: 0;
      box-shadow: none;
      background: transparent;
    }

    /* Capa SVG de cables exactamente 1000x740 */
    .cables-svg {
      position: absolute;
      top: 0;
      left: 0;
      width: 1000px;
      height: 740px;
      pointer-events: none;
      z-index: 6;
      overflow: visible;
    }

    /* Sombra suave proyectada por los cables orgánicos */
    .cable-shadow {
      fill: none;
      stroke: rgba(12, 92, 188, 0.18);
      stroke-width: 6.5;
      stroke-linecap: round;
      filter: blur(4px);
      transform: translateY(7px);
    }

    /* Guía sutil de fondo del cable */
    .cable-track {
      fill: none;
      stroke: rgba(11, 132, 255, 0.11);
      stroke-width: 4.5;
      stroke-linecap: round;
      opacity: 0;
      transition: opacity 0.45s ease;
    }

    .cable-track.visible {
      opacity: 1;
    }

    /* Cable principal orgánico */
    .cable-active {
      fill: none;
      stroke: url(#cableMainGrad);
      stroke-width: 4.5;
      stroke-linecap: round;
      filter: drop-shadow(0px 3px 6px rgba(11, 132, 255, 0.32));
    }

    /* Pulso de energía luminoso que viaja suavemente por la curva */
    .cable-pulse {
      fill: none;
      stroke: url(#pulseGlowGrad);
      stroke-width: 5.5;
      stroke-linecap: round;
      filter: drop-shadow(0 0 8px #00e1ff) drop-shadow(0 0 14px #0b84ff);
      opacity: 0;
    }

    /* Ancla exacta en coordenadas (x, y) del escenario 1000x740 */
    .node-anchor {
      position: absolute;
      transform: translate(-50%, -50%);
      z-index: 12;
      cursor: pointer;
    }

    /* Contenedor con física de aparición y flotación orgánica */
    .node-pop {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      transform: scale(0) translateY(16px);
      opacity: 0;
      will-change: transform, opacity;
    }

    /* Respiración orgánica continua una vez que el nodo está activo */
    @keyframes organicFloat {
      0%, 100% { transform: translateY(0px) rotate(0deg); }
      50% { transform: translateY(-5px) rotate(0.35deg); }
    }

    .organic-breathe {
      animation: organicFloat 4.6s ease-in-out infinite;
    }

    /* Pedestal translúcido 3D del Hub Central */
    .pedestal-hub {
      position: absolute;
      width: 204px;
      height: 204px;
      border-radius: 48px;
      background: linear-gradient(145deg, rgba(222, 241, 255, 0.88) 0%, rgba(160, 207, 250, 0.76) 100%);
      box-shadow:
        16px 26px 38px rgba(28, 92, 168, 0.24),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -3px 8px rgba(68, 142, 228, 0.34);
      border: 1.5px solid rgba(255, 255, 255, 0.72);
      z-index: 1;
    }

    /* Bloque 3D Central (Logo A) */
    .tile-hub {
      position: relative;
      width: 164px;
      height: 164px;
      border-radius: 36px;
      background: linear-gradient(145deg, #f7fbff 0%, #e1f1ff 55%, #cde7ff 100%);
      box-shadow:
        8px 14px 24px rgba(15, 82, 165, 0.26),
        0 0 24px rgba(56, 189, 255, 0.65),
        inset 0 0 0 2.5px #ffffff,
        inset 0 0 18px rgba(56, 189, 255, 0.55),
        inset -4px -6px 12px rgba(55, 148, 240, 0.32);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 3;
      transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
    }

    .node-anchor:hover .tile-hub {
      transform: scale(1.045) translateY(-3px);
      box-shadow:
        10px 18px 28px rgba(15, 82, 165, 0.32),
        0 0 34px rgba(30, 175, 255, 0.9),
        inset 0 0 0 3px #ffffff,
        inset 0 0 24px rgba(56, 189, 255, 0.75);
    }

    /* Pedestal translúcido de los 6 nodos satélites */
    .pedestal-sat {
      position: absolute;
      width: 152px;
      height: 152px;
      border-radius: 36px;
      background: linear-gradient(145deg, rgba(224, 242, 255, 0.76) 0%, rgba(170, 212, 251, 0.66) 100%);
      box-shadow:
        12px 20px 30px rgba(40, 102, 175, 0.19),
        inset 0 1.5px 3px rgba(255, 255, 255, 0.85),
        inset -2px -4px 8px rgba(95, 158, 228, 0.28);
      border: 1.5px solid rgba(255, 255, 255, 0.65);
      z-index: 1;
    }

    /* Bloque blanco 3D extruido de los satélites */
    .tile-sat {
      position: relative;
      width: 120px;
      height: 120px;
      border-radius: 28px;
      background: linear-gradient(145deg, #ffffff 0%, #f6faff 65%, #e7f3ff 100%);
      box-shadow:
        5px 9px 0px #c5ddf6,
        10px 18px 26px rgba(22, 82, 155, 0.22),
        inset 0 2px 4px #ffffff,
        inset -2px -3px 6px rgba(165, 205, 245, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 3;
      transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
    }

    .node-anchor:hover .tile-sat {
      transform: translateY(-5px) scale(1.045);
      box-shadow:
        5px 11px 0px #b8d5f3,
        14px 24px 32px rgba(15, 82, 165, 0.28),
        0 0 22px rgba(56, 189, 255, 0.45),
        inset 0 2px 4px #ffffff;
    }

    /* Destello de energía cuando el cable conecta con el nodo */
    .tile-sat.energized {
      animation: nodeFlash 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    @keyframes nodeFlash {
      0% {
        box-shadow:
          5px 9px 0px #c5ddf6,
          0 0 0 0 rgba(11, 132, 255, 0.75),
          0 0 36px rgba(56, 189, 255, 0.95),
          inset 0 0 18px rgba(56, 189, 255, 0.55);
      }
      100% {
        box-shadow:
          5px 9px 0px #c5ddf6,
          0 0 0 20px rgba(11, 132, 255, 0),
          10px 18px 26px rgba(22, 82, 155, 0.22),
          inset 0 2px 4px #ffffff;
      }
    }

    /* Puntos luminosos de conexión en el SVG (Puertos exactos donde nacen y terminan los cables) */
    .socket-dot {
      fill: #ffffff;
      stroke: #0b84ff;
      stroke-width: 2.5;
      filter: drop-shadow(0 0 6px #00d4ff) drop-shadow(0 0 10px #0077ff);
      opacity: 0;
      transform-box: fill-box;
      transform-origin: center;
      transform: scale(0);
      transition: opacity 0.3s ease, transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .socket-dot.active {
      opacity: 1;
      transform: scale(1);
    }

    /* Onda expansiva desde el nodo central */
    .hub-ripple {
      position: absolute;
      width: 164px;
      height: 164px;
      border-radius: 36px;
      border: 2.5px solid rgba(11, 132, 255, 0.55);
      pointer-events: none;
      opacity: 0;
      z-index: 0;
    }

    .hub-ripple.animate {
      animation: rippleOut 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes rippleOut {
      0% {
        transform: scale(0.96);
        opacity: 0.85;
      }
      100% {
        transform: scale(1.46);
        opacity: 0;
      }
    }
    /* Integrado como escena de la portada de AUTARIZ. */
    html, body { width: 100%; height: 100%; min-height: 0; background: transparent; }
    .viewport-host, body.clean-mode .viewport-host { width: 100%; height: 100%; min-height: 0; padding: 0; }
    .ui-controls { display: none !important; }
    .stage, body.clean-mode .stage { background: transparent; box-shadow: none; border-radius: 0; }
    .hidden { display: none !important; }
    @media (prefers-reduced-motion: reduce) {
      .organic-breathe { animation: none; }
    }
