* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
min-height: 100vh;
background: url('https://media.istockphoto.com/id/1168611666/photo/light-bulbs-concept.jpg?s=612x612&w=0&k=20&c=j5uEqOi4kDun0El_gKoMBX-TmFkex79WG05qEjb18Nw=') no-repeat center center fixed;
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
position: relative;
}

/* Add a dark overlay to ensure text readability */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 0;
}

.container {
position: relative;
z-index: 1;
background: rgba(255, 255, 255, 0.95);
padding: 40px;
border-radius: 24px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
width: 100%;
max-width: 520px;
backdrop-filter: blur(10px);
margin: 20px auto;
opacity: 0;
transform: translateY(20px);
animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix Google Sign-in button alignment */
.g_id_signin {
display: flex;
justify-content: center;
margin-top: 20px;
}

/* Fix form alignment */
form {
width: 100%;
max-width: 100%;
}

/* Fix logo alignment and size */
.logo img {
width: 120px;
height: 120px;
object-fit: cover;
border-radius: 12px;
}

.welcome-text {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-text h1 {
    color: #2D3748;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0;
    transform: scale(0.95);
    animation: fadeInScale 0.6s ease-out 0.5s forwards;
}

@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.welcome-text p {
    color: #718096;
    font-size: 16px;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    background: #EDF2F7;
    padding: 5px;
    border-radius: 12px;
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #4A5568;
    border-radius: 8px;
    transition: background 0.4s ease, color 0.4s ease, transform 0.2s ease;
}

.tab.active {
    background: #6B46C1;
    color: white;
    box-shadow: 0 4px 6px rgba(107, 70, 193, 0.2);
}

.tabs .tab:hover {
    transform: translateY(-2px);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4A5568;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #F7FAFC;
}

.form-group input:focus {
    outline: none;
    border-color: #6B46C1;
    background: white;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #718096;
    font-size: 20px;
    background: none;
    border: none;
    padding: 0;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: #6B46C1;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(107, 70, 193, 0.2);
}

.submit-btn:hover {
    background: #553C9A;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(107, 70, 193, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3);
}

.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
    color: #718096;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #E2E8F0;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.google-btn {
    width: 100%;
    padding: 14px;
    background: white;
    color: #2D3748;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.google-btn:hover {
    background: #F7FAFC;
    border-color: #CBD5E0;
    transform: translateY(-1px);
}

.google-btn img {
    width: 24px;
    margin-right: 12px;
}

.error-message {
    color: #E53E3E;
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #FFF5F5;
    border: 1px solid #FED7D7;
    display: none;
    font-size: 14px;
}

.success-message {
    color: #2F855A;
    background: #F0FFF4;
    border: 1px solid #C6F6D5;
}

/* Loading animation */
.loading {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    justify-content: center;
    align-items: center;
    border-radius: 24px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E2E8F0;
    border-top: 4px solid #6B46C1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .container {
        padding: 24px;
    }

    .welcome-text h1 {
        font-size: 20px;
    }

    .tab {
        padding: 10px;
        font-size: 14px;
    }
}

/* Container entry animation */
.container {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome modal styles */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.welcome-modal.visible {
    opacity: 1;
    visibility: visible;
}

.welcome-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.welcome-modal-content {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    max-width: 600px;
    width: 90vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    transform: translateY(-50px);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
}

.welcome-modal.visible .welcome-modal-content {
    transform: translateY(0);
}

.welcome-modal-header {
    background: linear-gradient(to right, #6B46C1, #4A6CF7);
    color: white;
    padding: 20px 30px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
}

.close-welcome-btn {
    position: static;
    background: none;
    border: none;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
}

.close-welcome-btn:hover {
    color: white;
}

.welcome-modal-body {
    padding: 30px;
    flex-grow: 1;
    text-align: center;
}

.welcome-modal-body p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.welcome-modal-body h3 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out 0.8s forwards;
}

.welcome-modal-body ul {
    text-align: left;
    margin: 1rem auto;
    padding-left: 20px;
    max-width: 400px;
    color: #555;
}

.welcome-modal-body ul li {
    margin-bottom: 0.6rem;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    padding-bottom: 4px;
}

.welcome-modal-body ul li::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #4A6CF7;
    transition: width 0.6s ease-out;
}

