.leaflet-control-container {
  display: none !Important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden;
}

/* 全屏地图 */
#map {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* 顶部工具栏 */
.top-toolbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0;
  height: 40px;
  overflow: hidden;
}

.tool-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #555;
  flex-shrink: 0;
}

.tool-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.tool-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.tool-btn:only-child {
  border-radius: 6px;
}

.tool-btn:hover {
  background: #f0f0f0;
  color: #667eea;
}

.tool-btn.active {
  background: #667eea;
  color: white;
}

/* 搜索栏 */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 4px 8px;
  height: 40px;
}

.control-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.btn-primary {
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 加载遮罩 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-content {
  text-align: center;
  color: white;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-content p {
  font-size: 1.1em;
  font-weight: 500;
}

#searchInput {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 12px;
  font-size: 0.95em;
  background: transparent;
  min-width: 0;
}

.search-btn:hover {
  background: #f0f0f0;
  color: #667eea;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1001;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f8f9fa;
}

.search-result-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.search-result-address {
  font-size: 0.85em;
  color: #666;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: #999;
}

/* 通知提示 */
.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  background: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification.hide {
  animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.notification-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.notification-message {
  font-size: 0.9em;
  color: #666;
}

.notification.error .notification-icon {
  color: #f44336;
}

.notification.success .notification-icon {
  color: #4caf50;
}

.notification.warning .notification-icon {
  color: #ff9800;
}

.notification.info .notification-icon {
  color: #2196f3;
}

/* 响应式 */
/* 响应式 */
@media (max-width: 768px) {
  .top-toolbar {
    left: 10px;
    top: 10px;
    transform: none;
    flex-wrap: wrap;
    max-width: calc(100% - 20px);
  }

  .search-bar {
    min-width: 200px;
    max-width: 100%;
  }

  .control-panel {
    right: 10px;
    top: 10px;
  }

  .notification {
    right: 10px;
    top: 70px;
    min-width: calc(100% - 20px);
  }
}

/* 隐藏高德地图 logo 和版权信息 */
.amap-logo,
.amap-copyright {
  display: none !important;
}

/* 左侧图层面板 */
.layer-panel {
  position: fixed;
  left: 20px;
  top: 80px;
  width: 280px;
  max-height: calc(100vh - 100px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.layer-header {
  padding: 8px 8px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.layer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.layer-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.layer-batch-actions {
  display: flex;
  gap: 4px;
}

.layer-batch-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s;
}

.layer-batch-btn:hover {
  background: #f0f0f0;
  color: #667eea;
}

.layer-count {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.layer-empty {
  padding: 32px 16px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

.layer-list {
  padding-top: 4px;
  padding-left: 4px;
  padding-right: 4px;
}

.layer-item {
  background: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 4px;
  transition: all 0.2s;
  padding-left: 4px;
  padding-right: 4px;
  border: 2px solid transparent;
}

.layer-item:hover {
  background: #f0f0f0;
}

.layer-item.active {
  background: #e8eeff;
  border: 2px solid #667eea;
}

.layer-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.layer-item-name {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  flex: 1;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.layer-item-name input {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 500;
}

.layer-item-actions {
  display: flex;
  gap: 4px;
}

.layer-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s;
}

.layer-action-btn:hover {
  background: white;
  color: #667eea;
}

.layer-action-btn.delete:hover {
  color: #f44336;
}

/* 响应式 */
@media (max-width: 768px) {
  .layer-panel {
    left: 10px;
    top: 70px;
    width: 240px;
  }
}

/* 自定义对话框 */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.dialog-box {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  min-width: 320px;
  max-width: 480px;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.dialog-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
}

.dialog-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.dialog-body {
  padding: 24px;
}

.dialog-message {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.dialog-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.dialog-input:focus {
  border-color: #667eea;
}

.dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.dialog-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.dialog-btn-cancel {
  background: #f5f5f5;
  color: #666;
}

.dialog-btn-cancel:hover {
  background: #e0e0e0;
}

.dialog-btn-confirm {
  background: #667eea;
  color: white;
}

.dialog-btn-confirm:hover {
  background: #5568d3;
}

.dialog-btn-danger {
  background: #f44336;
  color: white;
}

.dialog-btn-danger:hover {
  background: #d32f2f;
}