@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&family=Passero+One&family=Scheherazade+New:wght@400;500;600;700&display=swap');


/* General styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Cairo", sans-serif;
    display: flex;
    min-height: 100vh;
    background: #ffffff;
    overflow-x: hidden;
    position: relative;
}

/* Animated background particles */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particles {
    position: relative;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #22C0B0, #2EC8A6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.3;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { top: 40%; left: 80%; animation-delay: 2s; }
.particle:nth-child(4) { top: 80%; left: 70%; animation-delay: 3s; }
.particle:nth-child(5) { top: 30%; left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { top: 70%; left: 30%; animation-delay: 5s; }
.particle:nth-child(7) { top: 10%; left: 90%; animation-delay: 6s; }
.particle:nth-child(8) { top: 90%; left: 10%; animation-delay: 7s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.7; }
}

/* Logo styling */
.logo {
    position: fixed;
    top: 30px;
    right: 235px;
    z-index: 100;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s ease;
}

.logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* Layout */
.left-side {
    flex: 1;
    display: flex;
    background: linear-gradient(135deg, #22C0B0 0%, #2EC8A6 50%, #20c997 100%);
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.left-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    animation: grain 20s linear infinite;
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

.animated-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
    max-width: 500px;
}

/* WhatsApp Logo Animation */
.whatsapp-logo-animation {
    margin-bottom: 40px;
}

.logo-container {
    display: inline-block;
    animation: logoFloat 3s ease-in-out infinite;
}

.whatsapp-icon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.phone-body {
    width: 100%;
    height: 100%;
    background: #22C0B0;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
    animation: phonePulse 2s ease-in-out infinite;
}

.phone-screen {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: #fff;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.whatsapp-symbol {
    width: 40px;
    height: 40px;
    background: #22C0B0;
    border-radius: 50%;
    position: relative;
    animation: symbolGlow 2s ease-in-out infinite;
}

.whatsapp-symbol::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.message-bubble {
    display: flex;
    gap: 3px;
    animation: bubbleBounce 1.5s ease-in-out infinite;
}

.message-dot {
    width: 6px;
    height: 6px;
    background: #25D366;
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

.message-dot:nth-child(2) { animation-delay: 0.2s; }
.message-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes phonePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 15px 40px rgba(37, 211, 102, 0.5); }
}

@keyframes symbolGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(37, 211, 102, 0.5); }
    50% { box-shadow: 0 0 20px rgba(37, 211, 102, 0.8); }
}

@keyframes bubbleBounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Welcome Text */
.welcome-text {
    margin-bottom: 40px;
}

.welcome-text h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: linear-gradient(45deg, #ffffff, #f0f8ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Features Preview */
.features-preview {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }

.feature-icon {
    font-size: 2rem;
    animation: iconBounce 2s ease-in-out infinite;
}

.feature-item span {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.right-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #fff;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

/* Animation classes */
.animate-fade-in {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s ease;
}

.animate-slide-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-input {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.animate-button {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease;
}

/* Switch buttons */
.switch-buttons {
    display: flex;
    width: 100%;
    max-width: 500px;
    margin-bottom: 50px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #f8f9fa;
}

.switch-buttons button {
    flex: 1;
    padding: 15px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: transparent;
    color: #666;
    position: relative;
    overflow: hidden;
}

.switch-buttons button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 196, 52, 0.1), transparent);
    transition: left 0.5s;
}

.switch-buttons button:hover::before {
    left: 100%;
}

.switch-buttons button:first-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.switch-buttons button:last-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.switch-buttons .active {
    background: linear-gradient(135deg, #22C0B0, #2EC8A6);
    color: white;
    box-shadow: 0 2px 10px rgba(52, 196, 52, 0.3);
}

.switch-buttons button:hover {
    background: linear-gradient(135deg, #22C0B0, #2EC8A6);
    color: white;
    transform: translateY(-2px);
}

/* Form styling */
.login-form {
    width: 100%;
    max-width: 500px;
}

/* Input fields */
.input-group {
    position: relative;
    margin-bottom: 30px;
    width: 100%;
}

.input-group input {
    width: 100%;
    padding: 18px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f8f9fa;
    direction: rtl;
}

.input-group input:focus {
    border-color: #22C0B0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 196, 52, 0.1);
    transform: translateY(-2px);
}

.input-group label {
    position: absolute;
    right: 15px;
    top: 18px;
    transition: all 0.3s ease;
    color: #6c757d;
    pointer-events: none;
    background: transparent;
    padding: 0 5px;
    font-size: 16px;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 12px;
    color: #22C0B0;
    background: #fff;
    font-weight: 600;
}

/* Password field */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    z-index: 2;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    transform: translateY(-50%) scale(1.1);
}

.eye-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s;
    filter: brightness(0.7);
}

