/* Modern Design System for Bus LaoBu */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --primary: #0B7A75;
  --primary-light: #4dcac3;
  --primary-dark: #07524f;
  --secondary: #7B61FF;
  --accent: #F59E0B;
  --dark: #0F172A;
  --surface: #1E293B;
  --text: #F8FAFC;
  --text-muted: #94A3B8;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Components */
  --radius: 12px;
  --radius-full: 9999px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0F172A 0%, #1a1f35 50%, #0F172A 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  width: 100%;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-light);
}

.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Card */
.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 6px rgba(11, 122, 117, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(11, 122, 117, 0.4);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

/* Inputs */
input[type="text"],
input[type="search"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(11, 122, 117, 0.3);
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.hero-icon {
  font-size: 5rem;
  margin-bottom: var(--spacing-md);
  animation: float 3s ease-in-out infinite;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: var(--spacing-lg);
}

/* Footer */
footer {
  margin-top: auto;
  padding: var(--spacing-lg) 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

footer a {
  color: var(--primary-light);
  text-decoration: none;
}

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

/* Map Container */
#map {
  height: 400px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin: var(--spacing-lg) 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

/* MRT Colors */
.mrt-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

/* Helper styles for result cards */
.result-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.bus-badge {
  background: rgba(11, 122, 117, 0.2);
  color: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Group Selector */
.group-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.group-select:hover {
  border-color: var(--primary);
}

.group-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(11, 122, 117, 0.3);
}

.group-select option {
  background: var(--surface);
  color: var(--text);
}

/* Group Sections */
.group-section {
  margin-bottom: var(--spacing-lg);
}

.group-section.collapsed .group-header {
  margin-bottom: 0;
  border-bottom-color: transparent;
}

.group-header {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: var(--spacing-sm);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.group-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.collapse-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.group-content {
  margin-top: var(--spacing-sm);
}

.group-count {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: auto;
}