/* ============================================================
   Глубина — Интерактивный граф экосистемы (изолированный)
   Все стили Scoped под .glubina-eco, классы с префиксом geco-
   ============================================================ */

/* --- Viewport / Stage / Scene --- */
.glubina-eco .geco-shell {
  position: relative;
  width: 100%;
  max-width: 1504px;
  margin: 0 auto;
}

.glubina-eco .geco-viewport {
  position: relative;
  width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px;
  background: linear-gradient(180deg, rgba(2,10,18,.08), rgba(0,0,0,.06));
  border: 1px solid rgba(0,206,255,.12);
  border-radius: 7px;
  box-shadow: inset 0 0 32px rgba(0,192,255,.02), 0 0 28px rgba(0,0,0,.28);
}

.glubina-eco .geco-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.glubina-eco .geco-scene {
  position: relative;
  width: 1480px;
  height: 760px;
  transform-origin: 0 0;
  isolation: isolate;
}

/* Grid background */
.glubina-eco .geco-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(30,153,190,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,153,190,.06) 1px, transparent 1px),
    linear-gradient(73deg, transparent 0 35%, rgba(0,194,255,.025) 35.3%, transparent 35.9%),
    linear-gradient(105deg, transparent 0 62%, rgba(0,194,255,.023) 62.3%, transparent 62.9%);
  background-size: 50px 50px, 50px 50px, 100% 100%, 100% 100%;
  mask-image: radial-gradient(circle at 54% 48%, #000 20%, rgba(0,0,0,.92) 72%, transparent 100%);
}

/* Conic glow around AI center */
.glubina-eco .geco-scene::after {
  content: "";
  position: absolute;
  left: 790px;
  top: 385px;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -50%);
  z-index: -2;
  pointer-events: none;
  background: conic-gradient(
    from 8deg,
    transparent 0 12%, rgba(0,180,255,.04) 12.2% 13.2%, transparent 13.4% 26%,
    rgba(239,177,69,.032) 26.2% 27.3%, transparent 27.6% 54%,
    rgba(0,180,255,.032) 54.2% 55.2%, transparent 55.5% 100%
  );
  border-radius: 50%;
}

/* --- SVG Lines layer --- */
.glubina-eco .geco-lines {
  position: absolute;
  inset: 0;
  width: 1480px;
  height: 760px;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

/* --- Cards layer --- */
.glubina-eco .geco-cards {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* --- Labels --- */
.glubina-eco .geco-label {
  position: absolute;
  font-size: 10.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #719aaa;
  font-weight: 760;
  text-shadow: 0 0 12px rgba(0,198,255,.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --- Pill --- */
.glubina-eco .geco-pill {
  position: absolute;
  left: 530px;
  top: 718px;
  padding: 8px 16px;
  border: 1px solid rgba(0,198,255,.16);
  border-radius: 999px;
  background: rgba(2,12,22,.76);
  font-size: 10px;
  color: #87a4b3;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --- Bus (vertical cyan line) --- */
.glubina-eco .geco-bus {
  position: absolute;
  width: 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(0,203,255,.05), rgba(0,203,255,.5), rgba(0,203,255,.05));
  border: 1px solid rgba(0,203,255,.22);
  box-shadow: 0 0 18px rgba(0,203,255,.16);
}

/* --- Card base --- */
.glubina-eco .geco-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(7, 20, 38, 0.96), rgba(3, 10, 22, 0.98));
  box-shadow:
    0 15px 32px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 20px rgba(0, 212, 255, 0.08);
  clip-path: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  overflow: visible;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Card top accent line */
.glubina-eco .geco-card::before {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 220, 255, 0.8), transparent);
  box-shadow: 0 0 8px rgba(0, 220, 255, 0.3);
}

.glubina-eco .geco-card::after {
  display: none;
}

.glubina-eco .geco-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0,220,182,.96);
  box-shadow:
    0 18px 40px rgba(0,0,0,.36),
    0 0 24px rgba(0,213,176,.1);
}

