*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; 
    background-color: #f3f6fa;
    color: #1f2933;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

header {
    width: 100%;
    padding: 18px 12px;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

main {
    width: 100%;
    max-width: 100vw;
    padding: 24px 12px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

#description,
#controls,
#city-info {
    width: 100%;
    max-width: 880px;  
}

#description {
    background: white;
    padding: 22px;
    border-radius: 14px;
    text-align: center;
    line-height: 1.6;
    font-size: 17px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    margin-bottom: 32px;
}

#controls {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
}

#city-list {
    width: 100%;
    max-width: 880px;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.city-btn {
    max-width: 100%;
    padding: 10px 16px;

    border-radius: 999px;
    border: 2px solid #2563eb;
    background: white;

    color: #2563eb;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;

    cursor: pointer;
    transition: all 0.25s ease;
}

.city-btn:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-1px);
}

#city-info {
    background: white;
    padding: 24px;
    border-radius: 14px;
    min-height: 220px;
    line-height: 1.6;
    font-size: 16px;

    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.risk-high {
    color: #dc2626;
    font-weight: 700;
}

.risk-med {
    color: #f59e0b;
    font-weight: 700;
}

.risk-low {
    color: #16a34a;
    font-weight: 700;
}

footer {
    width: 100%;
    text-align: center;
    padding: 14px 10px;
    font-size: 14px;
    color: #475569;
}

footer a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    header {
        font-size: 22px;
    }

    #description {
        font-size: 16px;
        padding: 18px;
    }

    .city-btn {
        font-size: 13px;
        padding: 9px 14px;
    }

    #city-info {
        font-size: 15px;
        padding: 18px;
    }
}
