@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-glow: #00ff87;
    --secondary-glow: #66ffbe;
    --bg-color: #0a2f2c;
    --input-bg: rgba(0, 0, 0, 0.3);
    --text-color: #e0f2f1;
    --text-muted: #80cbc4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 20px;
}

#bgVideo {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; z-index: -1;
}

.aurora-bg {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden; z-index: -1;
}
.aurora {
    position: absolute; border-radius: 50%;
    mix-blend-mode: screen; opacity: 0.4;
    filter: blur(80px);
}
.aurora.a1 { width: 40vw; height: 40vw; background: #00ff87; animation: move 20s infinite alternate; }
.aurora.a2 { width: 50vw; height: 50vw; background: #66ffbe; animation: move 25s infinite alternate-reverse; top: 10vh; left: 20vw; }
.aurora.a3 { width: 30vw; height: 30vw; background: #00a759; animation: move 15s infinite alternate; bottom: 5vh; right: 10vw; }

@keyframes move {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(40vw, 20vh) rotate(180deg); }
}

.container {
    background: rgba(10, 47, 44, 0.5);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 135, 0.2);
    border-radius: 20px;
    width: 100%;
    max-width: 850px;
    padding: 40px;
    box-shadow: 0 0 50px rgba(0, 255, 135, 0.1);
    animation: fadeIn 1.5s ease-out;
    max-height: 95vh;
    overflow-y: auto;
}

@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

h2 { text-align: center; margin-bottom: 30px; font-size: 32px; text-shadow: 0 0 10px var(--primary-glow); }

.form-columns { display: flex; flex-wrap: wrap; gap: 30px; }
.form-column { flex: 1; min-width: 300px; }
.form-group { position: relative; margin-bottom: 30px; }

.wave-label {
    position: absolute; top: 13px; left: 15px;
    pointer-events: none; transition: all 0.3s ease;
}
.wave-label span {
    display: inline-block; font-size: 16px;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

input:focus + .wave-label span,
input:not(:placeholder-shown) + .wave-label span,
select:focus + .wave-label span,
select:valid + .wave-label span {
    transform: translateY(-28px); font-size: 13px; color: var(--primary-glow);
}

/* Fix for Date of Birth label behavior */
input[type="date"] + .wave-label span {
    transform: translateY(-28px);
    font-size: 13px;
    color: var(--primary-glow);
}
input[type="date"]:invalid + .wave-label span {
    transform: translateY(0);
    font-size: 16px;
    color: var(--text-muted);
}

input, select {
    width: 100%; padding: 12px 15px;
    background: var(--input-bg); border: none;
    border-bottom: 2px solid rgba(0, 255, 135, 0.3);
    color: var(--text-color); font-size: 16px;
    outline: none; border-radius: 8px 8px 0 0;
    position: relative; appearance: none;
}
 select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0f2f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.input-border {
    position: absolute; bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--primary-glow);
    transition: all 0.4s ease;
}

input:focus ~ .input-border, select:focus ~ .input-border { width: 100%; left: 0; }

.checkbox-group { display: flex; align-items: center; margin-bottom: 25px; }
.checkbox-group input[type="checkbox"] { display: none; }
.checkbox-group label {
    cursor: pointer; display: flex; align-items: center;
    font-size: 14px; color: var(--text-muted);
}
.custom-checkbox {
    width: 22px; height: 22px;
    border: 2px solid rgba(0, 255, 135, 0.3);
    border-radius: 6px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.custom-checkbox .checkmark {
    width: 12px; height: 12px;
    background-color: var(--primary-glow);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    transform: scale(0);
    transition: transform 0.2s ease;
}
.checkbox-group input[type="checkbox"]:checked + label .custom-checkbox {
    border-color: var(--primary-glow);
}
.checkbox-group input[type="checkbox"]:checked + label .checkmark {
    transform: scale(1);
}

.gooey-button {
    width: 100%; padding: 15px; border: none;
    border-radius: 12px; background: rgb(9, 79, 84);
    color: var(--text-color); font-size: 18px; font-weight: 700;
    cursor: pointer; position: relative;
    filter: contrast(20); overflow: hidden;
    transition: all 0.3s ease;
}
.gooey-button .blobs { position: absolute; top: 0; left: 0; width: 100%; height: 100%; filter: blur(10px); }
.gooey-button .blob { position: absolute; background: var(--primary-glow); border-radius: 50%; width: 30px; height: 30px; transition: all 0.5s ease; }
.gooey-button:hover .blob:nth-child(1) { transform: translate(80px, 20px) scale(1.5); }
.gooey-button:hover .blob:nth-child(2) { transform: translate(150px, -10px) scale(1.2); }
.gooey-button:hover .blob:nth-child(3) { transform: translate(220px, 30px); }
.gooey-button:disabled { background: #5a5a5a; filter: none; cursor: not-allowed; }
.gooey-button-text { position: relative; z-index: 1; }

.login-link { text-align: center; margin-top: 25px; font-size: 14px; color: var(--text-muted); }
.login-link a { color: var(--primary-glow); text-decoration: none; font-weight: 600; }

/* Style for the error message container */
.error-message {
    background-color: rgba(255, 69, 58, 0.2);
    border: 1px solid rgba(255, 69, 58, 0.5);
    color: #ffb2ad;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    display: none; /* Hidden by default */
    transition: all 0.3s ease;
}

/* --- Mobile Responsive Styles --- */
/* This code applies only to screens 768px wide or smaller */
@media (max-width: 768px) {
    .container {
        padding: 25px 20px;
        margin: 15px;
        max-height: 95vh;
    }

    h2 {
        font-size: 26px;
    }

    .form-columns {
        /* Stack columns vertically on mobile */
        flex-direction: column;
        gap: 0;
    }

    .form-column {
        min-width: 100%;
    }
    
    .form-group {
        margin-bottom: 28px;
    }
}
