/* --- NEW: Catchy & Responsive Homepage Styles --- */
body {
    /* A subtle, professional gradient background */
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    text-align: center;
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 680px; /* Max width for large screens */
    box-sizing: border-box;
    margin-bottom: 60px; /* Space for the footer */
}

.container h1 {
    color: #1a73e8;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.container p {
    color: #5f6368;
    margin-bottom: 1.5rem;
}

video, canvas {
    border-radius: 8px;
    margin-top: 20px;
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

button {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    margin: 10px 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
}
button:disabled {
    background-color: #9e9e9e;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#status-message {
    margin-top: 20px;
    font-size: 1.2em;
    color: #5f6368;
    min-height: 50px;
}

/* --- END of New Homepage Styles --- */



/* --- DEFINITIVE RESET: Admin Dashboard Styles --- */
#admin-app { display: flex; flex-direction: column; height: 100vh; width: 100vw; margin: 0; background-color: #f0f2f5; font-family: 'Poppins', sans-serif; }
.admin-header { background-color: #001529; color: white; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; height: 64px; flex-shrink: 0; }
.admin-header h1 { font-size: 1.5em; margin: 0; }
.admin-header .user-info a { color: #1890ff; text-decoration: none; margin-left: 15px; }
.admin-body { display: flex; flex-grow: 1; overflow: hidden; }
#sidebar { width: 220px; background-color: #fff; padding: 15px 0; flex-shrink: 0; border-right: 1px solid #f0f0f0; }
#sidebar ul { list-style: none; padding: 0; margin: 0; }
#sidebar .super-admin-only { display: none; }
#sidebar .nav-link { display: block; padding: 12px 24px; color: #555; text-decoration: none; font-weight: 500; border-right: 3px solid transparent; transition: all 0.2s ease; }
#sidebar .nav-link:hover { background-color: #f0f8ff; }
#sidebar .nav-link.active { background-color: #e6f7ff; color: #1890ff; border-right-color: #1890ff; }
#main-content { flex-grow: 1; padding: 24px; overflow-y: auto; }
.content-panel { display: none; background-color: white; padding: 24px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.09); }
.content-panel.active { display: block; }
.content-panel h2 { margin-top: 0; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; }
.selfie-card { position: relative; width: 100%; padding-top: 100%; background-color: #f0f0f0; border-radius: 8px; overflow: hidden; }
.selfie-card img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; transition: transform 0.2s ease; }
.selfie-card img:hover { transform: scale(1.1); }
.selfie-card .selfie-checkbox { position: absolute; top: 10px; left: 10px; width: 20px; height: 20px; }
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.modal-content { margin: auto; display: block; max-width: 80%; max-height: 80%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.modal-close-btn { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; }
.danger-zone { background-color: #fff1f0; border: 1px solid #ffccc7; padding: 15px; border-radius: 8px; }
.danger-zone button { background-color: #cf1322; }
.admin-form { max-width: 500px; }
.admin-form input { width: 100%; margin-bottom: 10px; }
.bulk-actions { padding: 15px; background-color: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; margin-bottom: 20px; display: flex; align-items: center; gap: 20px; }






/* CHANGED: New styles for the floating rectangle */
.selfie-floatie {
    position: absolute;
    background-size: cover;
    background-position: center;
    border: 5px solid white;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);

    /* CHANGED: This creates the rectangle with rounded corners */
    border-radius: 15px;

    /* Connect the element to our NEW animation */
    animation-name: gentleFloat;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite; /* We'll let JS remove it */
}

/* Define the new, slower 20-second animation */
@keyframes gentleFloat {
    0% {
        transform: translateY(20px) translateX(0px) rotate(2deg);
        opacity: 0;
    }
    10% {
         /* Fade in */
        opacity: 1;
    }
    25% {
        transform: translateY(-20px) translateX(20px) rotate(-3deg);
    }
    50% {
        transform: translateY(25px) translateX(-15px) rotate(1deg);
    }
    75% {
        transform: translateY(-15px) translateX(10px) rotate(3deg);
    }
    90% {
         /* Fade out */
        opacity: 0;
    }
    100% {
        transform: translateY(30px) translateX(-20px) rotate(-2deg);
        opacity: 0;
    }
}








/* --- Login Form Styles --- */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
}
.form-group input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}




/* CORRECTED VERSION */
#stage-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0c1c33;
    /* The background-image line is now gone */
    background-size: contain;
    background-position: center;
}



/* --- Footer Styles --- */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333; /* Dark background for the footer */
    color: #f1f1f1;       /* Light text color */
    text-align: center;
    padding: 10px 0;      /* Adds some vertical spacing */
    font-size: 0.8em;       /* Makes the text a bit smaller */
}

/* Add padding to the bottom of the main content to prevent the footer from overlapping it */
.container {
    padding-bottom: 50px; 
}




/* --- NEW Floating Animation Stage Styles --- */
#stage-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0c1c33;
    background-size: cover;
    background-position: center;
    overflow: hidden; /* Hide anything that drifts off-screen */
}

.stage-selfie {
    position: absolute;
    border: 4px solid white;
    border-radius: 15px; /* Rectangle with rounded corners */
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    background-size: cover;
    background-position: center;
    opacity: 0.9;

    /* Set up for looping animation */
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate; /* Float back and forth smoothly */
    transition: transform 1s ease, box-shadow 1s ease;
}

/* The "spotlight" class for the prioritized selfie */
.stage-selfie.ontop {
    z-index: 10;
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 40px #fff, 0 0 60px #00aaff;
}

/* --- Multiple Animation Definitions --- */
@keyframes float1 { /* Gentle up-down drift */
    from { transform: translateY(0px); }
    to { transform: translateY(-30px); }
}
@keyframes float2 { /* Gentle left-right drift */
    from { transform: translateX(0px); }
    to { transform: translateX(40px); }
}
@keyframes float3 { /* Diagonal drift */
    from { transform: translate(0, 0); }
    to { transform: translate(30px, -30px); }
}
@keyframes float4 { /* Slower, wider drift */
    from { transform: translate(0, 0); }
    to { transform: translate(-40px, 20px); }
}
