.tree-node {
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #eee;
  border-radius: 2px;
  background-color: #fff;
}

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

.node-info {
  flex-grow: 1;
}

.node-actions {
  display: flex;
  gap: 4px;
}

.node-children {
  margin-left: 24px;
  min-height: 8px;
  padding: 4px;
  border-left: 1px solid #eee;
}

.sortable-ghost {
  opacity: 0.5;
  background-color: #f8f9fa;
}

.draggable-handle {
  cursor: move;
  color: #999;
  font-size: 16px;
  padding: 0 4px;
}

.node-name {
  font-weight: 500;
  margin-bottom: 2px;
  min-width: 50px;
  padding: 2px 4px;
  border-radius: 2px;
  cursor: text;
}

.node-name:hover {
  background-color: #f8f9fa;
}

.node-name:focus {
  background-color: #fff;
  outline: 1px solid #ddd;
}

.node-link {
  color: #666;
  text-decoration: none;
  font-size: 0.9em;
  display: block;
  margin-bottom: 2px;
}

.node-link:hover {
  text-decoration: underline;
}

.node-comment {
  color: #999;
  font-size: 0.85em;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: #666;
  background-color: #fafafa;
  border: 1px solid #eee;
  border-radius: 2px;
  margin: 2rem 0;
}

.btn {
  padding: 4px 8px;
  font-size: 0.85em;
}

.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger {
  background: none;
  border-width: 1px;
}

.btn-outline-primary {
  color: #666;
  border-color: #ccc;
}

.btn-outline-success {
  color: #666;
  border-color: #ccc;
}

.btn-outline-danger {
  color: #666;
  border-color: #ccc;
}

.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover {
  background-color: #f8f9fa;
  color: #333;
  border-color: #999;
}

.modal-content {
  border-radius: 2px;
}

.modal-header {
  border-bottom: 1px solid #eee;
  padding: 12px 16px;
}

.modal-footer {
  border-top: 1px solid #eee;
  padding: 12px 16px;
}

.form-control {
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 6px 8px;
}

.form-control:focus {
  border-color: #999;
  box-shadow: none;
}

#tree-title {
  display: inline-block;
  min-width: 100px;
  padding: 2px 4px;
  border-radius: 2px;
  cursor: text;
}

#tree-title:hover {
  background-color: #f8f9fa;
}

#tree-title:focus {
  background-color: #fff;
  outline: 1px solid #ddd;
}

.toolbar {
  display: flex;
  gap: 1rem;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.btn-group {
  display: flex;
  gap: 4px;
}

.toolbar .btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.toolbar .btn i {
  font-size: 0.9em;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#shareUrl {
  background-color: #f8f9fa;
  cursor: text;
}

.sync-progress {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
  width: 300px;
}

.sync-message {
  margin-bottom: 8px;
  font-size: 14px;
  color: #28a745;
}

.progress {
  height: 4px;
  background-color: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #28a745;
  transition: width 0.3s ease;
}

.connection-status {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 2px;
  margin-left: 8px;
  transition: opacity 0.3s ease;
}

.connection-status.offline {
  background-color: #ffebee;
  color: #c62828;
}

.connection-status.online {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.connection-status.hidden {
  opacity: 0;
  pointer-events: none;
}

.save-status {
  color: #666;
  font-size: 0.85em;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.save-status.visible {
  opacity: 1;
}

#tree-description {
  color: #666;
  font-size: 0.9em;
  margin-top: 4px;
  min-width: 200px;
  padding: 2px 4px;
  border-radius: 2px;
  cursor: text;
}

#tree-description:hover {
  background-color: #f8f9fa;
}

#tree-description:focus {
  background-color: #fff;
  outline: 1px solid #ddd;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 0.85em;
  text-align: center;
}

.mobile-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 10px;
  background: white;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

.mobile-actions .btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #ddd;
}

.mobile-actions .btn i {
  font-size: 1.2em;
}

@media (max-width: 768px) {
  .toolbar {
    display: none;
  }
  
  .container {
    padding-bottom: 70px;
  }
}

@media (max-width: 576px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
}

@media (min-width: 769px) {
  .hamburger-button {
    display: none;
  }
}

.modal-dialog {
  margin: 1.75rem auto; 
  max-width: 500px; 
  width: auto; 
}