/* =========================================
   1. GLOBAL RESET & BODY SETUP
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;    
    min-height: 100vh;      
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #090a0f; 
    color: white;
    /* Improved scrolling for mobile */
    overflow-y: scroll; 
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

/* =========================================
   2. BACKGROUND STARS (Global)
   ========================================= */
.stars-container {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    z-index: -1; 
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
    pointer-events: none; 
}

/* =========================================
   3. LANDING PAGE SPECIFIC STYLES
   ========================================= */
.landing-wrapper {
    position: relative;
    width: 100%;
    
    /* FIX: Use Dynamic Viewport Height for Safari Mobile */
    min-height: 100vh;
    min-height: 100dvh; 
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;

    /* BACKGROUND IMAGE */
    background: 
        linear-gradient(to bottom, rgba(5, 10, 20, 0.9) 0%, rgba(5, 10, 20, 0.5) 40%, rgba(5, 10, 20, 0.1) 100%),
        url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop') no-repeat center center/cover;
}

/* The Grid Layout */
.landing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    column-gap: 50px;
    row-gap: 30px;
    width: 100%;
    max-width: 1000px;
    margin-top: -50px; 
}

/* Logos */
.logo-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* Ensure cell doesn't collapse */
}

.logo-cell img {
    /* FIX: Fluid width for Safari */
    width: 240px; 
    max-width: 100%; /* CRITICAL: Prevents overflow on small screens */
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    transition: transform 0.3s ease;
}

.logo-cell img:hover {
    transform: scale(1.05);
}

/* Text Section */
.text-cell {
    grid-column: 1 / -1; 
    text-align: center;
    margin: 30px 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
    width: 100%; /* Ensure text container fits */
}

.main-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    line-height: 1.2;
    /* FIX: Prevent word breaking issues */
    word-wrap: break-word; 
}

.sub-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fca311; 
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.date-location {
    font-size: 1.3rem;
    color: #e2e8f0;
    font-weight: 400;
}

/* Buttons */
/* Container for stacked buttons */
/* =========================================
   CENTERED BUTTONS CONTAINER
   ========================================= */
.buttons-container {
    grid-column: 1 / -1 !important; /* Forces it to span the whole grid */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

/* Force the buttons to act as centered blocks with strict spacing */
.buttons-container .landing-btn {
    width: 100%;
    max-width: 450px; 
    margin-bottom: 20px !important; 
    
    /* FIX: Changed from flex to block so the <br> tag works normally */
    display: block; 
    text-align: center;
}

/* Remove margin from the very last button so it doesn't push the footer down */
.buttons-container .landing-btn:last-child {
    margin-bottom: 0 !important;
}

.btn-cell {
    display: flex;
    justify-content: center;
    align-items: flex-start; 
}

.landing-btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
}

.landing-btn:hover {
    background: #007bff;
    border-color: #007bff;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
    transform: translateY(-3px);
}

.btn-secondary:hover {
    background: #fca311;
    border-color: #fca311;
    box-shadow: 0 0 20px rgba(252, 163, 17, 0.5);
    color: black;
}


/* =========================================
   4. FORM & ADMIN PAGES 
   ========================================= */
