/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #102542, #f87060); /* Match your body background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Ensure it's on top of everything */
    transition: opacity 0.5s ease; /* Smooth fade-out */
}

.loader {
    border: 8px solid rgba(255, 255, 255, 0.3); /* Light border for the circle */
    border-top: 8px solid #f87060; /* Colored part of the spinner */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite; /* Spinning animation */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Rest of your existing CSS (from previous response) */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(120deg, #102542, #f87060); /* Your existing gradient */
    min-height: 100vh;
    display: flex; /* Use flexbox for overall layout */
    flex-direction: column;
    justify-content: space-between; /* Pushes footer to bottom */
    color: #fff; /* Default text color for body */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Header Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.15); /* Slightly less opaque for better blend */
    backdrop-filter: blur(12px); /* Increased blur for more depth */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    border-bottom: 1px solid rgba(255,255,255,0.25); /* Stronger border for separation */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow for lift */
    position: sticky; /* Make navbar sticky */
    top: 0;
    z-index: 1000; /* Ensure it stays on top */
}

.logo {
    color: #fff;
    font-size: 24px; /* Slightly larger logo */
    font-weight: 700; /* Bolder for impact */
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px; /* Increased gap for better spacing */
    list-style: none;
    transition: transform 0.3s ease-in-out; /* Smooth transition for mobile menu */
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 16px; /* Slightly larger font size */
    padding: 5px 0; /* Add padding for better hover area */
    position: relative; /* For underline effect */
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #f87060; /* Highlight color for underline */
    transition: width 0.3s ease-out;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #f87060; /* Color change on hover */
}

/* Burger Menu (for mobile) */
.burger-menu {
    display: none; /* Hidden by default */
    cursor: pointer;
    z-index: 1001; /* Ensure it's above other elements */
}

.burger-menu div {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px;
    transition: all 0.3s ease;
}

/* Container and Forms */
.container {
    flex-grow: 1; /* Allows container to take available space */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Add some padding around the container */
}

.glassy {
    background: rgba(255, 255, 255, 0.1); /* Slightly more transparent */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Stronger border */
    backdrop-filter: blur(15px); /* Increased blur for a softer look */
    border-radius: 20px; /* More rounded corners */
    padding: 40px; /* Increased padding */
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.2); /* Enhanced shadow for depth */
    animation: fadeIn 1s ease-out; /* Fade in animation */
    width: 100%; /* Ensure it takes full width on smaller screens */
    max-width: 450px; /* Increased max-width for forms */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-box h2,
.popup-content h3 {
    text-align: center;
    margin-bottom: 30px; /* Increased margin */
    color: #fff;
    font-weight: 600;
    font-size: 28px; /* Larger headings */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Subtle text shadow */
}

.input-icon {
    position: relative;
    margin-bottom: 25px; /* Increased margin between inputs */
}

.input-icon i {
    position: absolute;
    top: 50%; /* Center vertically */
    left: 15px; /* Adjust left position */
    transform: translateY(-50%); /* Fine-tune vertical alignment */
    color: #f87060; /* Icon color */
    font-size: 18px; /* Slightly larger icons */
}

input,
select { /* Apply styles to select as well */
    width: 100%;
    padding: 15px 15px 15px 45px; /* Adjust padding for icon */
    border: 1px solid rgba(255,255,255,0.3); /* Subtle border for inputs */
    border-radius: 10px; /* More rounded input fields */
    background: rgba(255,255,255,0.25); /* Slightly less opaque background */
    color: #fff;
    outline: none;
    font-size: 16px; /* Larger font size for inputs */
    transition: all 0.3s ease; /* Smooth transition on focus */
}

input:focus,
select:focus {
    background: rgba(255,255,255,0.35); /* Slightly brighter on focus */
    border-color: #f87060; /* Highlight border on focus */
    box-shadow: 0 0 8px rgba(248, 112, 96, 0.5); /* Soft glow on focus */
}

input::placeholder {
    color: #e0e0e0; /* Lighter placeholder text */
    opacity: 0.8;
}

select {
    appearance: none; /* Remove default select arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20fill%3D%22%23f87060%22%20d%3D%22M205.66%2099.34L128%20177l-77.66-77.66a8%208%200%200%200-11.32%2011.32l83.33%2083.34a8%208%200%200%200%2011.32%200l83.33-83.34a8%208%200%200%200-11.32-11.32z%22/%3E%3C/svg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    cursor: pointer;
    padding-right: 40px; /* Space for custom arrow */
}

