:root {
  --primary-color: #d32f2f;
  --secondary-color: #1976d2;
  --accent-color: #ff9800;
  --text-color: #333;
  --light-bg: #f6f6f6;
  --white: #fff;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --border-radius: 8px;
}

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

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: var(--light-bg);
  color: var(--text-color);
  line-height: 1.6;
}

.header {
  background: linear-gradient(135deg, var(--primary-color), #b71c1c);
  color: var(--white);
  padding: 18px 0;
  text-align: center;
  font-size: 1.4em;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.container {
  max-width: 700px;
  margin: 20px auto;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-container {
  padding: 20px;
  background: var(--white);
  border-bottom: 1px solid #eee;
}

.station-select-wrapper {
  position: relative;
  margin-bottom: 15px;
}

select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1em;
  background: var(--white);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  transition: border 0.3s;
}

select:focus {
  border-color: var(--primary-color);
  outline: none;
}

.form-row {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin: 25px 0 15px;
  flex-wrap: wrap;
}

.btn {
  flex: 1;
  min-width: 120px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  padding: 14px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn:hover {
  background: #b71c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  background: var(--secondary-color);
}

.btn.secondary:hover {
  background: #1565c0;
}

.btn.accent {
  background: var(--accent-color);
  color: #000;
}

.btn.accent:hover {
  background: #fb8c00;
}

.info-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.95em;
}

.info-table td, .info-table th {
  padding: 14px 15px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.info-table th {
  background: #f9f9f9;
  font-weight: 500;
  width: 40%;
}

.info-table tr:last-child td {
  border-bottom: none;
}

.notice-box {
  background: #ffe082;
  color: #b71c1c;
  border-left: 5px solid var(--primary-color);
  margin: 15px;
  padding: 15px;
  border-radius: var(--border-radius);
  font-size: 1.02em;
  line-height: 1.5;
}

.route-box {
  margin: 15px;
  background: #f9fbe7;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  padding: 15px;
}

.route-step {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}

.route-step:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.route-step.start {
  background: #e8f5e8;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.route-step.end {
  background: #fff3e0;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 12px;
  flex-shrink: 0;
  position: relative;
}

.start-dot {
  width: 20px;
  height: 20px;
  background: #4caf50 !important;
}

.end-dot {
  width: 20px;
  height: 20px;
  background: #ff9800 !important;
}

.dot::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  top: 4px;
  left: 4px;
  opacity: 0.7;
}

.start-dot::after, .end-dot::after {
  width: 10px;
  height: 10px;
  top: 5px;
  left: 5px;
}

.route-station {
  font-weight: 500;
  flex-grow: 1;
}

.route-line {
  color: #666;
  font-size: 0.9em;
  margin-left: 10px;
  font-weight: 500;
}

.section-title {
  margin: 25px 15px 15px;
  font-size: 1.3em;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
  font-weight: 500;
}

.error {
  color: #d32f2f;
  padding: 20px;
  text-align: center;
  font-weight: 500;
  background: #ffebee;
  border-radius: var(--border-radius);
  margin: 15px;
}

.loading {
  text-align: center;
  padding: 25px;
  color: #666;
}

.loading-spinner {
  border: 3px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top: 3px solid var(--primary-color);
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.platform-info {
  background: #e3f2fd;
  padding: 15px;
  border-radius: var(--border-radius);
  margin: 15px 0;
  border-left: 4px solid var(--secondary-color);
}

.interchange-info {
  background: #fff8e1;
  padding: 15px;
  border-radius: var(--border-radius);
  margin: 15px 0;
  border-left: 4px solid var(--accent-color);
}

.metro-line {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  font-size: 0.85em;
  text-align: center;
  min-width: 80px;
}

.interchange-marker {
  margin: 15px 0;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid var(--accent-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 700px) {
  .container {
    margin: 0;
    border-radius: 0;
  }
  .btn {
    min-width: calc(50% - 6px);
  }
}

@media (max-width: 480px) {
  .btn {
    min-width: 100%;
  }
  .header {
    font-size: 1.2em;
    padding: 15px 0;
  }
}
.route-comparison {
  margin: 20px 15px;
  padding: 20px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 4px solid #4caf50;
}

.route-comparison h3 {
  color: #2e7d32;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.3em;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.route-option {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.route-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border-color: var(--secondary-color);
}

.route-option.selected {
  border-color: var(--primary-color);
  background: #fff3e0;
  box-shadow: 0 5px 15px rgba(211, 47, 47, 0.2);
}

.route-option h4 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.1em;
}

.route-stats {
  display: flex;
  justify-content: space-around;
  margin: 15px 0;
  font-weight: 600;
}

.route-stats span {
  background: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.9em;
  border: 1px solid #ddd;
}

.route-desc {
  color: #666;
  font-size: 0.9em;
  margin-top: 10px;
  font-style: italic;
}

/* Responsive design for comparison */
@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .route-stats {
    flex-direction: column;
    gap: 8px;
  }
  
  .route-stats span {
    display: inline-block;
    margin: 2px;
  }
}