@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* --- General --- */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top for scrolling */
    min-height: 100vh; /* Changed to min-height */
    background: linear-gradient(to top, #87CEEB, #B0E0E6); /* Sky blue theme */
    overflow-y: auto; /* Allow vertical scroll if needed */
    position: relative; /* For bubble container */
    padding: 2rem 0; /* Add padding for top/bottom spacing */
}

/* --- Background Bubbles --- */
.bubbles-background {
    position: absolute; /* Changed to absolute to scroll with body */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0; /* Will be at least 100vh */
    min-height: 100%;
    z-index: 0; /* Behind content */
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -150px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    animation: rise 25s infinite ease-in;
    opacity: 0.2; /* Start with 0.2 opacity */
}

/* Colorful bubbles with different timings */
.bubble:nth-child(1)  { left: 10%; animation-duration: 20s; background: #ffbe0b; }
.bubble:nth-child(2)  { left: 20%; animation-duration: 15s; animation-delay: 1s; background: #fb5607; }
.bubble:nth-child(3)  { left: 35%; animation-duration: 30s; background: #ff006e; }
.bubble:nth-child(4)  { left: 50%; animation-duration: 18s; animation-delay: 2s; background: #8338ec; }
.bubble:nth-child(5)  { left: 65%; animation-duration: 22s; background: #3a86ff; }
.bubble:nth-child(6)  { left: 80%; animation-duration: 17s; animation-delay: 1s; background: #4cc9f0; }
.bubble:nth-child(7)  { left: 90%; animation-duration: 28s; background: #3cff00; }
.bubble:nth-child(8)  { left: 55%; animation-duration: 16s; animation-delay: 3s; background: #fcf300; }
.bubble:nth-child(9)  { left: 25%; animation-duration: 21s; background: #f08080; }
.bubble:nth-child(10) { left: 75%; animation-duration: 19s; animation-delay: 2s; background: #9b59b6; }


@keyframes rise {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 0.2; /* Fade in */
    }
    90% {
        opacity: 0.2; /* Stay visible */
    }
    100% {
        /* Rise 100vh + the 150px it starts from */
        transform: translateY(calc(-100vh - 150px)); 
        opacity: 0; /* Fade out */
    }
}

/* --- Glass Form Container --- */
.auth-container {
    background-color: rgba(255, 255, 255, 0.15); /* Glass effect */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px 40px; /* Adjusted padding */
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 420px; /* Slightly wider */
    max-width: 90%; /* Responsive */
    text-align: center;
    z-index: 2; /* In front of bubbles */
    position: relative;
    transition: box-shadow 0.3s ease;
    margin: 2rem 0; /* Add vertical margin for scrolling */
}

/* Blue-light hover effect */
.auth-container:hover {
    box-shadow: 0 8px 40px rgba(0, 123, 255, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.3);
}

h2 {
    color: #fff; /* White title */
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.auth-subtitle {
    color: #f0f8ff; /* Light blue/white subtitle */
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* --- Form Elements --- */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff; /* White label */
    font-weight: 600;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.3); /* Semi-transparent input */
    color: #111; /* Dark text for readability */
    font-size: 1rem;
}
.input-group input::placeholder {
    color: #333;
}
.input-group input:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

/* Password eye icon */
.password-group {
    position: relative;
}
.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(25%); /* Adjust for label */
    cursor: pointer;
    color: #555;
    z-index: 3;
}
/* Move icon down to be inside the input box */
.input-group label ~ .toggle-password { 
     top: 48px; /* Specific position based on label height */
     transform: none;
}


/* --- Auth Button --- */
.auth-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(90deg, #007BFF, #0056b3);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s, opacity 0.3s;
}

.auth-btn:hover {
    transform: scale(1.03);
}

/* --- Disabled Button Style (Themed) --- */
.auth-btn:disabled {
    /* Use a lighter, faded blue that matches your theme */
    background: linear-gradient(90deg, #007BFF, #0056b3);
    opacity: 0.5; /* Make it 50% transparent */
    color: #e0e0e0; /* Lighter text color */
    cursor: not-allowed; /* Show the "not-allowed" mouse cursor */
    transform: none; /* No hover effect */
}

.auth-btn:disabled:hover {
    transform: none; /* Ensure no hover effect */
    opacity: 0.5; /* Keep it faded */
}

/* --- NEW: Forgot Password Link --- */
.forgot-password-link {
    text-align: right;
    margin-top: -10px; /* Pull it up closer to password field */
    margin-bottom: 20px;
}
.forgot-password-link a {
    font-size: 0.9rem;
    color: #f0f8ff;
    text-decoration: none;
}
.forgot-password-link a:hover {
    text-decoration: underline;
    color: #fff;
}

/* --- Form Switching & Error Messages --- */
.switch-form {
    margin-top: 20px;
    font-size: 14px;
    color: #f0f8ff;
}

.switch-form a {
    color: #fff; /* White link */
    text-decoration: none;
    font-weight: bold;
}
.switch-form a:hover {
    text-decoration: underline;
}

.auth-error,
.auth-success {
    color: #fff;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-weight: 500;
}
.auth-error {
    background-color: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.5);
}
.auth-success {
     background-color: rgba(76, 175, 80, 0.2);
     border: 1px solid rgba(100, 255, 100, 0.5);
}

/* --- Password Validation Checklist --- */
#password-strength {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
    display: none; /* Hide by default, show with JS */
}
#password-strength p {
    margin: 0 0 10px 0;
    color: #fff;
    font-weight: 600;
}
#password-strength ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
#password-strength li {
    font-size: 0.85rem;
    color: #ffcdd2; /* Red (invalid) by default */
    padding-left: 25px;
    position: relative;
    margin-bottom: 5px;
    transition: color 0.3s;
}
#password-strength li::before {
    content: '\2717'; /* X mark */
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}

/* Valid state for checklist */
#password-strength li.valid {
    color: #c8e6c9; /* Green (valid) */
}
#password-strength li.valid::before {
    content: '\2713'; /* Check mark */
}

/* --- Password Match Status --- */
.validation-status {
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 15px;
    padding: 8px;
    border-radius: 4px;
    display: none; /* Hidden by default */
}
.validation-status.valid {
    background-color: rgba(76, 175, 80, 0.2);
    color: #c8e6c9; /* Light green text */
    display: block;
}
.validation-status.invalid {
    background-color: rgba(244, 67, 54, 0.2);
    color: #ffcdd2; /* Light red text */
    display: block;
}


/* --- Terms & Conditions Group --- */
.terms-group {
    display: flex;
    align-items: flex-start; /* Align top */
    justify-content: flex-start; /* Align left */
    margin-bottom: 20px; /* More space */
    text-align: left;
    font-size: 0.9rem;
    color: #eee;
}
.terms-group input[type="checkbox"] {
    width: auto; /* Override default 100% */
    margin-right: 10px;
    margin-top: 4px; /* Align with first line of text */
    flex-shrink: 0; /* Don't shrink checkbox */
    accent-color: #007BFF; /* Make checkbox blue */
}
.terms-group label {
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.4;
}
.terms-group a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}
.terms-group a:hover {
    color: #a0d8ff;
}

/* Error message for terms */
#terms-error {
    display: none; /* Hide by default */
    text-align: left;
    margin-top: -10px;
    margin-bottom: 15px;
}

/* --- Social Login Divider --- */
.social-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #eee;
    margin: 25px 0;
}
.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.social-divider span {
    padding: 0 15px;
    font-weight: 500;
}

/* --- Social Login Buttons --- */
.social-login-buttons {
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px; /* Add space between buttons */
    margin-bottom: 20px;
}
.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.3s, box-shadow 0.3s;
    border: 1px solid transparent; /* Base border */
}

.google-btn {
    background-color: #fff;
    color: #444;
    border-color: #ddd;
}
.google-btn:hover {
    background-color: #f8f8f8;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.google-btn img {
    width: 20px;
    height: 20px;
}

.facebook-btn {
    background-color: #1877F2;
    color: #fff;
    border-color: #1877F2;
}
.facebook-btn:hover {
    background-color: #166eeb;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.facebook-btn i {
    font-size: 1.2rem;
    /* Adjust for Font Awesome icon alignment */
    position: relative;
    top: 1px;
}

