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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px; /* Controls the density of the grid */
}

.auth-container {
    display: flex;
    width: 700px; 
    height: 700px;
    background-color: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    position: relative;
}

.info-section {
    flex: 1;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px;
    color: #fff;
}

.info-content h2 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 600;
}

.info-content p {
    font-size: 18px;
    color: #bdc3c7;
    line-height: 1.6;
    max-width: 400px;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.header-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 15px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-logo:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.form-header h1 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 5px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.form-header h1:hover {
    opacity: 0.7;
}

.form-header p {
    color: #888;
}

.form-toggle {
    display: flex;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
}

.toggle-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2;
}
.toggle-btn.active {
    color: #fff;
    background: #3e3e3e;
}

.forms-container {
    overflow: hidden;
    position: relative;
    flex-grow: 1;
}

.forms-wrapper {
    display: flex;
    width: 200%;
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    transition: color 0.2s;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background-color: #2c2c2c;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.input-group input:focus + i {
    color: #3498db;
}

.auth-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(90deg, #2d169e, #511ca0);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 10px;
}

.auth-btn:hover {
    box-shadow: 0px 17px 15px rgb(0 0 0 / 30%);
    transform: translateY(-2px);
}




.forgot-password:hover {
    color: #3498db;
}

.form-container {
    width: 50%;
    padding: 0 1px;
}

.message {
    position: absolute;
    bottom: 20px;
    left: 50px;
    right: 50px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    display: none;
    font-weight: 500;
    animation: fadeIn 0.3s;
}

.message.error {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    display: block;
}

.message.success {
    background-color: rgba(39, 174, 96, 0.2);
    color: #27ae60;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column-reverse;
        width: 90%;
        height: auto;
        max-height: 95vh;
        overflow-y: auto;
    }

    .auth-panel {
        padding: 30px; /* Less padding on mobile */
    }

    .welcome-panel {
        padding-bottom: 30px;
    }

    .info-section {
        display: none;
    }

    .form-toggle {
        margin-bottom: 25px;
    }

    .toggle-btn {
        font-size: 15px;
        padding: 10px;
    }

    .auth-btn {
        font-size: 16px;
        padding: 12px;
    }

    .message {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 20px;
    }

    .form-header h1 {
        font-size: 22px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}