:root {
    --bg-color: #0b1121;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #14b8a6;
    --accent-hover: #0d9488;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --overlay-bg: rgba(15, 23, 42, 0.85);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background: radial-gradient(circle at top left, #1e293b, var(--bg-color));
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.app-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

footer {
    text-align: center;
    padding: 1rem 0;
}

footer p.signature {
    color: #64748b;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Info Section */
.info-section {
    margin-top: 1rem;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.info-section h2 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-content p {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.info-content p:last-child {
    margin-bottom: 0;
}

.info-content strong {
    color: white;
}

.widget-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    height: 70vh;
    min-height: 500px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
}

/* Map Container */
#map {
    width: 100%;
    height: 100%;
    z-index: 1; /* Base layer */
}

/* Search Overlay - REMOVED */

/* Schedule Overlay */
#schedule-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: var(--overlay-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.schedule-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

#close-schedule {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.schedule-content {
    padding: 1.5rem;
}

#loading-spinner p {
    text-align: center;
    color: var(--accent);
    font-size: 1rem;
}

#next-pickup-details {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pickup-card {
    flex: 1 1 calc(25% - 1rem); /* Default to 4 columns */
    min-width: 120px;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.pickup-card h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pickup-card .date {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.pickup-card.garbage .date {
    color: #ef4444; /* Red for garbage */
}

.pickup-card.recycling .date {
    color: #3b82f6; /* Blue for recycling */
}

.pickup-card.organics .date {
    color: #10b981; /* Green for organics */
}

.pickup-card.yard-waste .date {
    color: #f59e0b; /* Amber/Orange for yard waste */
}

.hidden {
    display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .widget-card {
        height: 500px; /* slightly smaller map on mobile */
        border-radius: 12px;
    }
    
    .pickup-card {
        flex: 1 1 calc(50% - 1rem); /* 2x2 grid on mobile */
    }
    
    .schedule-content {
        padding: 1rem;
    }
    
    .schedule-header {
        padding: 1rem;
    }
    
    .info-section {
        padding: 1.5rem;
    }
    
    .info-section h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 400px) {
    .pickup-card {
        flex: 1 1 100%; /* Stack vertically on very small screens */
    }
}

/* Customizing Leaflet Map to look dark/premium */
.leaflet-container {
    background: #0f172a;
}
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}
.leaflet-control-zoom a {
    background: var(--overlay-bg) !important;
    color: white !important;
    border-color: rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(8px);
}
.leaflet-control-zoom a:hover {
    background: var(--card-bg) !important;
}
.leaflet-control-attribution {
    background: rgba(0,0,0,0.5) !important;
    color: #94a3b8 !important;
}
.leaflet-control-attribution a {
    color: var(--accent) !important;
}