.btn { /* Renamed 'button' to 'btn' for consistency, updated in HTML */
    width: 100%;
    background: #f87060;
    color: #fff;
    border: none;
    padding: 15px; /* Increased padding */
    border-radius: 10px; /* More rounded button */
    font-weight: 700; /* Bolder font */
    font-size: 17px; /* Larger font size */
    cursor: pointer;
    transition: all 0.3s ease; /* Smooth transitions */
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(248, 112, 96, 0.4); /* Button shadow */
}

.btn:hover {
    background: #102542;
    transform: translateY(-2px); /* Slight lift on hover */
    box-shadow: 0 6px 12px rgba(16, 37, 66, 0.4); /* Deeper shadow on hover */
}

.form-links {
    margin-top: 25px; /* Increased margin */
    text-align: center;
    display: flex; /* Use flexbox for links */
    justify-content: space-around; /* Distribute links evenly */
    flex-wrap: wrap; /* Allow links to wrap on smaller screens */
    gap: 10px; /* Gap between links */
}

.form-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.form-links a:hover {
    color: #f87060; /* Highlight on hover */
    text-decoration: underline;
}

/* Popups */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 37, 66, 0.9); /* Slightly darker overlay */
    display: none; /* Controlled by JS */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Higher z-index for popups */
    opacity: 0; /* For fade in/out animation */
    transition: opacity 0.3s ease;
}

.popup.show { /* Class added by JS to show popup */
    opacity: 1;
    display: flex;
}

.popup-content {
    width: 90%;
    max-width: 500px; /* Increased max-width for popup forms */
    padding: 35px; /* Increased padding */
    position: relative;
    transform: translateY(-20px); /* For slide-in effect */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.popup.show .popup-content {
    transform: translateY(0);
}

.close {
    position: absolute;
    right: 20px; /* Adjust position */
    top: 15px; /* Adjust position */
    font-size: 28px; /* Larger close icon */
    color: #f87060;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close:hover {
    transform: rotate(90deg); /* Rotate on hover */
    color: #fff;
}

.footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px); /* Slightly increased blur */
    text-align: center;
    padding: 20px; /* Increased padding */
    font-size: 15px; /* Slightly larger font */
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.15); /* Subtle top border */
    margin-top: auto; /* Pushes footer to the bottom */
}

.footer a {
    color: #f87060;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap; /* Allow items to wrap */
        padding: 15px 25px; /* Reduced padding */
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        text-align: center;
        background: rgba(16, 37, 66, 0.95); /* Darker background for mobile menu */
        position: absolute;
        top: 60px; /* Position below navbar */
        left: 0;
        transform: translateX(-100%); /* Hidden by default */
        padding: 20px 0;
        border-top: 1px solid rgba(255,255,255,0.2);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .nav-links.nav-active {
        transform: translateX(0); /* Show when active */
    }

    .nav-links li {
        margin: 10px 0;
    }

    .burger-menu {
        display: block; /* Show burger menu */
    }

    /* Burger animation */
    .burger-menu.toggle .bar1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .burger-menu.toggle .bar2 {
        opacity: 0;
    }

    .burger-menu.toggle .bar3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .container {
        margin: 30px auto; /* Adjust margin for mobile */
        padding: 15px;
    }

    .glassy {
        padding: 30px; /* Reduced padding for smaller screens */
    }

    .form-box h2,
    .popup-content h3 {
        font-size: 24px; /* Slightly smaller headings on mobile */
        margin-bottom: 20px;
    }

    input,
    select {
        padding: 12px 12px 12px 40px; /* Adjust padding for smaller inputs */
        font-size: 15px;
    }

    .input-icon i {
        font-size: 16px;
        left: 12px;
    }

    .btn {
        padding: 12px;
        font-size: 16px;
    }

    .form-links {
        flex-direction: column; /* Stack links vertically */
        gap: 8px;
    }

    .popup-content {
        padding: 25px; /* Reduced padding for popups on mobile */
    }

    .close {
        font-size: 24px;
        right: 15px;
        top: 10px;
    }
}

/* Even Smaller Screens (e.g., iPhone 5/SE) */
@media (max-width: 480px) {
    .navbar {
        padding: 15px 15px;
    }

    .logo {
        font-size: 20px;
    }

    .form-box h2,
    .popup-content h3 {
        font-size: 22px;
    }
}
