:root {
    --primary-color: #222;
    --secondary-color: #444;
    --accent-color: #ff5252;
    --bg-color: #f9f9f9;
    --card-bg: #fff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.search-box {
    padding: 12px 20px;
    width: 60%;
    max-width: 500px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(255, 82, 82, 0.3);
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: #eee;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #ddd;
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: white;
}


.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.counter {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.counter-separator {
    font-size: 2rem;
    font-weight: 700;
    align-self: center;
}

.last-incident {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-align: center;
    margin-top: 1rem;
}

.severity-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.counter-container {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.counter-digit {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 5px;
    min-width: 1.5ch;
    text-align: center;
}

.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    min-width: 280px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .counter-digit {
        font-size: 1.2rem;
        padding: 5px 6px;
        min-width: 1.2ch;
    }
}

.severity-1 {
    background-color: #4caf50;
}

/* Low */
.severity-2 {
    background-color: #ff9800;
}

/* Medium */
.severity-3 {
    background-color: #f44336;
}

/* High */
.severity-4 {
    background-color: #9c27b0;
}

/* Extreme */
.severity-5 {
    background-color: #000;
}

/* Catastrophic */

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #eee;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.dark-mode {
    --primary-color: #f0f0f0;
    --secondary-color: #aaa;
    --accent-color: #ff5252;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
}

.dark-mode .card-header {
    background-color: #333;
}

.dark-mode .counter-digit {
    background-color: #333;
}

.dark-mode .filter-btn {
    background-color: #333;
    color: #f0f0f0;
}

.dark-mode .filter-btn:hover {
    background-color: #444;
}

.dark-mode .filter-btn.active {
    background-color: var(--accent-color);
}

.mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--card-bg);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mode-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .search-box {
        width: 90%;
    }
}