* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
    text-align: right;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    position: relative;
    height: 600px;
}

.forms-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.form-container {
    padding: 40px;
    width: 50%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.6s ease-in-out;
}

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

.logo {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
    font-weight: bold;
}

.subtitle {
    color: #666;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.toggle-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s ease-in-out;
    z-index: 10;
}

.toggle {
    text-align: center;
    color: white;
    padding: 40px;
}

.toggle h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.toggle p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.toggle-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: white;
    color: #667eea;
}

.forgot-password {
    text-align: center;
    margin-top: 15px;
}

.forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.social-login {
    margin-top: 30px;
    text-align: center;
}

.social-login p {
    color: #666;
    margin-bottom: 15px;
}

.social-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-btn {
    padding: 12px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.social-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
        max-width: 400px;
        height: auto;
    }
    
    .forms-wrapper {
        flex-direction: column;
    }
    
    .form-container {
        padding: 30px 20px;
        width: 100%;
        min-height: auto;
    }
    
    .toggle-container {
        position: relative;
        width: 100%;
        height: 200px;
        order: -1;
        right: auto;
    }
    
    .logo {
        font-size: 2rem;
    }
}
/* --- RTL & Persian support overrides --- */
html[dir="rtl"] body {
    direction: rtl;
    /* Optional: use a Persian-friendly font if available */
    font-family: Vazirmatn, IRANSans, Shabnam, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Put brand on the right and actions on the left in RTL */
html[dir="rtl"] .header {
    flex-direction: row-reverse;
}

/* Right-align main text blocks */
html[dir="rtl"] .brand .logo,
html[dir="rtl"] .brand .subtitle,
html[dir="rtl"] .card,
html[dir="rtl"] .card-title,
html[dir="rtl"] .card-desc {
    text-align: right;
}