.password-toggle:hover .eye-icon {
    filter: brightness(1);
}

/* Options */
.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    font-size: 14px;
}

.options a {
    color: #22C0B0;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.options a:hover {
    color: #2EC8A6;
    text-decoration: underline;
}

.options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.remember-me-container {
    display: flex;
    align-items: center;
}

/* Button */
button[type="submit"] {
    width: 100%;
    padding: 18px;
    margin-top: 10px;
    background: linear-gradient(135deg, #22C0B0, #2EC8A6);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

button[type="submit"]:hover::before {
    left: 100%;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #22C0B0, #20c997);
    transform: translateY(-3px);
}

button[type="submit"]:active {
    transform: translateY(-1px);
}

/* Validation messages */
.validation-message {
    display: none;
    font-size: 12px;
    margin-top: 8px;
    color: #dc3545;
    text-align: right;
    font-weight: 500;
}

.validation-message.valid {
    color: #28a745;
}

.error-message {
    color: #dc3545;
    text-align: center;
    margin: 15px 0;
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    display: none;
    font-weight: 500;
}

/* Loading spinner */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.spinner {
    border: 4px solid rgba(52, 196, 52, 0.1);
    border-radius: 50%;
    border-top: 4px solid #34C334;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 992px) {
    body {
        flex-direction: column;
    }
    
    .left-side {
        display: none;
    }
    
    .right-side {
        padding: 80px 20px 20px;
        width: 100%;
        max-width: 100%;
        justify-content: flex-start; 
        min-height: 100vh;
    }

    .site-header-center {
        margin-bottom: 30px;
    }
    
    .logo-large {
        height: 80px; /* حجم أصغر قليلاً للشاشات المتوسطة */
    }
    
    .site-name-center h1 {
        font-size: 2.2rem;
    }
    
    .site-tagline-center {
        font-size: 1rem;
    }
    
    .logo {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .logo img {
        height: 50px;
    }

    .welcome-text h1 {
        font-size: 2rem;
    }

    .features-preview {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .logo-large {
        height: 70px;
    }
    
    .site-name-center h1 {
        font-size: 2rem;
    }
    
    .site-tagline-center {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .right-side {
        padding: 30px 15px;
    }
    
    .site-header-center {
        margin-bottom: 25px;
    }
    
    .logo-large {
        height: 60px;
        padding: 10px;
    }
    
    .site-name-center h1 {
        font-size: 1.8rem;
    }
    
    .site-tagline-center {
        font-size: 0.9rem;
    }

    .input-group label {
        position: static;
        margin-bottom: 8px;
        font-size: 14px;
        color: #333;
        transform: none;
        padding: 0;
        order: -1;
    }
    
    .input-group input {
        order: 1;
    }
    
    .input-group input:focus + label,
    .input-group input:not(:placeholder-shown) + label {
        position: static;
        font-size: 14px;
        color: #333;
        background: transparent;
        transform: none;
    }
    
    .password-toggle {
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .switch-buttons {
        margin-bottom: 20px;
    }
    
    .switch-buttons button {
        padding: 12px;
        font-size: 14px;
    }
    
    button[type="submit"] {
        padding: 15px;
    }

    .options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .remember-me-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .checkbox-wrapper-51 {
        width: 100%;
        justify-content: space-between;
    }
    
    .toggle {
        order: 2;
    }
    
    .remember-text {
        order: 1;
    }

    .welcome-text h1 {
        font-size: 1.8rem;
    }

    .features-preview {
        flex-direction: column;
        gap: 15px;
    }

}

@media (max-width: 400px) {
    .logo-large {
        height: 50px;
    }
    
    .site-name-center h1 {
        font-size: 1.5rem;
    }
    
    .site-tagline-center {
        font-size: 0.85rem;
    }
}

/* Center Logo and Site Name in Right Side */
.site-header-center {
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.8s ease forwards;
    animation-delay: 0.3s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-large-container {
    margin-bottom: 20px;
}

.logo-large {
    height: 100px; 
    width: auto;
    object-fit: contain;
    border-radius: 15px;
    padding: 12px;
    transition: all 0.3s ease;
}

.site-name-center {
    text-align: center;
}

.site-name-center h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    background: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.site-tagline-center {
    color: #666;
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 500;
}

/* Adjust the switch-buttons position */
.switch-buttons {
    margin-bottom: 30px; /* تقليل المسافة لأن الشعار يأخذ مساحة */
}

/* Hide the old logo in top-right */
.logo {
    display: none;
}

/* Adjust right-side to center content better */
.right-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* تأكد من توسيط المحتوى عمودياً */
    align-items: center;
    padding: 40px 20px;
    background: #fff;
    position: relative;
}

/* Make the login form container have proper spacing */
.login-form {
    width: 100%;
    max-width: 500px;
    margin-top: 20px;
}