body {
  background: #f5f5f5;
  color: #333;
}

.container {
  max-width: 800px;
  padding: 20px;
}

h1 {
  text-align: center;
  margin: 30px 0;
  color: #1a1a1a;
}

.section-heading {
  margin: 30px 0 15px;
  color: #1a1a1a;
}

.summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px 24px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  margin-bottom: 24px;
  color: white;
}

.summary-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gear-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #5a6ab4;
  padding: 10px 14px;
  border-radius: 30px;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gear-btn:hover {
  background: white;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
}

.modal-close:hover {
  color: #1a1a1a;
}

.config-section {
  margin-bottom: 20px;
}

.config-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.config-input-group {
  display: flex;
  gap: 8px;
}

.config-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.config-input:focus {
  border-color: #667eea;
}

.config-search-btn {
  padding: 10px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.config-search-btn:hover {
  background: #5a6ab4;
}

.config-search-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.search-results {
  margin-top: 12px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 8px;
}

.search-result-item {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.search-result-item:hover {
  background: #f5f5f5;
}

.search-result-item:last-child {
  border-bottom: none;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.modal-footer-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.modal-footer-btn.primary {
  background: #667eea;
  color: white;
  border: none;
}

.modal-footer-btn.primary:hover {
  background: #5a6ab4;
}

.modal-footer-btn.secondary {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}

.modal-footer-btn.secondary:hover {
  background: #eee;
}

.summary-route {
  font-size: 14px;
  font-weight: 600;
}

.reverse-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #5a6ab4;
  padding: 10px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.reverse-btn:hover {
  background: white;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  color: #5a6ab4;
}

.journey-card {
  cursor: pointer;
  border-radius: 12px;
  border: 2px solid transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.journey-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.journey-card.selected {
  border-color: #667eea;
}

.journey-card .card-title {
  font-size: 16px;
}

.journey-card .card-subtitle {
  font-size: 13px;
}

#map {
  height: 400px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.section {
  background: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 12px;
  border-left: 4px solid #ddd;
  transition: box-shadow 0.2s;
}

.section:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.section.transport {
  border-left-color: #667eea;
}

.section.waiting {
  border-left-color: #f5a623;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.section-type {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
}

.section-time {
  color: #666;
  font-size: 14px;
}

.line-badge {
  background: #1a1a1a;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

.section-details {
  color: #555;
  font-size: 14px;
  margin-bottom: 10px;
}

.stops {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #f9f9f9;
  border-radius: 6px;
}

.stop.terminal {
  background: #e8f4fd;
  font-weight: 500;
}

.stop-time {
  font-weight: 600;
  min-width: 60px;
}

.stop-name {
  color: #555;
}
