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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #f5f5f7;
  color: #1d1d1f;
}

#sidebar {
  width: 260px;
  background: #ffffff;
  padding: 24px;
  overflow-y: auto;
  border-right: 1px solid #e5e5e7;
  box-shadow: 0 0 20px rgba(0,0,0,0.03);
}

#sidebar h2 {
  margin-bottom: 20px;
  color: #1d1d1f;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.3px;
}

#newMapBtn {
  width: 100%;
  padding: 12px 16px;
  background: #007aff;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

#newMapBtn:hover {
  background: #0066d6;
  transform: scale(1.02);
}

#mapList {
  list-style: none;
}

#mapList li {
  padding: 12px 16px;
  margin-bottom: 8px;
  background: #f5f5f7;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #1d1d1f;
}

#mapList li:hover {
  background: #e8e8ed;
}

#mapList li.active {
  background: #007aff;
  color: white;
}

#main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#toolbar {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e7;
  align-items: center;
}

#toolbar input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #e5e5e7;
  border-radius: 10px;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

#toolbar input:focus {
  border-color: #007aff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

#toolbar button {
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  background: #f5f5f7;
  color: #1d1d1f;
  transition: all 0.2s ease;
}

#toolbar button:hover:not(:disabled) {
  background: #007aff;
  color: white;
}

#toolbar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#addNodeBtn {
  background: #34c759 !important;
  color: white !important;
}

#addNodeBtn:hover:not(:disabled) {
  background: #2db14f !important;
}

#deleteMapBtn {
  background: #ff3b30 !important;
  color: white !important;
}

#deleteMapBtn:hover:not(:disabled) {
  background: #e6352b !important;
}

#canvas {
  flex: 1;
  background: #f5f5f7;
  cursor: grab;
}

#canvas:active {
  cursor: grabbing;
}

#nodeEditor {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
  display: flex;
  gap: 12px;
  z-index: 1000;
}

#nodeEditor.hidden {
  display: none;
}

#nodeEditor input {
  padding: 12px 16px;
  border: 1px solid #e5e5e7;
  border-radius: 10px;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 15px;
  width: 220px;
  outline: none;
}

#nodeEditor input:focus {
  border-color: #007aff;
  background: #fff;
}

#nodeEditor button {
  padding: 12px 24px;
  background: #007aff;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

#nodeEditor button:hover {
  background: #0066d6;
}

/* Scrollbar styling */
#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-track {
  background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
  background: #c7c7cc;
  border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background: #a1a1a6;
}