.welcome-modal-footer {
    background: #f0f0f0;
    padding: 15px 30px;
    font-size: 0.9em;
    color: #777;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.welcome-modal.visible .welcome-modal-overlay {
    animation: fadeIn 0.4s ease-out forwards;
}

.welcome-modal.visible .welcome-modal-content {
    animation: slideUp 0.6s ease-out forwards;
}

/* Ensure forms stack properly */
#loginForm, 
#signupForm, 
#forgotPasswordForm {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Style the cancel button */
.cancel-btn {
    background: #f0f0f0;
    color: #333;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

#forgotPasswordForm {
    display: none;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.cancel-btn {
    background: #f0f0f0;
    color: #333;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

/* login.css */
#forgotPasswordForm {
    display: none;
    position: relative;
    z-index: 1000;
}
#forgotPasswordForm.visible {
    display: block !important;
    opacity: 1;
    visibility: visible;
}
.forgot-password button {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font: inherit;
}
.forgot-password button:hover {
    color: #0056b3;
}
.error-message {
    display: none;
    color: red;
    margin-top: 10px;
}
.success-message {
    color: green;
}

/* login.css */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.tab {
    padding: 10px 20px;
    cursor: pointer;
    background: #f0f0f0;
    margin: 0 5px;
    border-radius: 5px;
    transition: background 0.3s;
}
.tab.active {
    background: #007bff;
    color: white;
    font-weight: bold;
}
.tab:focus {
    outline: 2px solid #007bff;
}
#forgotPasswordForm {
    display: none;
    position: relative;
    z-index: 1000;
}
#forgotPasswordForm.visible {
    display: block !important;
    opacity: 1;
    visibility: visible;
}
.forgot-password button, .form-navigation button {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font: inherit;
}
.forgot-password button:hover, .form-navigation button:hover {
    color: #0056b3;
}
.error-message {
    display: none;
    color: red;
    margin-top: 10px;
}
.success-message {
    color: green;
}
.form-navigation {
    margin-top: 10px;
}

/* Animation keyframes */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for list items (requires JS or individual delays) */
/* Adding base animation here, will add delays via JS if needed */
.welcome-modal.visible .welcome-modal-body h3,
.welcome-modal.visible .welcome-modal-body ul li {
    animation: fadeInUp 0.6s ease-out forwards;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(1) {
    animation-delay: 1s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(1)::after {
    transition-delay: 1s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(2) {
    animation-delay: 1.1s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(2)::after {
    transition-delay: 1.1s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(3) {
    animation-delay: 1.2s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(3)::after {
    transition-delay: 1.2s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(4) {
    animation-delay: 1.3s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(4)::after {
    transition-delay: 1.3s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(5) {
    animation-delay: 1.4s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(5)::after {
    transition-delay: 1.4s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(6) {
    animation-delay: 1.5s;
}

.welcome-modal.visible .welcome-modal-body ul li:nth-child(6)::after {
    transition-delay: 1.5s;
}

/* Signup Success Popup Modal */
.signup-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2002; /* Higher than other modals */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.signup-success-modal.visible {
    opacity: 1;
    visibility: visible;
}

.signup-success-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.signup-success-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.signup-success-modal.visible .signup-success-modal-content {
    transform: translateY(0);
}

.close-signup-success-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-signup-success-btn:hover {
    color: #777;
}

.signup-success-modal-content h2 {
    color: #28a745; /* Green color for success */
    margin-top: 0;
    margin-bottom: 1rem;
}

.signup-success-modal-content p {
    color: #555;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.signup-success-modal-content p strong {
    color: #2c3e50;
}

.verify-email-btn {
    background: #007bff; /* Blue color for action */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 1.5rem;
}

.verify-email-btn:hover {
    background: #0056b3;
}

@media (max-width: 993px) {
  .main {
    display: block;
  }
}