/* --- Card variants --- */
.glubina-eco .geco-system {
  height: 72px;
  border-color: rgba(0,190,153,.82);
}

.glubina-eco .geco-ai {
  height: 94px;
  border-color: rgba(0,218,255,.9);
  background: radial-gradient(circle at 50% 45%, rgba(0,218,255,.1), transparent 48%),
    linear-gradient(180deg, rgba(2,17,27,.997), rgba(1,8,15,.999));
  box-shadow:
    0 20px 48px rgba(0,0,0,.44),
    0 0 36px rgba(0,216,255,.15),
    inset 0 0 24px rgba(0,216,255,.03);
}

.glubina-eco .geco-ai::before {
  left: 7%;
  right: 5%;
  background: linear-gradient(90deg, rgba(0,218,255,.05), rgba(0,224,255,.95), rgba(0,218,255,.1));
}

.glubina-eco .geco-ai::after {
  width: 31px;
  height: 20px;
  border-color: rgba(0,224,255,.9);
  opacity: .92;
}

.glubina-eco .geco-child {
  height: 46px;
  padding: 9px 11px;
  background: linear-gradient(180deg, rgba(3,10,18,.985), rgba(2,7,14,.995));
  border-color: rgba(0,168,144,.64);
}

.glubina-eco .geco-child::after {
  width: 18px;
  height: 11px;
  right: 7px;
  top: 7px;
  opacity: .43;
}

.glubina-eco .geco-tiny {
  height: 40px;
  padding: 8px 10px;
}

.glubina-eco .geco-tiny::after {
  width: 18px;
  height: 11px;
  right: 7px;
  top: 7px;
  opacity: .43;
}

/* Gold variant */
.glubina-eco .geco-gold {
  border-color: rgba(208,148,49,.79);
  box-shadow: 0 15px 34px rgba(0,0,0,.32), 0 0 18px rgba(221,159,54,.035);
}

.glubina-eco .geco-gold::before {
  background: linear-gradient(90deg, rgba(255,207,101,.92), rgba(255,207,101,.1));
}

.glubina-eco .geco-gold::after {
  border-color: rgba(255,213,116,.72);
}

.glubina-eco .geco-gold:hover {
  border-color: rgba(236,169,55,.95);
  box-shadow: 0 18px 40px rgba(0,0,0,.35), 0 0 24px rgba(222,158,47,.09);
}

/* --- Icon --- */
.glubina-eco .geco-ico {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  color: #edf9ff;
  border: 1px solid rgba(223,238,255,.8);
  border-radius: 4px;
  box-shadow: 0 0 9px rgba(223,238,255,.25), inset 0 0 9px rgba(223,238,255,.06);
  padding: 4px;
}

.glubina-eco .geco-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glubina-eco .geco-ai .geco-ico {
  color: #00e8ff;
  border-color: #00dfff;
  box-shadow: 0 0 14px rgba(0,224,255,.44), inset 0 0 11px rgba(0,224,255,.12);
}

.glubina-eco .geco-gold .geco-ico {
  color: #ffd06b;
  border-color: #e6ae48;
  box-shadow: 0 0 12px rgba(230,172,69,.33), inset 0 0 8px rgba(230,172,69,.07);
}

/* --- Text --- */
.glubina-eco .geco-copy {
  min-width: 0;
}

.glubina-eco .geco-title {
  font-size: 13px;
  line-height: 1.14;
  font-weight: 750;
  color: #f8fcff;
  text-shadow: 0 0 8px rgba(255,255,255,.05);
}

.glubina-eco .geco-system .geco-title {
  font-size: 15px;
}

.glubina-eco .geco-ai .geco-title {
  font-size: 18.5px;
  color: #00ecff;
  text-shadow: 0 0 15px rgba(0,224,255,.28);
}

.glubina-eco .geco-meta {
  font-size: 10.4px;
  color: #8ba5b6;
  margin-top: 4px;
  line-height: 1.2;
}

.glubina-eco .geco-child .geco-title,
.glubina-eco .geco-tiny .geco-title {
  font-size: 12px;
}

