:root {
  --bg-dark: #0a0e1a;
  --bg-card: #141b2e;
  --bg-input: #0f1425;
  --text-primary: #ffffff;
  --text-secondary: #a8b3cf;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --border: #1e2942;
  --border-bright: #2a3f5f;
  --success: #22c55e;
  --warning: #eab308;
  --error: #ef4444;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0a0e1a;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* Header Styles */
header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(20, 27, 46, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 0 1px rgba(99, 102, 241, 0.5);
  position: sticky;
  top: 0;
  z-index: 100;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

header h1 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
  text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
}

.header-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icon-btn {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  min-width: 160px;
  justify-content: center;
  white-space: nowrap;
}

/* Special styling for AI Prompts button */
.icon-btn.prompt-btn {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: promptPulse 3s ease-in-out infinite;
}

.icon-btn.prompt-btn::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.icon-btn.prompt-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  border-color: var(--accent-hover);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5), 0 0 0 2px rgba(99, 102, 241, 0.3);
}

@keyframes promptPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5), 0 0 50px rgba(139, 92, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

.icon-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
  transition: left 0.5s;
}

.icon-btn:hover::before {
  left: 100%;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.2);
}

/* Main Layout */
main {
  flex: 1;
  display: grid;
  grid-template-columns: 500px 1fr;
  gap: 24px;
  padding: 24px;
  max-width: 1800px;
  width: 100%;
  margin: 0 auto;
}

