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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
  background: #F5F5F5;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.city-selector {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

.header-center {
  display: flex;
  gap: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 0.75rem;
  opacity: 0.8;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.header-right {
  display: flex;
  gap: 0.5rem;
}

.mode-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn:hover {
  background: rgba(255,255,255,0.2);
}

.mode-btn.active {
  background: white;
  color: #667eea;
  border-color: white;
}

/* Main content */
.main-content {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Vehicle toolbar - MASSIVELY EXPANDED! */
.vehicle-toolbar {
  width: 480px;
  background: rgba(255,255,255,0.97);
  padding: 2.5rem;
  overflow-y: auto;
  box-shadow: 3px 0 15px rgba(0,0,0,0.12);
  z-index: 10;
}

.toolbar-section {
  margin-bottom: 3rem;
}

.toolbar-section h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: #333;
  font-weight: 700;
  padding-bottom: 1rem;
  border-bottom: 3px solid #E0E0E0;
  letter-spacing: -0.02em;
}

.vehicle-btn {
  width: 100%;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  border-radius: 14px;
  border: 2px solid #E0E0E0;
  background: white;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vehicle-btn:hover {
  border-color: #667eea;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
}

.vehicle-btn.active {
  border-color: #667eea;
  background: linear-gradient(135deg, #f0f3ff 0%, #fef5ff 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
  transform: translateY(-2px);
}

.vehicle-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.vehicle-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.vehicle-cost {
  font-size: 1rem;
  color: #666;
  font-weight: 600;
}

.layer-selector {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 1.75rem;
  border-radius: 14px;
  margin-top: 1.5rem;
  border: 2px solid #dee2e6;
}

.layer-selector h3 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1.25rem;
  font-size: 1.2rem;
}

.layer-btn {
  width: 100%;
  padding: 1.125rem;
  margin-bottom: 0.875rem;
  border-radius: 12px;
  border: 2px solid #E0E0E0;
  background: white;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.layer-btn:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.layer-btn.active {
  border-color: #667eea;
  background: linear-gradient(135deg, #f0f3ff 0%, #fef5ff 100%);
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

/* Map canvas */
.map-canvas {
  flex: 1;
  cursor: crosshair;
  background: #F5F5F5;
}

/* Route panel */
.route-panel {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 250px;
  background: rgba(255,255,255,0.95);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 5;
}

.route-panel h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: #333;
}

.route-info p {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #666;
}

.delete-btn {
  width: 100%;
  padding: 0.5rem;
  margin-top: 1rem;
  border-radius: 6px;
  border: none;
  background: #ff4757;
  color: white;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}

.delete-btn:hover {
  background: #ff3838;
}

/* Navigation controls */
.nav-controls {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.95);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 5;
}

.nav-hint {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-keys {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #666;
}

.nav-keys span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Zoom controls */
.zoom-controls {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.95);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 5;
}

.zoom-controls button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #667eea;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-controls button:hover {
  background: #5568d3;
}

.zoom-controls input[type="range"] {
  width: 100px;
}

/* Bottom toolbar */
.bottom-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: white;
  border-top: 2px solid #E0E0E0;
  flex-wrap: wrap;
  gap: 1rem;
}

.build-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.complete-btn, .cancel-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
}

.complete-btn {
  background: #4CAF50;
  color: white;
}

.complete-btn:hover {
  background: #45a049;
}

.cancel-btn {
  background: #f44336;
  color: white;
}

.cancel-btn:hover {
  background: #da190b;
}

.hint {
  font-size: 0.875rem;
  color: #666;
  font-style: italic;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #666;
  cursor: pointer;
}

.toggle-label input[type="checkbox"] {
  cursor: pointer;
}

.street-count {
  font-size: 0.875rem;
  color: #4CAF50;
  font-weight: 600;
}

/* Footer */
.footer {
  text-align: center;
  padding: 0.5rem;
  background: #f8f9fa;
  border-top: 1px solid #E0E0E0;
  font-size: 0.875rem;
  color: #666;
}

.footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

.tagline {
  margin-top: 0.25rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .vehicle-toolbar {
    width: 320px;
    padding: 1.5rem;
  }
  
  .toolbar-section h3 {
    font-size: 1.15rem;
  }
  
  .vehicle-btn {
    padding: 1.25rem;
  }
  
  .vehicle-icon {
    font-size: 2.25rem;
  }
  
  .route-panel {
    width: 200px;
  }
  
  .nav-controls {
    position: static;
    transform: none;
    margin: 0.5rem;
  }
  
  .bottom-toolbar {
    flex-direction: column;
    gap: 1rem;
  }
}