/* Universal box-sizing for consistent layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    overflow: hidden; /* Keep this if you want to prevent scrolling */
    background-color: #4A453F; /* Apply background to body directly */
}

/* Ensure #background fills the viewport */
#background {
    background-image: url('Images/bgf2.png');
    background-size: 100% 100%; /* CHANGED from 'contain' to 'cover' */
    background-repeat: no-repeat;
    background-position: center center;
    background-color: #4A453F; /* Default background for #background */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    
}

h1 {
    font-size: 3em; /* Make welcome text larger */
    margin: 0;
}

@keyframes slight-zoom {
    0% { background-size: cover; } /* Adjust keyframe to use cover */
    100% { background-size: 105% auto; } /* This might still cause issues if 105% isn't 'cover' equivalent */
    /* Better alternative for slight zoom with cover might be: */
    /* 0% { transform: scale(1); } */
    /* 100% { transform: scale(1.05); } */
}

@media (max-width: 768px) {
    #background {
        background-color: #4A453F ;
        background-image: url('Images/bgfm.png');
        background-size: 100% 100%; /* Keep contain for mobile if you want the image fully visible */
        background-position: center center;
    }
}

/* --- Custom Alert Styling --- */
/* The hidden class now uses opacity and visibility for smooth transitions */
#custom-alert.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Prevents interaction when hidden */
    /* Optional: Animate the alert box scaling when hidden */
    transform: scale(0.9);
}

#custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* Add transition for smooth show/hide effect */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.alert-box {
    background: #d8000c; /* Warning red */
    color: white;
    padding: 30px 50px;
    border-radius: 12px;
    box-shadow: 0 0 25px 5px rgba(255, 0, 0, 0.9);
    text-align: center;
    animation: pulse 1s infinite;
    max-width: 90%;
    font-size: 1.7rem;
    font-weight: 900;
    /* Ensure the alert box itself transitions */
    transition: transform 0.4s ease-in-out;
}

.alert-box button {
    margin-top: 20px;
    padding: 10px 20px;
    background: white;
    color: #d8000c;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease, transform 0.2s ease;
}

.alert-box button:hover {
    background: #f5f5f5;
    transform: translateY(-2px); /* Slight lift on hover */
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 20px #ff0000; }
    50% { transform: scale(1.05); box-shadow: 0 0 40px #ff0000; }
    100% { transform: scale(1); box-shadow: 0 0 20px #ff0000; }
}