/* Panel Styles */
.panel {
  background: rgba(20, 27, 46, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  max-height: calc(100vh - 200px); /* Limit panel height */
  overflow-y: auto; /* Make the PANEL scrollable */
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
  border-radius: 20px 20px 0 0;
}

.panel:hover {
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: var(--border-bright);
}

.panel h2 {
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.badge {
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  color: white;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Examples Section */
.examples-section {
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(15, 20, 37, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.examples-section h3 {
  font-size: 13px;
  margin: 0 0 12px 0;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.examples-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.example-btn {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.example-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.example-btn:hover::before {
  width: 300px;
  height: 300px;
}

.example-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.example-btn:active {
  transform: translateY(0);
}

/* Textarea Styles */
textarea {
  flex: 1;
  background: rgba(15, 20, 37, 0.8);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 13px;
  resize: none;
  line-height: 1.7;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 300px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(15, 20, 37, 0.95);
  box-shadow: 
    0 0 0 3px rgba(99, 102, 241, 0.15),
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(99, 102, 241, 0.1);
}

textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* Button Styles */
.actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

button {
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  color: white;
  border: none;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 12px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 8px 24px rgba(99, 102, 241, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

button:active {
  transform: translateY(-1px);
}

button.secondary {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  flex: 0.5;
  box-shadow: none;
}

button.secondary::before {
  display: none;
}

button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* --- FIXED CSS: SCROLLING & CONTAINERS --- */
.graph-area {
  background: var(--bg-input);
  border: 2px dashed var(--border);
  border-radius: 12px;
  position: relative;
  overflow: visible; /* Let content flow naturally */
  padding: 0;
  display: block;
  min-height: 400px; /* Minimum height only */
  width: 100%;
}

.graph-container {
  /* This is just a placeholder to hold the canvas */
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  position: relative;
}

/* New class for the wrapper JS creates */
.canvas-wrapper {
  position: relative; /* Establishes coordinate system */
  overflow: hidden; /* CHANGED: hidden instead of visible to enable parent scrolling */
  transform-origin: 0 0;
  background-image: radial-gradient(#3a3f50 1px, transparent 1px);
  background-size: 20px 20px;
  display: block !important; /* Force block display */
  min-width: fit-content; /* Ensure it respects its content size */
  min-height: fit-content;
}

/* Node Styles */
.node {
  position: absolute;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(30, 41, 66, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  cursor: move;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  width: 200px;
  min-height: 80px;
  user-select: none;
  position: relative;
  box-sizing: border-box;
}

/* Isolated/Shared Component Indicator */
.node.isolated {
  border-style: dotted;
  border-width: 3px;
  opacity: 0.75;
  position: relative;
}

.node.isolated::after {
  content: '🔗';
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgba(234, 179, 8, 0.9);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.5);
  border: 2px solid var(--bg-dark);
}

.node.isolated:hover {
  opacity: 1;
  border-style: solid;
}

.node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.node::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 14px 14px 0 0;
}

.node:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.node-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  cursor: pointer;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-label:hover {
  color: var(--accent);
}

.node-type {
  font-size: 9px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.node-tech {
  font-size: 10px;
  color: var(--text-secondary);
  opacity: 0.8;
  font-family: 'Monaco', 'Menlo', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.critical-badge {
  font-size: 14px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* Node Type Colors */
.node.backend { 
  border-color: #6366f1;
  background: linear-gradient(135deg, rgba(30, 41, 66, 0.9) 0%, rgba(42, 47, 74, 0.9) 100%);
  box-shadow: 
    0 4px 20px rgba(99, 102, 241, 0.3),
    0 0 0 1px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(99, 102, 241, 0.1);
}

.node.backend:hover {
  box-shadow: 
    0 12px 40px rgba(99, 102, 241, 0.5),
    0 0 0 2px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(99, 102, 241, 0.2);
}

.node.frontend { 
  border-color: #22c55e;
  background: linear-gradient(135deg, rgba(30, 41, 66, 0.9) 0%, rgba(42, 63, 47, 0.9) 100%);
  box-shadow: 
    0 4px 20px rgba(34, 197, 94, 0.3),
    0 0 0 1px rgba(34, 197, 94, 0.2),
    inset 0 1px 0 rgba(34, 197, 94, 0.1);
}

.node.frontend:hover {
  box-shadow: 
    0 12px 40px rgba(34, 197, 94, 0.5),
    0 0 0 2px rgba(34, 197, 94, 0.4),
    inset 0 1px 0 rgba(34, 197, 94, 0.2);
}

.node.database { 
  border-color: #f97316;
  background: linear-gradient(135deg, rgba(30, 41, 66, 0.9) 0%, rgba(58, 47, 40, 0.9) 100%);
  box-shadow: 
    0 4px 20px rgba(249, 115, 22, 0.3),
    0 0 0 1px rgba(249, 115, 22, 0.2),
    inset 0 1px 0 rgba(249, 115, 22, 0.1);
}

.node.database:hover {
  box-shadow: 
    0 12px 40px rgba(249, 115, 22, 0.5),
    0 0 0 2px rgba(249, 115, 22, 0.4),
    inset 0 1px 0 rgba(249, 115, 22, 0.2);
}

.node.infra { 
  border-color: #eab308;
  background: linear-gradient(135deg, rgba(30, 41, 66, 0.9) 0%, rgba(58, 54, 42, 0.9) 100%);
  box-shadow: 
    0 4px 20px rgba(234, 179, 8, 0.3),
    0 0 0 1px rgba(234, 179, 8, 0.2),
    inset 0 1px 0 rgba(234, 179, 8, 0.1);
}

.node.infra:hover {
  box-shadow: 
    0 12px 40px rgba(234, 179, 8, 0.5),
    0 0 0 2px rgba(234, 179, 8, 0.4),
    inset 0 1px 0 rgba(234, 179, 8, 0.2);
}

.node.external { 
  border-color: #ec4899;
  background: linear-gradient(135deg, rgba(30, 41, 66, 0.9) 0%, rgba(58, 40, 54, 0.9) 100%);
  box-shadow: 
    0 4px 20px rgba(236, 72, 153, 0.3),
    0 0 0 1px rgba(236, 72, 153, 0.2),
    inset 0 1px 0 rgba(236, 72, 153, 0.1);
}

.node.external:hover {
  box-shadow: 
    0 12px 40px rgba(236, 72, 153, 0.5),
    0 0 0 2px rgba(236, 72, 153, 0.4),
    inset 0 1px 0 rgba(236, 72, 153, 0.2);
}

.node.gateway { 
  border-color: #a855f7;
  background: linear-gradient(135deg, rgba(30, 41, 66, 0.9) 0%, rgba(54, 42, 74, 0.9) 100%);
  box-shadow: 
    0 4px 20px rgba(168, 85, 247, 0.3),
    0 0 0 1px rgba(168, 85, 247, 0.2),
    inset 0 1px 0 rgba(168, 85, 247, 0.1);
}

.node.gateway:hover {
  box-shadow: 
    0 12px 40px rgba(168, 85, 247, 0.5),
    0 0 0 2px rgba(168, 85, 247, 0.4),
    inset 0 1px 0 rgba(168, 85, 247, 0.2);
}

.node.service { 
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(30, 41, 66, 0.9) 0%, rgba(42, 47, 74, 0.9) 100%);
  box-shadow: 
    0 4px 20px rgba(59, 130, 246, 0.3),
    0 0 0 1px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(59, 130, 246, 0.1);
}

.node.service:hover {
  box-shadow: 
    0 12px 40px rgba(59, 130, 246, 0.5),
    0 0 0 2px rgba(59, 130, 246, 0.4),
    inset 0 1px 0 rgba(59, 130, 246, 0.2);
}

.node.cache { 
  border-color: #14b8a6;
  background: linear-gradient(135deg, rgba(30, 41, 66, 0.9) 0%, rgba(42, 58, 63, 0.9) 100%);
  box-shadow: 
    0 4px 20px rgba(20, 184, 166, 0.3),
    0 0 0 1px rgba(20, 184, 166, 0.2),
    inset 0 1px 0 rgba(20, 184, 166, 0.1);
}

.node.cache:hover {
  box-shadow: 
    0 12px 40px rgba(20, 184, 166, 0.5),
    0 0 0 2px rgba(20, 184, 166, 0.4),
    inset 0 1px 0 rgba(20, 184, 166, 0.2);
}

.node.queue { 
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(30, 41, 66, 0.9) 0%, rgba(58, 50, 42, 0.9) 100%);
  box-shadow: 
    0 4px 20px rgba(245, 158, 11, 0.3),
    0 0 0 1px rgba(245, 158, 11, 0.2),
    inset 0 1px 0 rgba(245, 158, 11, 0.1);
}

.node.queue:hover {
  box-shadow: 
    0 12px 40px rgba(245, 158, 11, 0.5),
    0 0 0 2px rgba(245, 158, 11, 0.4),
    inset 0 1px 0 rgba(245, 158, 11, 0.2);
}

/* Importance Indicators */
.node.importance-critical {
  border-width: 3px;
  box-shadow: 
    0 6px 24px rgba(239, 68, 68, 0.4),
    0 0 0 1px rgba(239, 68, 68, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.node.importance-critical:hover {
  box-shadow: 
    0 16px 48px rgba(239, 68, 68, 0.6),
    0 0 0 3px rgba(239, 68, 68, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.node.importance-high {
  border-width: 2.5px;
}

.node.importance-low {
  opacity: 0.85;
  border-width: 1.5px;
}

/* Edge Styles */
.edge-line {
  stroke: #6366f1;
  stroke-width: 2.5;
  fill: none;
  stroke-dasharray: 8, 4;
  animation: dash 20s linear infinite;
  opacity: 0.9;
  filter: drop-shadow(0 0 4px rgba(99, 102, 241, 0.6)) drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
  transition: all 0.3s ease;
}

.edge-line:hover {
  stroke-width: 3.5;
  opacity: 1;
}

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

/* Edge Label Styles */
.edge-label-bg {
  fill: rgba(20, 27, 46, 0.95);
  stroke: rgba(99, 102, 241, 0.5);
  stroke-width: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.edge-label {
  fill: #a8b3cf;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  pointer-events: none;
  user-select: none;
}

/* Message Styles */
.message {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.error {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid var(--error);
}

.success {
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid var(--success);
}

/* Stats Section */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
  padding: 20px;
  background: rgba(15, 20, 37, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stat {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.3s ease;
}

.stat:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  text-align: center;
  gap: 12px;
  padding: 40px;
}

.empty-icon {
  font-size: 64px;
  opacity: 0.3;
}

.empty-state p {
  margin: 4px 0;
}

.empty-state strong {
  color: var(--text-primary);
  font-size: 16px;
}

/* Node Animations */
@keyframes nodeEntrance {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes nodeEntranceSlideLeft {
  0% {
    opacity: 0;
    transform: translateX(-60px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes nodeEntranceSlideRight {
  0% {
    opacity: 0;
    transform: translateX(60px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.node-entering {
  animation: nodeEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.node-entering-left {
  animation: nodeEntranceSlideLeft 0.5s ease-out forwards;
}

.node-entering-right {
  animation: nodeEntranceSlideRight 0.5s ease-out forwards;
}

/* Welcome Modal */
.welcome-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.welcome-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.modal-header {
  margin-bottom: 24px;
  text-align: center;
}

.modal-header h2 {
  font-size: 28px;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

.text-to-copy {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 16px 0;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 180px;
  overflow-y: auto;
  flex-shrink: 0;
}

.copy-button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 20px;
}

.copy-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.copy-button.copied {
  background: var(--success);
}

.close-modal-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  width: 100%;
}

.close-modal-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.modal-footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 16px;
}

/* Export Modal Styles */
.export-modal-content {
  max-width: 500px;
}

.export-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.export-format-btn {
  background: rgba(15, 20, 37, 0.8);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.export-format-btn:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.export-icon {
  font-size: 32px;
}

.export-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.export-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

.export-settings {
  background: rgba(15, 20, 37, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.export-settings h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}

.export-setting-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}

.export-setting-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.export-setting-item input[type="range"] {
  flex: 1;
  margin: 0 12px;
}

#scaleValue {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

/* Group Boundaries */
.group-boundary {
  position: absolute;
  border: 2px dashed rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.03);
  pointer-events: none;
  z-index: 0;
  transition: all 0.3s ease;
}

.group-label {
  position: absolute;
  top: -12px;
  left: 16px;
  background: rgba(20, 27, 46, 0.95);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Details Panel */
#detailsPanel {
  position: fixed;
  right: -400px;
  top: 80px;
  width: 380px;
  max-height: calc(100vh - 100px);
  background: rgba(20, 27, 46, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  box-shadow: 
    -8px 0 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(99, 102, 241, 0.2);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#detailsPanel.visible {
  right: 24px;
}

.details-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 20, 37, 0.6);
}

.details-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.close-details-btn {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding: 0;
}

.close-details-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--error);
  color: var(--error);
  transform: rotate(90deg);
}

.details-content {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.detail-value {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

.detail-value code {
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--accent);
  font-family: 'Monaco', 'Menlo', monospace;
}

.detail-value a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.detail-value a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.type-badge,
.importance-badge,
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.type-badge.frontend { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.type-badge.backend { background: rgba(99, 102, 241, 0.2); color: #6366f1; }
.type-badge.database { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.type-badge.cache { background: rgba(20, 184, 166, 0.2); color: #14b8a6; }
.type-badge.queue { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.type-badge.gateway { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.type-badge.service { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.type-badge.external { background: rgba(236, 72, 153, 0.2); color: #ec4899; }
.type-badge.infra { background: rgba(234, 179, 8, 0.2); color: #eab308; }

.importance-badge.critical { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.importance-badge.high { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.importance-badge.medium { background: rgba(234, 179, 8, 0.2); color: #eab308; }
.importance-badge.low { background: rgba(168, 162, 158, 0.2); color: #a8a29e; }

.status-badge.active { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.status-badge.deprecated { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.status-badge.planned { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }

.connections-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.connection-item {
  background: rgba(15, 20, 37, 0.6);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.connection-item:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
}

.connection-node {
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.connection-type {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.connection-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

/* Toolbar Controls */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(15, 20, 37, 0.6);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.toolbar-section {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.toolbar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#searchInput {
  flex: 1;
  background: rgba(15, 20, 37, 0.8);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.3s ease;
}

#searchInput:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(15, 20, 37, 0.95);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

#layoutSelect {
  background: rgba(15, 20, 37, 0.8);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#layoutSelect:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.filter-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.filter-label {
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

#projectInfo {
  display: none;
  padding: 12px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-primary);
}

#projectInfo strong {
  font-weight: 700;
  color: var(--accent);
}

.project-type {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Legend */
.legend {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: rgba(20, 27, 46, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
  max-width: 300px;
}

.legend-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legend-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 2px solid;
}

.legend-color.frontend { border-color: #22c55e; background: rgba(34, 197, 94, 0.2); }
.legend-color.backend { border-color: #6366f1; background: rgba(99, 102, 241, 0.2); }
.legend-color.database { border-color: #f97316; background: rgba(249, 115, 22, 0.2); }
.legend-color.cache { border-color: #14b8a6; background: rgba(20, 184, 166, 0.2); }
.legend-color.external { border-color: #ec4899; background: rgba(236, 72, 153, 0.2); }
.legend-color.infra { border-color: #eab308; background: rgba(234, 179, 8, 0.2); }

/* Footer */
.footer {
  padding: 50px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 60px;
  background: rgba(20, 27, 46, 0.5);
  border-top: 1px solid var(--border);
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.footer-copyright {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.footer-version {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  backdrop-filter: blur(10px);
}

.footer-heart {
  color: #ff6b6b;
  animation: heartbeat 1.5s infinite;
  display: inline-block;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.btn-discover {
  margin-top: 6px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-discover:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

.footer-bottom {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.footer-bottom-text {
  color: var(--text-secondary);
  font-size: 12px;
}

/* Steps Container for Welcome Modal */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: rgba(15, 20, 37, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.step-item:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
  transform: translateX(4px);
}

.step-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.step-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.step-content strong {
  color: var(--accent);
  font-weight: 700;
}

.step-detail {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  opacity: 0.8;
}

.prompt-section {
  margin: 24px 0 8px 0;
  text-align: center;
}

.prompt-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 16px 0;
}

/* Template Help Text */
.template-help-text {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.template-help-text strong {
  color: #a78bfa;
}

/* Template Selector */
.template-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.template-btn {
  background: rgba(15, 20, 37, 0.6);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.template-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.template-btn:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.template-btn:hover::before {
  transform: scaleX(1);
}

.template-btn.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3), 0 4px 12px rgba(99, 102, 241, 0.2);
}

.template-btn.active::before {
  transform: scaleX(1);
}

.template-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.template-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
}

.template-btn:hover .template-name {
  color: var(--accent);
}

.template-btn.active .template-name {
  color: var(--accent);
}

/* Default/General Template Button Styling */
.template-btn-default {
  border-width: 3px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
}

.template-btn-default .template-icon {
  font-size: 32px;
  animation: sparkle 2s ease-in-out infinite;
}

.template-btn-default .template-name {
  font-size: 14px;
}

.template-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

@keyframes sparkle {
  0%, 100% { 
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) brightness(1);
  }
  50% { 
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.6)) brightness(1.2);
  }
}

/* Support Notice in Modal */
.support-notice {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.support-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.support-content strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.support-detail {
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0.8;
}

.coming-soon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  font-size: 13px;
  color: #22c55e;
  font-weight: 600;
}

.coming-soon-icon {
  font-size: 16px;
}

/* Page Support Banner */
.page-support-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  padding: 16px 24px;
  position: relative;
  overflow: hidden;
}

.page-support-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

.banner-content {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-icon {
  font-size: 28px;
  animation: pulse 2s ease-in-out infinite;
}

.banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.banner-text strong {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.banner-subtext {
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0.8;
}

.banner-right {
  display: flex;
  align-items: center;
}

.roadmap-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 20px;
  font-size: 13px;
  color: #22c55e;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
  transition: all 0.3s ease;
}

.roadmap-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.roadmap-icon {
  font-size: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .banner-right {
    width: 100%;
  }
  
  .roadmap-badge {
    width: 100%;
    justify-content: center;
  }
  
  .support-notice {
    padding: 12px;
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  main {
    grid-template-columns: 1fr;
  }
  
  .panel {
    min-height: auto;
  }
  
  .graph-area {
    min-height: 400px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 16px 20px;
  }
  
  header h1 {
    font-size: 20px;
  }
  
  main {
    padding: 16px;
    gap: 16px;
  }
  
  .panel {
    padding: 20px;
  }
  
  .examples-buttons {
    grid-template-columns: 1fr;
  }
  
  .footer {
    padding: 40px 20px;
  }
  
  .footer-copyright {
    font-size: 18px;
  }
  
  .btn-discover {
    padding: 14px 24px;
    font-size: 14px;
  }
}

/* Zoom Controls */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 4px 8px;
  background: rgba(15, 20, 37, 0.8);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.zoom-btn {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  padding: 0;
}

.zoom-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.zoom-btn:active {
  transform: translateY(0);
}

.zoom-level {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  min-width: 50px;
  text-align: center;
  padding: 0 8px;
}

/* Minimap */
.minimap {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 200px;
  height: 150px;
  background: rgba(20, 27, 46, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid var(--border-bright);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(99, 102, 241, 0.2);
  z-index: 1000;
  cursor: pointer;
  transition: all 0.3s ease;
}

.minimap:hover {
  border-color: var(--accent);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.6),
    0 0 0 2px rgba(99, 102, 241, 0.4);
  transform: scale(1.05);
}

.minimap-viewport {
  position: absolute;
  border: 2px solid var(--accent);
  background: rgba(99, 102, 241, 0.2);
  pointer-events: none;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  transition: all 0.1s ease;
}

.minimap::before {
  content: '🗺️ Map';
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
  background: rgba(20, 27, 46, 0.9);
  padding: 4px 8px;
  border-radius: 6px;
}

/* Pan Cursor */
.graph-area.panning {
  cursor: grabbing !important;
}

.graph-area.pan-enabled {
  cursor: grab;
}

.graph-area.pan-enabled .node {
  cursor: move;
}
