/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Diagram Styles */
.diagram-container {
  position: relative;
}

.diagram-node {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.4;
  filter: grayscale(100%);
  text-align: center;
  border-radius: 10px;
}

.diagram-node.active {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
  border-radius: 10px;
}

.diagram-node .flex-1.min-w-0 {
    padding: 10px 0;
}

.node-icon {
    text-align: center;
    display: flex;
    margin: 0 auto;
    justify-content: center;
    padding: 10px;
    border-radius: 10px;
}

.zone-right .diagram-node.active {
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

/* Progress Bar Animation */
.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 0 0 0.75rem 0.75rem;
  transition: width 0.3s ease;
}

.zone-right .diagram-node .progress-bar {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.diagram-node.active .progress-bar {
  animation: progressFill 1.5s ease-in-out forwards;
}

@keyframes progressFill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

/* SVG Line Styles */
.connection-line {
  fill: none;
  stroke: #475569;
  stroke-width: 2;
  transition: all 0.3s ease;
  opacity: 0.3;
}

.connection-line.active {
  opacity: 1;
  stroke-dasharray: 8;
  animation: dash 0.8s linear infinite;
}

.connection-line.line-blue.active {
  stroke: #3b82f6;
}

.connection-line.line-emerald.active {
  stroke: #10b981;
}

@keyframes dash {
  to {
    stroke-dashoffset: -16;
  }
}

/* Pulse Animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Form Focus Styles */
input:focus {
  outline: none;
}

/* Mobile Menu Transition */
#mobile-menu {
  transition: all 0.3s ease;
}

/* Utility Classes */
.text-balance {
  text-wrap: balance;
}

#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