.form-container { margin: 60px auto; background: rgba(15, 23, 42, 0.85); padding: 40px; border-radius: 15px; width: 90%; max-width: 800px; color: white; border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); position: relative; z-index: 10; }
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: bold; color: #a5b4fc; }
input, select, textarea { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #475569; background-color: #1e293b; color: white; font-size: 1rem; }
input:focus, select:focus, textarea:focus { border-color: #6366f1; outline: none; }
.row { display: flex; gap: 20px; flex-wrap: wrap; }
.col { flex: 1; min-width: 250px; }
h2 { text-align: center; margin-bottom: 30px; color: white; }
.alert { background: #f59e0b; color: black; padding: 10px; border-radius: 5px; margin-bottom: 20px; text-align: center;}
button { width: 100%; padding: 15px; background: #007bff; color: white; border: none; border-radius: 8px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: 0.3s; }
button:hover { background: #0056b3; }
button:disabled { background-color: #64748b; color: #cbd5e1; cursor: not-allowed; opacity: 0.5; }
.gdpr-container { background: rgba(255, 255, 255, 0.05); padding: 20px; border-radius: 8px; margin-bottom: 25px; border: 1px solid rgba(255, 255, 255, 0.1); }
.gdpr-custom-input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.gdpr-custom-label { position: relative; padding-left: 50px; cursor: pointer; font-size: 0.9rem; line-height: 1.5; color: #e2e8f0; display: block; user-select: none; }
.gdpr-custom-label::before { content: ''; position: absolute; top: 5px; left: 0; height: 32px; width: 32px; background-color: rgba(0, 0, 0, 0.3); border: 3px solid #007bff; border-radius: 6px; transition: all 0.2s ease-in-out; box-shadow: 0 0 5px rgba(0, 123, 255, 0.3); }
.gdpr-custom-input:checked + .gdpr-custom-label::before { background-color: #007bff; box-shadow: 0 0 15px rgba(0, 123, 255, 0.6); }
.gdpr-custom-label::after { content: ''; position: absolute; display: none; left: 11px; top: 9px; width: 8px; height: 16px; border: solid white; border-width: 0 4px 4px 0; transform: rotate(45deg); }
.gdpr-custom-input:checked + .gdpr-custom-label::after { display: block; }
.checkbox-group { display: flex; align-items: center; gap: 10px; }
.checkbox-group input { width: auto; cursor: pointer; }
input[type="date"], input[type="time"], select { color-scheme: dark; }
::-webkit-calendar-picker-indicator { filter: invert(100%) !important; cursor: pointer; opacity: 1; }
.password-wrapper { position: relative; width: 100%; }
.password-wrapper input { width: 100%; padding-right: 50px !important; }
.password-toggle-btn { width: auto !important; background: transparent !important; box-shadow: none !important; border: none !important; padding: 0 10px !important; height: 100%; position: absolute; top: 0; right: 0; cursor: pointer; z-index: 50; display: flex; align-items: center; justify-content: center; opacity: 0.7; transition: opacity 0.3s; }
.password-toggle-btn:hover { opacity: 1; transform: none !important; }
.password-toggle-btn img { width: 24px; height: 24px; pointer-events: none; }
input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear { display: none !important; }
input:-webkit-autofill { -webkit-text-fill-color: white !important; box-shadow: 0 0 0 30px #1e293b inset !important; }

/* =========================================
   5. RESPONSIVE MOBILE FIXES
   ========================================= */
@media (max-width: 768px) {
    /* Stack everything vertically */
    .landing-grid { 
        display: flex; 
        flex-direction: column; 
        align-items: center;
        width: 100%;
        padding: 0 10px; /* Safe area padding */
    }

    /* Resize Logos for Mobile */
    .logo-cell img {
        width: 160px; /* Smaller on mobile to save space */
    }

    /* Resize Text for Mobile */
    .main-title { 
        font-size: 1.6rem; 
        line-height: 1.3;
    }
    .sub-title { 
        font-size: 1rem; 
        margin-top: 10px;
    }

    /* Reset order so they stack naturally in HTML order */
    /* (Logo1 -> Logo2 -> Text -> Btn1 -> Btn2) */
    .logo-cell, .text-cell, .btn-cell {
        order: initial;
        width: 100%;
        justify-content: center;
        margin-bottom: 15px;
    }

    .landing-wrapper {
        padding-top: 40px;
        padding-bottom: 40px;
        justify-content: flex-start; /* Allow scrolling from top */
        height: auto; /* Allow content to dictate height on mobile */
    }
}

/* =========================================
   6. ADMIN FOOTER LINK
   ========================================= */
.admin-footer-link {
    position: fixed;
    bottom: 10px;
    width: 100%;
	font-size: 0.6rem;
    text-align: center;
    z-index: 1000;
}
.admin-footer-link a {
    color: white;
    text-decoration: none;
 /*   font-size: 0.5rem; */
    text-transform: uppercase;
    letter-spacing: 1px;
}
.admin-footer-link a:hover {
    color: white;
}