* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
}

.container {
    max-width: 100%;
    margin: 0;
    background-color: white;
    padding: 30px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
}

.warning-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.box-left h1 {
    color: #2a7f8f;
    font-size: 28px;
    margin-bottom: 30px;
}

.box-left h2 {
    color: #2a7f8f;
    font-size: 28px;
    font-weight: 600;
}

.box-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.warnings {
    display: flex;
    gap: 20px;
}

.warning-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.warning-icon {
    font-size: 24px;
    border-radius: 4px;
    font-weight: bold;
    color: white;
    padding: 2px 8px;
}

.danger {
    background-color: #dc3545;
}

.alert {
    background-color: #ffc107;
    color: #000;
}

.danger-text {
    color: #dc3545;
    font-weight: 600;
}

.alert-text {
    color: #ffc107;
    font-weight: 600;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.event-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: 0.2s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 35px;
    height: 35px;
    background: #ddd;
    border-radius: 50%;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    font-size: 14px;
}

.meta {
    font-size: 12px;
    color: #666;
}

.menu {
    cursor: pointer;
}

.event-image {
    width: 100%;
    height: 200px;
    background: #eaeaea;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content {
    padding: 15px 12px;
}

.content h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.proximity {
    font-size: 12px;
    color: #777;
    margin-bottom: 10px;
}

.status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

.status.safe {
    background: #d4f8d4;
    color: #1b7a1b;
}

.status.danger {
    background: #ffd6d6;
    color: #b30000;
}

.status.alert {
    background: #fff2cc;
    color: #996c00;
}

@media (max-width: 817px) {

    .container {
        padding: 25px 20px;
    }

    .warning-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .event-image {
        height: 140px;
    }
}

/* ======= YOUR REQUEST: 540px ======= */
@media (max-width: 540px) {

    .box-right {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 15px;
    }

    .warnings {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .info-section {
        width: 100%;
    }

    .last-updated {
        text-align: left;
    }
}

@media (max-width: 425px) {

    .container {
        padding: 20px 15px;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .event-image {
        height: 200px;
    }

    .content h4 {
        font-size: 15px;
    }

    .proximity {
        font-size: 13px;
    }
}