@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --text-color: #333;
    --bg-color: #fff;
}

[dir="rtl"] {
    font-family: 'Tajawal', sans-serif;
}

[dir="ltr"] {
    font-family: 'Roboto', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 20px;
    transition: all 0.3s ease;
}
.home-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

[dir="rtl"] .home-button {
    left: auto;
    right: 20px;
}
.home-btn:hover {
    animation: pulse 0.3s ease;
}

.home-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: var(--primary-color);
    color: white;
}

.home-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.home-btn:hover i {
    transform: scale(1.1);
}


/* زر تبديل اللغة */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

[dir="rtl"] .language-switcher {
    right: auto;
    left: 20px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 25px;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.lang-btn i {
    color: var(--primary-color);
    font-size: 18px;
}

.lang-btn span {
    font-weight: bold;
    color: var(--primary-color);
}

.container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 550px;
    background: var(--bg-color);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.login-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.register-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.active .login-container {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}

.container.active .register-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 2;
}

form {
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    height: 100%;
}

h1 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.input-group {
    position: relative;
    margin: 15px 0;
    width: 100%;
}

.input-group input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    transition: all 0.3s;
}

[dir="rtl"] .input-group input {
    padding: 12px 15px 12px 40px;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(106, 17, 203, 0.3);
}

.input-group i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

[dir="ltr"] .input-group i {
    right: 15px;
}

[dir="rtl"] .input-group i {
    left: 15px;
}

.forgot-password {
    align-self: flex-end;
    margin-bottom: 15px;
}

.forgot-password a {
    color: var(--primary-color);
    font-size: 14px;
    text-decoration: none;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.4);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #555;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.toggle-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    z-index: 10;
}

.container.active .toggle-container {
    transform: translateX(-100%);
}

.toggle {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    text-align: center;
    color: white;
    transition: all 0.6s ease-in-out;
}

.toggle-left {
    transform: translateX(-100%);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.toggle-right {
    right: 0;
    transform: translateX(0);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.container.active .toggle-left {
    transform: translateX(0);
}

.container.active .toggle-right {
    transform: translateX(100%);
}

.toggle h1 {
    color: white;
    margin-bottom: 20px;
}

.toggle p {
    margin-bottom: 20px;
    font-size: 16px;
}

.toggle-btn {
    padding: 10px 30px;
    border: 2px solid white;
    border-radius: 30px;
    background: transparent;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn:hover {
    background: white;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .container {
        height: auto;
        max-width: 500px;
    }
    
    .login-container,
    .register-container {
        width: 100%;
        position: relative;
    }
    
    .toggle-container {
        display: none;
    }
    
    .container.active .login-container,
    .container.active .register-container {
        transform: none;
    }
    
    .language-switcher {
        top: 10px;
        right: 10px;
    }
    
    [dir="rtl"] .language-switcher {
        right: auto;
        left: 10px;
    }
}