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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.last-update {
    color: #95a5a6;
    font-size: 0.9em;
}

.refresh-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 20px;
    transition: background-color 0.3s;
}

.refresh-btn:hover {
    background-color: #2980b9;
}

.refresh-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.total-crimes .stat-number {
    color: #3498db;
}

.violent-crimes .stat-number {
    color: #e74c3c;
}

.daily-average .stat-number {
    color: #2ecc71;
}

.stat-label {
    color: #95a5a6;
    font-size: 0.9em;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-container h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.table-container {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-container h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: #f8f9fa;
}

td {
    color: #555;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tables-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .chart-container, .table-container {
        padding: 15px;
    }
    
    .chart-container h3, .table-container h3 {
        font-size: 1.1em;
        margin-bottom: 15px;
    }
    
    /* Make tables scrollable on mobile */
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 100%;
        font-size: 0.9em;
    }
    
    th, td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }
    
    .stat-number {
        font-size: 1.8em;
    }
    
    .stat-card h3 {
        font-size: 0.9em;
    }
}