:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --accent-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

.highlight {
    color: var(--primary-color);
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

/* Content */
.content-area {
    flex: 1;
    padding: 3rem 0;
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Search */
.search-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#search-input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#search-btn {
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#search-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* New Card Design */
.bus-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.bus-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.bus-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.operator-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.operator-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.bus-type-badge {
    background-color: #e0e7ff;
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.route-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.route-point {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.route-point:last-child {
    align-items: flex-end;
    text-align: right;
}

.time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.city {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.route-arrow {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
}

.duration-line {
    width: 100%;
    height: 2px;
    background-color: var(--border-color);
    position: relative;
    margin-bottom: 0.5rem;
}

.duration-line::after {
    content: '→';
    position: absolute;
    right: -5px;
    top: -10px;
    color: var(--border-color);
}

.via-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.bus-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.status-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    margin-right: 5px;
}

/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background-color: var(--text-main);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 0.9rem;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.main-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .schedule-grid {
        grid-template-columns: 1fr;
    }
}

/* Filters */
.filters-container {
    max-width: 900px;
    margin: 0 auto 3rem auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.search-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

/* Custom Select Styling */
.select-wrapper {
    position: relative;
}

select {
    width: 100%;
    padding: 1rem 1.25rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

select:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: #ffffff;
}

#reset-btn {
    padding: 1rem 1.5rem;
    background-color: white;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#reset-btn:hover {
    background-color: #f8fafc;
    color: var(--text-main);
    border-color: #cbd5e1;
}

/* Updated Search Styles */
#search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--bg-color);
    transition: all 0.2s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#search-btn {
    padding: 1rem 2.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

#search-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3);
}

/* Responsive adjustments for filters */
@media (max-width: 640px) {
    .filters-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .search-wrapper {
        flex-direction: column;
    }

    #search-btn {
        width: 100%;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }
}

/* Share Button - Modern Classic */
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
    padding: 0.7rem;
    background-color: transparent;
    color: #25D366;
    text-decoration: none;
    border: 1px solid #25D366;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background-color: #25D366;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    transform: translateY(-1px);
}

.share-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Emergency Section */
.emergency-section {
    margin-top: 4rem;
    text-align: center;
}

.emergency-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #ef4444;
    /* Red for emergency */
}

.emergency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.emergency-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #fee2e2;
    transition: transform 0.2s;
}

.emergency-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #ef4444;
}

.e-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.emergency-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.emergency-card a {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ef4444;
    text-decoration: none;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

#load-more-btn {
    padding: 0.8rem 2rem;
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#load-more-btn:hover {
    background-color: var(--primary-color);
    color: white;
}
/* Language Toggle */
.lang-btn {
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif; /* Use a font that supports Hindi well */
    font-weight: 600;
    color: var(--primary-color);
    transition: all 0.2s;
    margin-left: auto; /* Push to right on mobile if needed */
    margin-right: 1rem;
}

.lang-btn:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .lang-btn {
        margin: 0 auto;
    }
}
