/* ==========================================================================
   FrontTerrain - Minimalist & Aesthetic 3D Ecosystem Canvas
   ========================================================================== */

.hero-aura-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  perspective: 1200px;
  user-select: none;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Background Soft Atmosphere Glow */
.ft-aura-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
  transition: opacity 0.5s ease;
  filter: blur(48px);
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

[data-theme="dark"] .ft-aura-wrapper {
  opacity: 0.65;
}

/* Container Wrapper - Completely Seamless & Borderless */
.ecosystem-stage-container {
  position: relative;
  width: 100%;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  overflow: visible;
}

[data-theme="light"] .ecosystem-stage-container,
[data-theme="dark"] .ecosystem-stage-container {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Interactive Canvas */
.ecosystem-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: grab;
  touch-action: none;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  transition: cursor 0.15s ease;
}

.ecosystem-canvas:active,
.ecosystem-canvas:focus,
.ecosystem-canvas:focus-visible {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: grabbing;
}

.ecosystem-canvas.hovering-node {
  cursor: pointer;
}

/* Minimalist Floating Tooltip HUD */
.ecosystem-tooltip {
  position: absolute;
  z-index: 25;
  pointer-events: auto;
  min-width: 230px;
  max-width: 260px;
  background: rgba(15, 20, 28, 0.82);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 25px rgba(59, 130, 246, 0.12);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

[data-theme="light"] .ecosystem-tooltip {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08), 0 0 20px rgba(37, 99, 235, 0.06);
}

.ecosystem-tooltip.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.ecosystem-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.ecosystem-tooltip-title {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text, #f7f9fa);
}

.ecosystem-tooltip-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-blue, #38bdf8);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.ecosystem-tooltip-subtitle {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted, #9ba4b4);
  margin-bottom: 0.35rem;
}

.ecosystem-tooltip-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary, #9ba4b4);
  margin-bottom: 0.65rem;
}

.ecosystem-tooltip-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  background: var(--surface-hover, rgba(255, 255, 255, 0.08));
  color: var(--text, #ffffff);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  text-decoration: none;
  transition: all 0.18s ease;
}

.ecosystem-tooltip-action:hover {
  background: var(--text, #ffffff);
  color: var(--bg, #08090c);
  border-color: transparent;
  transform: translateY(-1px);
}

/* Minimalist Glass Control Pill */
.ecosystem-toolbar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.4rem;
  border-radius: 9999px;
  background: rgba(15, 20, 28, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  opacity: 0.85;
  transition: opacity 0.25s ease, transform 0.2s ease, border-color 0.2s ease;
}

.ecosystem-toolbar:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .ecosystem-toolbar {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.ecosystem-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 9999px;
  color: var(--text-muted, #9ba4b4);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.ecosystem-toolbar-btn:hover {
  color: var(--text, #ffffff);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .ecosystem-toolbar-btn:hover {
  color: var(--text, #0f1419);
  background: rgba(0, 0, 0, 0.04);
}

.ecosystem-toolbar-btn.is-active {
  color: var(--text, #ffffff);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

[data-theme="light"] .ecosystem-toolbar-btn.is-active {
  color: #0f1419;
  background: rgba(0, 0, 0, 0.07);
}

.btn-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted, #9ba4b4);
  transition: all 0.2s ease;
}

.ecosystem-toolbar-btn.is-active .btn-dot {
  background: var(--accent-blue, #38bdf8);
  box-shadow: 0 0 6px var(--accent-blue, #38bdf8);
}

.ecosystem-toolbar-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0.1rem;
}

[data-theme="light"] .ecosystem-toolbar-divider {
  background: rgba(0, 0, 0, 0.08);
}

/* Screen reader accessible list */
.ecosystem-sr-nav {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero-aura-stage,
  .ecosystem-stage-container {
    min-height: 460px;
    height: 460px;
  }
}

@media (max-width: 768px) {
  .hero-aura-stage,
  .ecosystem-stage-container {
    min-height: 400px;
    height: 400px;
  }
  .ecosystem-toolbar {
    bottom: 8px;
    padding: 0.2rem 0.35rem;
    gap: 0.2rem;
  }
  .ecosystem-toolbar-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.68rem;
  }
}

@media (max-width: 480px) {
  .hero-aura-stage,
  .ecosystem-stage-container {
    min-height: 350px;
    height: 350px;
  }
  .ecosystem-toolbar-btn span:not(.btn-dot) {
    display: none;
  }
  .ecosystem-toolbar-btn {
    padding: 0.35rem 0.45rem;
  }
}