.glubina-eco .geco-gold .geco-title {
  color: #ffd36e;
}

/* --- Orbits --- */
.glubina-eco .geco-orbit {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(0,217,255,.14);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: geco-spin 42s linear infinite;
  box-shadow: 0 0 7px rgba(0,217,255,.02);
}

.glubina-eco .geco-orbit::before {
  content: "";
  position: absolute;
  inset: 17%;
  border: 1px dashed rgba(211,156,54,.16);
  border-radius: 50%;
}

.glubina-eco .geco-orbit.geco-o2 {
  animation-duration: 58s;
  animation-direction: reverse;
  border-color: rgba(218,159,49,.17);
}

.glubina-eco .geco-orbit i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #15d9ff;
  box-shadow: 0 0 14px rgba(21,217,255,.9);
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  font-style: normal;
}

.glubina-eco .geco-orbit.geco-o2 i {
  background: #d79b35;
  box-shadow: 0 0 13px rgba(215,155,53,.65);
}

@keyframes geco-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- SVG flow lines --- */
.glubina-eco .geco-flow,
.glubina-eco .geco-glow {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.glubina-eco .geco-flow {
  stroke: rgba(74,208,255,.76);
  stroke-width: 1.7;
}

.glubina-eco .geco-glow {
  stroke: rgba(74,208,255,.18);
  stroke-width: 7;
  filter: url(#geco-blur);
}

.glubina-eco .geco-gold-flow {
  stroke: rgba(228,171,66,.78);
  stroke-dasharray: 9 7;
}

.glubina-eco .geco-gold-glow {
  stroke: rgba(207,145,42,.11);
}

.glubina-eco .geco-packet {
  fill: #4be8ff;
  filter: url(#geco-pglow);
}

.glubina-eco .geco-packet.geco-gold {
  fill: #e0a13a;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .glubina-eco .geco-orbit { animation: none; }
  .glubina-eco .geco-card { transition: none; }
}

/* ============================================================
   Modal
   ============================================================ */
.glubina-eco .geco-card.geco-system,
.glubina-eco .geco-card.geco-ai,
.glubina-eco .geco-card.geco-clickable {
  cursor: pointer;
}

.glubina-eco .geco-tap-hint {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 206, 255, 0.2);
  border: 1px solid rgba(0, 206, 255, 0.6);
  box-shadow: 0 0 10px rgba(0, 206, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00e5ff;
  pointer-events: none;
  z-index: 10;
  animation: gecoTapBounce 2.2s infinite ease-in-out;
}

.glubina-eco .geco-tap-hint svg {
  width: 14px;
  height: 14px;
  stroke: #00e5ff;
}

@keyframes gecoTapBounce {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(0, 206, 255, 0.35);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 16px rgba(0, 206, 255, 0.85);
    border-color: rgba(0, 240, 255, 1);
  }
}

.glubina-eco .geco-modal,
.geco-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 4, 10, 0.8) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.glubina-eco .geco-modal.geco-is-open,
.geco-modal.geco-is-open {
  display: flex !important;
}

.glubina-eco .geco-dialog,
.geco-dialog {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0,180,255,.08), transparent 34%),
    linear-gradient(180deg, rgba(5,24,40,.995), rgba(1,8,16,.998));
  border: 1px solid rgba(0,206,255,.26);
  box-shadow: 0 28px 80px rgba(0,0,0,.58), 0 0 42px rgba(0,194,255,.08);
  padding: 28px;
  color: #f4fbff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.glubina-eco .geco-dialog::before {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00d9ff, transparent);
}

.glubina-eco .geco-close,
.geco-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 180, 255, 0.35);
  background: rgba(4, 8, 16, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  overflow: hidden;
}

.glubina-eco .geco-close svg,
.geco-close svg {
  display: block;
  stroke: #ffffff;
}

.glubina-eco .geco-close:hover,
.geco-close:hover {
  background: rgba(0, 113, 227, 0.3);
  border-color: rgba(0, 219, 255, 0.7);
  transform: scale(1.06);
}

