@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  /* Canvas and Surface colors - dark theme */
  --color-canvas: #0a0a0b;
  --color-surface: #18181b;
  --color-surface-raised: #27272a;
  --color-border: #3f3f46;
  --color-border-subtle: #52525b;

  /* Text colors */
  --color-text-primary: #fafafa;
  --color-text-secondary: #a1a1aa;
  --color-text-muted: #71717a;

  /* Accent colors */
  --color-accent-blue: #3b82f6;
  --color-accent-green: #22c55e;
  --color-accent-yellow: #eab308;
  --color-accent-red: #ef4444;
  --color-accent-purple: #a855f7;
  --color-accent-orange: #f97316;

  /* Status colors */
  --color-status-pending: #71717a;
  --color-status-active: #eab308;
  --color-status-completed: #22c55e;
  --color-status-failed: #ef4444;
}

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

html, body, #root {
  height: 100%;
  width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* React Flow customizations */
.react-flow {
  background-color: var(--color-surface) !important;
}

.react-flow__node {
  font-size: 12px;
}

.react-flow__edge-path {
  stroke: var(--color-border);
  stroke-width: 2;
}

.react-flow__edge.selected .react-flow__edge-path {
  stroke: var(--color-accent-blue);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Custom utility classes */
.backdrop-blur-md {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Animation utilities */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.2s ease-out;
}

.animate-slideIn {
  animation: slideIn 0.2s ease-out;
}

/* Monaco Editor decorations for changed lines */
.monaco-changed-line {
  background-color: rgba(34, 197, 94, 0.1) !important;
}

.monaco-changed-glyph {
  background-color: rgba(34, 197, 94, 0.3) !important;
  width: 5px !important;
  margin-left: 3px;
}
