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

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

body {
    background-color: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
    /* Subtle background pattern/gradient for premium feel */
    background: radial-gradient(circle at center, #1e1e2f 0%, #121212 100%);
}

.container {
    background-color: #1e1e1e;
    border-radius: 20px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4), 0 10px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    width: 900px;
    max-width: 100%;
    min-height: 550px;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.login-container {
    right: 0;
    width: 50%;
    z-index: 1;
}

.register-container {
    left: 0;
    width: 50%;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.container.right-panel-active .register-container {
    opacity: 1;
    pointer-events: auto;
}

.container.right-panel-active .login-container {
    opacity: 0;
    pointer-events: none;
}

form {
    background-color: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

h1 {
    font-weight: 700;
    margin-bottom: 25px;
    color: #fff;
    letter-spacing: 1px;
}

.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    background-color: #2d2d2d;
    border: 2px solid transparent;
    padding: 15px 20px 15px 45px; /* left padding for icon */
    border-radius: 8px;
    color: #fff;
    outline: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #00ff88;
    background-color: #252525;
}

.input-group input::placeholder {
    color: #888;
}

.input-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    transition: all 0.3s ease;
}

.input-group input:focus + i {
    color: #00ff88;
}

.forgot-password {
    color: #888;
    font-size: 13px;
    text-decoration: none;
    margin: 5px 0 15px;
    align-self: flex-end;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #00ff88;
}

.primary-btn {
    border-radius: 8px;
    border: none;
    background-color: #00ff88;
    color: #121212;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
}

.primary-btn:active {
    transform: scale(0.97);
}

.primary-btn:hover {
    background-color: #00cc6a;
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.6);
}

.social-text {
    margin: 25px 0 15px;
    font-size: 13px;
    color: #888;
}

.social-media {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    height: 45px;
    width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #333;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    border-color: #00ff88;
    color: #00ff88;
    background-color: rgba(0, 255, 136, 0.1);
    transform: translateY(-3px);
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out, border-radius 0.6s ease-in-out;
    z-index: 100;
    /* Default: Overlay on the left, curve on right */
    border-radius: 20px 150px 150px 20px;
}

.container.right-panel-active .overlay-container {
    transform: translateX(100%);
    /* Active: Overlay on right, curve on left */
    border-radius: 150px 20px 20px 150px;
}

.overlay {
    background: #00ff88;
    background: linear-gradient(135deg, #00b35f, #00ff88);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
    color: #121212;
    position: absolute;
    left: 0;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay {
    transform: translateX(-50%);
}

.overlay-panel {
    position: absolute;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    height: 100%;
    width: 50%;
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

.overlay-left {
    left: 0;
    opacity: 1;
    transform: translateX(0);
}

.container.right-panel-active .overlay-left {
    opacity: 0;
    transform: translateX(-20%);
}

.overlay-right {
    right: 0;
    opacity: 0;
    transform: translateX(20%);
}

.container.right-panel-active .overlay-right {
    opacity: 1;
    transform: translateX(0);
}

.overlay-panel h1 {
    font-size: 34px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.overlay-panel p {
    font-size: 15px;
    font-weight: 300;
    line-height: 22px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.ghost-btn {
    background-color: transparent;
    border-color: #121212;
    border: 2px solid #121212;
    border-radius: 8px;
    color: #121212;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ghost-btn:hover {
    background-color: #121212;
    color: #00ff88;
    box-shadow: 0 4px 15px rgba(18, 18, 18, 0.4);
}

.ghost-btn:active {
    transform: scale(0.95);
}

/* =========================================
   Mobile Responsiveness
   ========================================= */
@media (max-width: 768px) {
    .container {
        min-height: 100vh;
        width: 100%;
        border-radius: 0;
    }
    
    .form-container {
        width: 100%;
        height: 65%;
        top: 35%;
        transition: opacity 0.3s ease-in-out;
    }
    
    .login-container {
        right: 0;
        opacity: 1;
        z-index: 2;
        pointer-events: auto;
    }
    
    .register-container {
        left: 0;
        opacity: 0;
        z-index: 1;
        pointer-events: none;
    }
    
    .container.right-panel-active .login-container {
        opacity: 0;
        z-index: 1;
        pointer-events: none;
    }
    
    .container.right-panel-active .register-container {
        opacity: 1;
        z-index: 2;
        pointer-events: auto;
    }

    .overlay-container {
        width: 100%;
        height: 35%;
        left: 0;
        top: 0;
        border-radius: 0 0 50px 50px !important;
        transform: none !important;
        z-index: 100;
        box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    }
    
    .overlay {
        width: 200%;
        height: 100%;
        transform: translateX(0) !important;
    }
    
    .container.right-panel-active .overlay {
        transform: translateX(-50%) !important;
    }
    
    .overlay-left, .overlay-right {
        transform: translateX(0);
        padding: 0 20px;
    }
    
    .container.right-panel-active .overlay-left {
        transform: translateX(0);
    }
    
    .container.right-panel-active .overlay-right {
        transform: translateX(0);
    }
    
    .overlay-panel h1 {
        font-size: 26px;
        margin-bottom: 5px;
    }
    
    .overlay-panel p {
        font-size: 13px;
        margin: 10px 0 20px;
    }
    
    .ghost-btn {
        padding: 10px 35px;
        font-size: 13px;
    }
    
    form {
        padding: 0 30px;
        justify-content: flex-start;
        padding-top: 30px;
    }
    
    h1 {
        font-size: 26px;
        margin-bottom: 20px;
    }
}
