/* PDF-safe overrides */
.roadmap-pdf-container.pdf-safe,
.roadmap-pdf-container.pdf-safe .custom-node,
.roadmap-pdf-container.pdf-safe .node-number,
.roadmap-pdf-container.pdf-safe .add-skill-btn {
  background: #ffffff !important;
  color: #1e293b !important;
  box-shadow: none !important;
}











.roadmap-creator-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.creator-header {
  text-align: center;
  margin-bottom: 2rem;
}

.creator-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

.roadmap-title-section {
  margin-bottom: 2rem;
  text-align: center;
}

.roadmap-title-input {
  width: 100%;
  max-width: 600px;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-weight: 500;
}

.roadmap-title-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

/* Fixed Layout */
.creator-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2rem;
  align-items: start;
  min-height: 600px;
}

/* Skill Library - Fixed Sidebar */
.skill-library {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  height: fit-content;
  max-height: 80vh;
  overflow-y: auto;
  position: sticky;
  top: 2rem;
}

/* Roadmap Canvas - Main Content */
.roadmap-canvas {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.library-header {
  margin-bottom: 1.5rem;
}

.library-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
}

.search-box {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: #f8fafc;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

.skill-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skill-list::-webkit-scrollbar {
  width: 6px;
}

.skill-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.skill-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.skill-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.3s ease;
  gap: 1rem;
}

.skill-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.skill-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

.skill-category {
  font-size: 0.75rem;
  color: #3b82f6;
  background: #dbeafe;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  align-self: flex-start;
  font-weight: 500;
}

.skill-description {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.add-skill-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.add-skill-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-icon {
  font-size: 1rem;
  font-weight: bold;
}

/* Canvas Header */
.canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

.canvas-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.canvas-title h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.skill-count {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.canvas-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.clear-btn {
  padding: 0.5rem 1rem;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
  justify-content: center;
}

.download-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.download-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.download-btn.downloading {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.download-btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.success-icon {
  font-weight: bold;
  font-size: 1.1rem;
}

.download-icon {
  font-size: 1.1rem;
}

/* Empty State */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #64748b;
  padding: 3rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: #475569;
  margin-bottom: 0.5rem;
}

.empty-state p {
  margin-bottom: 2rem;
  max-width: 400px;
}

.empty-features {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.feature-icon {
  font-size: 1.5rem;
}

/* Skills Management */
.skills-management {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.skills-management h4 {
  margin: 0 0 1rem 0;
  color: #374151;
  font-size: 1rem;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.managed-skill {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.managed-skill:hover {
  border-color: #cbd5e1;
}

.skill-order {
  background: #3b82f6;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.managed-skill .skill-name {
  flex: 1;
  font-weight: 500;
  color: #374151;
}

.skill-actions {
  display: flex;
  gap: 0.25rem;
}

.skill-actions button {
  padding: 0.25rem 0.5rem;
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

.skill-actions button:hover:not(:disabled) {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.skill-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.skill-actions .remove-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
}

/* Flow Container */
.flow-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.roadmap-pdf-container {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.canvas-tips {
  text-align: center;
  padding: 0.75rem;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #64748b;
}

/* Custom Node Styles */
.custom-node {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  min-width: 180px;
}

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

.node-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 600;
}

.node-remove-btn {
  width: 20px;
  height: 20px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
}

.node-remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.node-label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  text-align: center;
}

.node-category {
  font-size: 0.75rem;
  color: #3b82f6;
  background: #dbeafe;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .roadmap-creator-container {
    padding: 1rem;
  }
  
  .creator-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .skill-library {
    position: static;
    max-height: none;
    order: 1;
  }
  
  .roadmap-canvas {
    order: 2;
    min-height: 400px;
  }

  .empty-features {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .canvas-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .canvas-actions {
    width: 100%;
    justify-content: space-between;
  }

  .skills-management {
    padding: 1rem;
  }

  .managed-skill {
    gap: 0.75rem;
  }

  .skill-actions {
    flex-direction: column;
  }

  .creator-header h1 {
    font-size: 2rem;
  }
}