body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Use min-height to ensure it fills viewport */
    margin: 0;
    /* Added padding around the body */
    padding: 20px;
    box-sizing: border-box; /* Ensures padding is included in the total size */
    
    /* Styles for the rotating background image */
    background-color: #005a9c; /* BGCH Blue fallback color */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 1.5s ease-in-out;
}

#app-container {
    background: white;
    padding: 20px 40px;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    width: 100%; /* Take up full width of padded body */
    max-width: 500px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-top: 5px solid #FDB813; 
}

/* New styles for the logo */
#main-logo {
    max-width: 250px; /* Adjust size as needed */
    margin: 0 auto 0.5em auto; /* Center logo and add space below */
    display: block;
}


h1, h2, h3 {
    color: #005a9c; /* BGCH Blue */
    font-weight: 600;
}

h1 {
    font-size: 1.8em;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 1.5em;
    margin-top: 0; /* Adjusted for new layout */
    margin-bottom: 0.5em;
}

h3 {
    font-size: 1.2em;
    margin-top: 1em;
    border-top: 1px solid #eee;
    padding-top: 1em;
}

input[type="text"], input[type="email"], input[type="tel"] {
    width: 100%;
    box-sizing: border-box; /* Important for padding and width */
    padding: 12px 15px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Style for required but empty fields in the update form */
input.missing-info {
    border-color: #dc3545; /* Red border to highlight */
    background-color: #fff8f8;
}

.name-inputs {
    display: flex;
    gap: 15px;
}

.name-inputs input {
    width: 100%; /* The flex container will handle sizing */
}

button {
    background-color: #007bff; /* Primary action blue */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
    width: 100%;
    margin-top: 15px; /* Unified margin */
}

button:hover {
    background-color: #0056b3;
}

button:active {
    transform: scale(0.98);
}

/* Updated login button to match website's "Donate" button style */
#authorize_button {
    width: auto;
    padding: 12px 40px;
    background-color: #FDB813; /* Gold/Orange color */
    font-weight: bold;
}

#authorize_button:hover {
    background-color: #e4a60b; /* Darker gold on hover */
}

/* Style for the new "Register Here" button and other secondary actions */
#show-registration-button, .secondary-button {
    background-color: #6c757d;
}

#show-registration-button:hover, .secondary-button:hover {
    background-color: #5a6268;
}

/* Container for mode and event buttons */
.mode-buttons-container, #event-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}


/* Style for mailing list checkbox container */
.subscribe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
    color: #555;
    font-size: 0.9em;
}

input[type="checkbox"] {
    transform: scale(1.2); /* Makes the checkbox slightly larger */
    accent-color: #007bff;
}

#staff-login-section p, #update-guest-info-section p {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #555;
}

hr {
    border: none;
    height: 1px;
    background-color: #e0e0e0;
    margin: 25px 0;
}

#results {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    min-height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
}

#results p {
    margin: 0;
    font-weight: 500;
}

/* PATCH: Added styles for the result buttons */
#results .result-button {
    width: auto; /* Allow button to size to content */
    max-width: 100%;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    margin-top: 0; /* Remove top margin for list items */
    margin-bottom: 5px; /* Add a touch of space below each button */
}

#results .result-button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

/* Check-in button inside results is a primary action button */
#results button {
    width: auto;
    background-color: #007bff; /* Primary action blue */
    color: white;
    border: none;
}

#results button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}


/* Styles for the Inactivity Modal */
#inactivity-modal {
    position: fixed; /* Sits on top of everything */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black overlay */
    z-index: 1000; /* Ensures it's on top */
    /* Use display:flex and not none for the JS to toggle */
    display: none; 
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    border-top: 5px solid #FDB813;
    /* CHANGE: Use flexbox to reliably center all modal content, including the button. */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-content p {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #333;
}

.modal-content #stay-button {
    width: auto;
    padding: 10px 30px;
}

/* Fullscreen Button Styles */
#fullscreen-button {
    position: fixed; /* Keep it fixed relative to the viewport */
    top: 20px;       /* Set distance from top */
    right: 20px;      /* Set distance from right */
    padding: 0;      /* Remove padding, as spacing is handled by top/right */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;   /* Ensure it's above other content */
    outline: none;
    width: auto;     /* Ensure button doesn't stretch */
    margin: 0;       /* Reset margin */
}

#fullscreen-button svg {
    width: 28px; /* A bit larger for easier clicking */
    height: 28px;
    stroke: white;
    transition: transform 0.2s ease-in-out;
}

#fullscreen-button:hover svg {
    transform: scale(1.1);
}
