/* octoMind — Modern Glassmorphism CSS Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700&display=swap');

:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(30, 41, 59, 0.75);
  --bg-card-hover: rgba(51, 65, 85, 0.9);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(99, 102, 241, 0.5);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --backdrop-blur: blur(16px);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* App Header & Navbar */
.app-header {
  height: 60px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  font-weight: 600;
}

/* Top Toolbar */
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: var(--backdrop-blur);
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border: none;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5);
}

.divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  margin: 0 4px;
}

/* SVG Canvas Workspace */
.canvas-container {
  flex: 1;
  position: relative;
  background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0b0f19 100%);
  overflow: hidden;
}

#svgCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  z-index: 1;
}

#svgCanvas:active {
  cursor: grabbing;
}

/* Big Center Welcome Overlay (+ Yeni Zihin) */
.center-welcome-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  z-index: 80;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.center-welcome-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-color);
  padding: 36px 48px;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.2);
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.big-plus-btn {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  border: none;
  color: #ffffff;
  font-size: 48px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5), 0 0 40px rgba(6, 182, 212, 0.4);
  transition: all 0.25s ease;
}

.big-plus-btn:hover {
  transform: scale(1.12) rotate(90deg);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.7), 0 0 60px rgba(6, 182, 212, 0.6);
}

.welcome-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 6px;
}

.welcome-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* Floating Zoom & Controls */
.floating-controls {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: var(--backdrop-blur);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 50;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
}

/* Node Context Bar & Direct Input Editor */
.node-context-bar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: var(--backdrop-blur);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 50;
}

.node-text-input {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  width: 200px;
  outline: none;
  transition: all 0.2s ease;
  user-select: text;
}

.node-text-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
  width: 240px;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease;
}

.color-dot:hover {
  transform: scale(1.25);
  border-color: #ffffff;
}

/* Side Drawer (Notes & Outline) */
.side-drawer {
  position: absolute;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100%;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: var(--backdrop-blur);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 90;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-drawer.open {
  right: 0;
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

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

.note-textarea {
  width: 100%;
  height: 320px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  user-select: text;
}

.note-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Outline Tree Drawer */
.outline-list {
  list-style: none;
}

.outline-item {
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.outline-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.outline-item.selected {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  font-weight: 600;
}

/* Inline Node Editor Overlay */
.inline-node-editor {
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  border: 2px solid var(--accent-cyan);
  border-radius: 8px;
  padding: 4px 10px;
  text-align: center;
  font-weight: 600;
  outline: none;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.5);
  z-index: 200;
  user-select: text;
}

/* Hotkey Bar Footer */
.hotkey-bar {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: var(--backdrop-blur);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  pointer-events: none;
  z-index: 50;
}

.kbd {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
}
