@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
    --primary-color: #7494ec;
    --secondary-color: #c9d6ff;
    --transition-speed: 0.6s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    text-decoration: none;
    list-style: none;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, var(--secondary-color) 100%);
    overflow-x: hidden;
}

.container {
    position: relative;
    width: 900px;
    height: 600px;
    background: #fff;
    margin: 20px;
    border-radius: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
}

.container h1 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 700;
}

.container p {
    font-size: 14px;
    margin: 15px 0;
    color: #666;
}

form {
    width: 100%;
}

.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #333;
    text-align: center;
    padding: 50px;
    z-index: 1;
    transition: var(--transition-speed) ease-in-out 1s, visibility 0s 1s;
}

.container.active .form-box.login {
    right: 50%;
}

.form-box.register {
    visibility: hidden;
    right: -50%;
    transition: var(--transition-speed) ease-in-out 1s, visibility 0s 1s;
}

.container.active .form-box.register {
    visibility: visible;
    right: 0;
}

.input-box {
    position: relative;
    margin: 20px 0;
    width: 100%;
}

.input-box input {
    width: 100%;
    padding: 15px 45px 15px 20px;
    background: #f0f2f5;
    border-radius: 12px;
    border: 2px solid transparent;
    outline: none;
    font-size: 15px;
    color: #333;
    transition: 0.3s;
}

.input-box input:focus {
    border-color: var(--primary-color);
    background: #fff;
}

.input-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #888;
}

.forgot-link {
    margin: -10px 0 20px;
    text-align: right;
    width: 100%;
}

.forgot-link a {
    font-size: 13px;
    color: #555;
    transition: 0.3s;
}

.forgot-link a:hover {
    color: var(--primary-color);
}

.btn {
    width: 100%;
    height: 50px;
    background: var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}

.social-icons {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.social-icons a {
    display: inline-flex;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 50%;
    font-size: 20px;
    color: #555;
    margin: 0 10px;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.toggle-box::before {
    content: "";
    position: absolute;
    left: -250%;
    width: 300%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 150px;
    z-index: 2;
    transition: 1.5s ease-in-out;
    pointer-events: all;
}

.container.active .toggle-box::before {
    left: 50%;
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: 0.6s ease-in-out;
    padding: 0 40px;
    text-align: center;
    pointer-events: all;
}

.toggle-panel.toggle-left {
    left: 0;
    transition-delay: 0.8s;
}

.container.active .toggle-panel.toggle-left {
    left: -50%;
    transition-delay: 0.4s;
}

.toggle-panel.toggle-right {
    right: -50%;
    transition-delay: 0.4s;
}

.container.active .toggle-panel.toggle-right {
    right: 0;
    transition-delay: 0.8s;
}

.toggle-panel h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.toggle-panel p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

.toggle-panel .btn {
    width: 180px;
    height: 48px;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
}

.toggle-panel .btn:hover {
    background: #fff;
    color: var(--primary-color);
}

.lang-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.lang-selector select {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 12px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-box form > * {
    animation: fadeIn 0.5s ease forwards;
}

/* Multilingual Instructions Panel */
.instructions {
    margin-top: 20px;
    text-align: left;
    font-size: 13px;
}

.instructions h4 {
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 5px;
}

.instructions ul {
    padding-left: 15px;
}

.instructions li {
    margin-bottom: 5px;
    list-style: disc;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        width: 95%;
        height: auto;
        min-height: 500px;
        flex-direction: column;
    }
    .form-box {
        width: 100%;
        position: relative;
        padding: 30px;
    }
    .toggle-box {
        display: none;
    }
}

/* Admin Theme */
.admin-theme {
    --primary-color: #1a237e;
    --secondary-color: #e8eaf6;
}

/* User Theme */
.user-theme {
    --primary-color: #0097a7;
    --secondary-color: #e0f7fa;
}

.arabic-text {
    direction: rtl;
    text-align: right;
    font-family: 'Poppins', sans-serif; /* Add Arabic font if needed */
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-size: 14px;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
}
