body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #e0f2f7; /* Light blue background */
    color: #333;
}

header {
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center; /* Center content horizontally */
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    margin-right: 15px; /* Space between logo and title */
}

.logo-container img {
    height: 50px; /* Adjust logo size as needed */
    width: auto;
}

h1 {
    margin: 0;
    font-size: 2.5em;
    color: #2c3e50;
}

h2 {
    color: #0056b3; /* Darker blue for section titles */
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #007bff; /* Underline effect */
    padding-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Subtle table shadow */
    border: 1px solid #2c3e50; /* Add border to the table */
}

table th,
table td {
    border: 1px solid #2c3e50;
    padding: 12px 15px;
    text-align: center; /* Center align text in columns */
}

table th {
    background-color: #3498db; /* Blue for table headers */
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

table tr:nth-child(even) {
    background-color: #f8f9fa; /* Alternate row color */
}

table tr:hover {
    background-color: #e0f2f7; /* Highlight row on hover */
}

canvas {
    max-width: 100%;
    height: auto;
    display: block; /* Ensure canvas takes full width */
    margin: 0 auto; /* Center the canvas */
}

/* Chart Container */
.chart-container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    flex: 1;
    min-width: 300px;
    border: 1px solid #bdc3c7;
}

.zone-charts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.zone-chart-item {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 300px; /* Adjust as needed */
    border: 1px solid #bdc3c7;
}

.zone-chart-item h3 {
    margin-top: 0;
    color: #2c3e50;
    background-color: #ecf0f1;
    padding: 8px;
    border-radius: 5px;
}

.zone-chart-item canvas {
    max-width: 100%;
    height: auto !important;
}

/* File input styling */
input[type="file"] {
    display: none; /* Hide default file input */
}

label[for="csvFileInput"] {
    background-color: #28a745; /* Green button */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    margin-left: 20px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

label[for="csvFileInput"]:hover {
    background-color: #218838;
}

button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* Zone selection styling */
select {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin: 0 5px;
    background-color: white;
}

/* Ward Report Table Styling */
.ward-report-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #bdc3c7;
}

.ward-report-container h3 {
    text-align: center;
    color: #0056b3;
    margin-top: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.ward-data-table {
    width: 100%; /* Adjust width as needed */
    margin: 20px auto; /* Center the table */
    border-collapse: collapse;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #2c3e50;
}

.ward-data-table th,
.ward-data-table td {
    border: 1px solid #2c3e50;
    padding: 10px 12px;
    text-align: center;
}

.ward-data-table th {
    background-color: #2ecc71; /* Green for ward table headers */
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

.ward-data-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.ward-data-table tr:hover {
    background-color: #e0f2f7;
}

/* Ward Performance Table Styling */
.ward-performance-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #bdc3c7;
}

.ward-performance-section.best {
    border-color: #27ae60;
    background-color: #e8f5e9;
}

.ward-performance-section.worst {
    border-color: #c0392b;
    background-color: #fdedec;
}

.ward-performance-section.best h3 {
    color: #27ae60;
}

.ward-performance-section.worst h3 {
    color: #c0392b;
}

.ward-performance-section h3 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 10px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.ward-performance-table {
    width: 100%;
    margin: 15px auto;
    border-collapse: collapse;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #2c3e50;
}

.ward-performance-table th,
.ward-performance-table td {
    border: 1px solid #2c3e50;
    padding: 10px;
    text-align: center;
}

.ward-performance-table th {
    background-color: #9b59b6; /* Purple for performance table headers */
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

.ward-performance-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.ward-performance-table tr:hover {
    background-color: #e0f2f7;
}

.best-worst-wards-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #bdc3c7;
}

.best-worst-wards-container h2 {
    width: 100%; /* Ensure the title spans the full width */
    text-align: center;
    margin-bottom: 20px;
}

.best-wards-card,
.worst-wards-card {
    flex: 1;
    min-width: 300px;
    max-width: 48%;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #bdc3c7;
}

.best-wards-card {
    border-color: #27ae60;
    background-color: #e8f5e9;
}

.worst-wards-card {
    border-color: #c0392b;
    background-color: #fdedec;
}

.best-wards-card h3,
.worst-wards-card h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    color: #0056b3;
}

.best-wards-card h3 {
    color: #27ae60;
}

.worst-wards-card h3 {
    color: #c0392b;
}

.best-wards-card ul,
.worst-wards-card ul {
    list-style: none;
    padding: 0;
}

.best-wards-card li,
.worst-wards-card li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.best-wards-card li:last-child,
.worst-wards-card li:last-child {
    border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
        padding: 0 15px 15px 15px;
    }

    h1 {
        font-size: 2em;
    }

    header {
        padding: 10px 15px;
    }

    .header-content {
        flex-direction: column;
    }

    .logo-container {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .best-worst-wards-container {
        flex-direction: column;
    }
    
    .best-wards-card,
    .worst-wards-card {
        max-width: 100%;
    }
    
    button, select {
        display: block;
        margin: 10px 0;
        width: 100%;
    }
}