/* ============================================================
   EVOLVE OS — CORE UI STYLESHEET
   (Simple, stable orb + background SVG)
   ============================================================ */

/* ============================================================
   1. BASE RESET
   ============================================================ */
body {
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 0;
}

/* ============================================================
   2. ORB (LAUNCHER)
   ============================================================ */
#evolve-orb {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9999;

  /* glowing transparent core */
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.35), transparent 60%),
    url('/assets/icons/evolve-logo.svg') center center no-repeat;
  background-size: 60% 60%; /* logo always stays inside orb */

  box-shadow:
    0 0 18px rgba(147, 197, 253, 0.9),
    0 0 40px rgba(59, 130, 246, 0.7),
    0 0 70px rgba(129, 140, 248, 0.6);

  display: flex;
  align-items: center;
  justify-content: center;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    transform 0.2s ease-out,
    box-shadow 0.2s ease-out,
    background 0.2s ease-out;

  animation: evolve-orb-pulse 4s ease-in-out infinite;

  overflow: hidden; /* hard clamp: nothing escapes the orb */
}

/* ORB HOVER */
#evolve-orb:hover {
  transform: scale(1.06);
  box-shadow:
    0 0 24px rgba(191, 219, 254, 1),
    0 0 55px rgba(59, 130, 246, 0.9),
    0 0 90px rgba(129, 140, 248, 0.8);
}

/* ORB DRAGGING */
#evolve-orb.is-dragging {
  transition: none;
  box-shadow:
    0 0 30px rgba(248, 250, 252, 1),
    0 0 80px rgba(59, 130, 246, 1);
}

/* ============================================================
   3. PANEL CONTAINER
   ============================================================ */
.evolve-panel {
  position: fixed;
  background: rgba(20, 20, 30, 0.85);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  min-width: 320px;
  max-width: 480px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  z-index: 9998;
}

.evolve-panel.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ============================================================
   4. PANEL HEADER
   ============================================================ */
.evolve-panel-header {
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #cfcfff;
}

/* ============================================================
   5. TABS
   ============================================================ */
.evolve-panel-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow-x: auto;
}

.evolve-panel-tab {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #ccc;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.evolve-panel-tab.is-active {
  background: rgba(120,80,255,0.45);
  color: #fff;
}

/* ============================================================
   6. PANEL CONTENT
   ============================================================ */
.evolve-panel-content {
  padding: 14px;
  max-height: 360px;
  overflow-y: auto;
  color: #e5e5e5;
}

/* ============================================================
   7. ORB GLOW STATES
   ============================================================ */
#evolve-orb.evolve-orb--idle {
  background:
    radial-gradient(circle at 30% 30%, #4ade80, #065f46),
    url('/assets/icons/evolve-logo.svg') center center no-repeat;
  background-size: 60% 60%;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
}

#evolve-orb.evolve-orb--active {
  background:
    radial-gradient(circle at 30% 30%, #60a5fa, #1d4ed8),
    url('/assets/icons/evolve-logo.svg') center center no-repeat;
  background-size: 60% 60%;
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.8);
}

#evolve-orb.evolve-orb--warning {
  background:
    radial-gradient(circle at 30% 30%, #facc15, #92400e),
    url('/assets/icons/evolve-logo.svg') center center no-repeat;
  background-size: 60% 60%;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.9);
}

#evolve-orb.evolve-orb--critical {
  background:
    radial-gradient(circle at 30% 30%, #f97373, #7f1d1d),
    url('/assets/icons/evolve-logo.svg') center center no-repeat;
  background-size: 60% 60%;
  box-shadow: 0 0 22px rgba(248, 113, 113, 1);
  transform: scale(1.03);
}

#evolve-orb.evolve-orb--scanning {
  background:
    radial-gradient(circle at 30% 30%, #22d3ee, #0f172a),
    url('/assets/icons/evolve-logo.svg') center center no-repeat;
  background-size: 60% 60%;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.9);
  animation: evolve-orb-pulse 1.2s infinite ease-in-out;
}

/* ============================================================
   8. ORB PULSE ANIMATION
   ============================================================ */
@keyframes evolve-orb-pulse {
  0% {
    transform: scale(1);
    box-shadow:
      0 0 18px rgba(147, 197, 253, 0.9),
      0 0 40px rgba(59, 130, 246, 0.7),
      0 0 70px rgba(129, 140, 248, 0.6);
  }
  50% {
    transform: scale(1.03);
    box-shadow:
      0 0 26px rgba(191, 219, 254, 1),
      0 0 60px rgba(59, 130, 246, 0.9),
      0 0 100px rgba(129, 140, 248, 0.9);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 0 18px rgba(147, 197, 253, 0.9),
      0 0 40px rgba(59, 130, 246, 0.7),
      0 0 70px rgba(129, 140, 248, 0.6);
  }
}
