/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.stat-badge {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    font-size: 0.8em;
    font-weight: normal;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}
header {
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

header h1 {
    margin: 0;
    font-size: 2.2em;
    color: #2c3e50;
}

/* Map and Controls */
.main-content {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.controls {
    flex: 1;
    min-width: 300px;
}

#map {
    flex: 3;
    height: 500px;
    min-height: 400px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important */
}

input[type="file"] {
    padding: 5px;
}

button {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#loading {
    margin-top: 15px;
    font-weight: bold;
    color: #e67e22;
}


/* Statistics Section */
#stats-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

#stats-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.stat-card {
    background-color: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.stat-card.full-width {
    grid-column: 1 / -1;
}

.stat-card h3 {
    margin-top: 0;
    color: #34495e;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.stat-card p {
    font-size: 1.8em;
    font-weight: bold;
    color: #3498db;
    text-align: center;
    margin: 10px 0;
}

.stat-card ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

.stat-card ul li {
    padding: 8px 5px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card ul li:last-child {
    border-bottom: none;
}

.stat-card ul li strong {
    color: #2c3e50;
}


/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    #map {
        height: 400px;
    }
}