.glubina-eco .geco-close:hover svg,
.geco-close:hover svg {
  stroke: #00e8ff;
}

.glubina-eco .geco-kicker,
.geco-kicker {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #00d4ff;
  font-weight: 800;
  margin: 0 48px 14px 0;
}

.glubina-eco .geco-modal-heading,
.geco-modal-heading {
  font-size: 26px;
  line-height: 1.15;
  margin: 0 48px 12px 0;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(0, 212, 255, 0.25);
}

.glubina-eco .geco-status,
.geco-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,211,255,.43);
  background: rgba(0,102,151,.25);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #00ddff;
  font-weight: 800;
  margin-bottom: 18px;
}

.glubina-eco .geco-status::before,
.geco-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00dfff;
  box-shadow: 0 0 10px rgba(0,223,255,.65);
}

.glubina-eco .geco-lead,
.geco-lead {
  font-size: 15px;
  line-height: 1.55;
  color: #cbd5e1;
  font-weight: 400;
  margin: 0 0 16px;
}

.glubina-eco .geco-box,
.geco-box {
  border: 1px solid rgba(0,192,255,.22);
  background: rgba(4, 16, 32, 0.75);
  padding: 16px 18px;
  margin-top: 14px;
  border-radius: 14px;
}

.glubina-eco .geco-box h3,
.geco-box h3 {
  font-size: 13px;
  margin: 0 0 10px;
  color: #00d4ff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.glubina-eco .geco-box p,
.geco-box p {
  font-size: 14px;
  line-height: 1.55;
  color: #94a3b8;
  margin: 0;
}

.glubina-eco .geco-list,
.geco-list {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.glubina-eco .geco-list li,
.geco-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #e2e8f0;
}

.glubina-eco .geco-list li::before,
.geco-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00d4ff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

.glubina-eco .geco-actions,
.geco-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.glubina-eco .geco-action,
.geco-action {
  min-height: 46px;
  padding: 12px 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #0071e3 0%, #0099ff 100%);
  cursor: pointer;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  box-shadow: 0 4px 18px rgba(0, 113, 227, 0.35);
  transition: transform .18s ease, filter .18s ease, background .18s ease, box-shadow .18s ease;
}

.glubina-eco .geco-action:hover,
.geco-action:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(0, 113, 227, 0.5);
  transform: translateY(-1px);
}

.glubina-eco .geco-action.geco-secondary,
.geco-action.geco-secondary {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glubina-eco .geco-action.geco-secondary:hover,
.geco-action.geco-secondary:hover {
  color: #00d4ff !important;
  border-color: rgba(0, 212, 255, 0.5) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.2);
}

.glubina-eco .geco-action[hidden] {
  display: none;
}

.glubina-eco .geco-more {
  display: none;
  margin-top: 10px;
  border-left: 2px solid rgba(0,217,255,.32);
  padding: 8px 12px;
  color: #89aabd;
  font-size: 12px;
  line-height: 1.5;
  background: rgba(2,16,28,.45);
}

.glubina-eco .geco-more.geco-is-open {
  display: block;
}

/* Body scroll lock when modal open */
body.geco-modal-open {
  overflow: hidden;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .glubina-eco .geco-viewport {
    overflow: auto;
    padding: 10px;
  }

  .glubina-eco .geco-label {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .glubina-eco .geco-modal {
    padding: 0;
    align-items: stretch;
  }

  .glubina-eco .geco-dialog {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border-left: 0;
    border-right: 0;
    padding: 18px 15px 20px;
  }

  .glubina-eco .geco-kicker {
    margin-bottom: 20px;
  }

  .glubina-eco .geco-modal-heading {
    font-size: 20px;
  }

  .glubina-eco .geco-lead {
    font-size: 13.5px;
  }

  .glubina-eco .geco-box p {
    font-size: 13px;
  }

  .glubina-eco .geco-list li {
    font-size: 11.8px;
  }
}
