/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

/* App container */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.app-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.app-title i {
  color: #667eea;
  font-size: 2rem;
}

.app-subtitle {
  font-size: 1.1rem;
  color: #718096;
  font-weight: 400;
}

/* Main content */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

/* Section headers */
.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.section-header h2 i {
  color: #60a5fa;
  font-size: 1.5rem;
}

/* Map containers */
.map-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 2rem;
}

.current-map-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 0;
  min-height: 500px;
}

.route-map-container {
  min-height: 600px;
}

.map-wrapper {
  position: relative;
  overflow: hidden;
}

.map-wrapper.full-width {
  width: 100%;
}

.map {
  width: 100%;
  height: 100%;
  min-height: 500px;
}

/* Stats panel */
.stats-panel {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border-left: 1px solid #e2e8f0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.stats-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.stats-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-header h3 i {
  color: #667eea;
}

.stats-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.stat-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-label {
  font-weight: 500;
  color: #4a5568;
  font-size: 0.95rem;
}

.stat-value {
  font-weight: 700;
  color: #2d3748;
  font-size: 1.1rem;
  text-align: right;
}

.stat-value span {
  color: #667eea;
}

/* Footer */
.app-footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 0;
  text-align: center;
  color: #718096;
  font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 1024px) {
  .current-map-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  
  .stats-panel {
    border-left: none;
    border-top: 1px solid #e2e8f0;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .header-content {
    padding: 0 1rem;
  }
  
  .app-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .app-title {
    font-size: 1.75rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .stats-panel {
    padding: 1rem;
  }
  
  .stat-row {
    padding: 0.75rem;
  }
  
  .stat-label {
    font-size: 0.9rem;
  }
  
  .stat-value {
    font-size: 1rem;
  }
}

/* Loading states */
.stat-value:empty::before {
  content: '--';
  color: #a0aec0;
  font-weight: 400;
}

/* Smooth transitions */
.map-container,
.stat-row,
.app-header,
.app-footer {
  transition: all 0.3s ease;
}

/* Focus states for accessibility */
.stat-row:focus-within {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Custom scrollbar */
.stats-content::-webkit-scrollbar {
  width: 6px;
}

.stats-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.stats-content::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.stats-content::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}
