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

:root {
    --primary-color: #8B4513;
    /* بني محروق */
    --accent-color: #D4AF37;
    /* ذهبي */
    /*في الوضع العادي*/
    --backColor: #fff;
    /*لون الخلفية*/
    --FontColor: #000;
    /*لون الخط الفرعي*/

    /*في الوضع المظلم */
    --darkback-color: #3f3c3c;
    /*لون الخلفية*/
    --darkFontColor: #fff;
    /*لون الخط الفرعي*/
}

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

body {
    font-family: 'Montserrat', sans-serif;
}

.SignContainer {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow-x: hidden;
}

.sign_container {
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(189, 41, 41, 0.35);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 768px;
    min-height: 540px !important;
}

.sign_container h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.sign_container p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
    text-align: center;
}

.sign_container span {
    font-size: 12px;
}

.sign_container a {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.sign_container button {
    background-color: var(--primary-color);
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sign_container button:hover {
    background-color: #7a3c10;
}

.sign_container button:active {
    background-color: #7a3c10;
    transform: scale(0.9);
}

.sign_container button.hidden {
    background-color: transparent;
    border-color: #fff;
}

.sign_container button.hidden:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sign_container form {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 475px;
}

.sign_container input {
    background-color: #eee;
    border: none;
    margin: 5px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

/* لجعل الحقول بجوار بعضها */
.name-fields {
    display: flex;
    gap: 15px;
    width: 100%;
}

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

.sign-in {
    left: 0;
    width: 50%;
    z-index: 2;
}

.sign_container.active .sign-in {
    transform: translateX(100%);
}

.sign-up {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.sign_container.active .sign-up {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}

@keyframes move {

    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

.social-icons {
    margin: 20px 0;
}

.social-icons a {
    border: 1px solid #ccc;
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
}

.toggle-sign_container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 150px 0 0 100px;
    z-index: 1000;
}

.sign_container.active .toggle-sign_container {
    transform: translateX(-100%);
    border-radius: 0 150px 100px 0;
}

.toggle {
    background-color: var(--primary-color);
    height: 100%;
    background: linear-gradient(to right, #8f4815, var(--primary-color));
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.sign_container.active .toggle {
    transform: translateX(50%);
}

.toggle-panel {
    position: absolute;
    width: 42%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.toggle-left {
    transform: translateX(-200%);
}

.sign_container.active .toggle-left {
    transform: translateX(0);
}

.toggle-right {
    right: 0;
    transform: translateX(0);
}

.sign_container.active .toggle-right {
    transform: translateX(200%);
}

/* خلفية شفافة */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* صندوق البوب اب */
.sign_popup {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    padding: 30px;
    border-radius: 10px;
    z-index: 1001;
    width: 90%;
    max-width: 50%;
    transition: top 0.5s ease;
}

/* عند العرض */
.show-popup .overlay {
    opacity: 1;
    pointer-events: auto;
}

.show-popup .sign_popup {
    top: 50px;
}

/* تصحيح موقع زر الإغلاق */
.close-btn {
    position: absolute;
    top: 22px;
    right: 20px !important;
    background: red;
    border: none;
    border-radius: 50%;
    font-size: 30px;
    color: white;
    cursor: pointer;
    z-index: 9999;
    padding: 3px 10px;
    line-height: 30px;
}

/* ضبط عرض صندوق البوب-أب لتجنب التداخل */
.sign_popup {
    padding: 30px;
    box-sizing: border-box;
    max-width: 50%;
    min-width: 350px;
}

/* Media Queries for Responsiveness */
@media screen and (max-width: 1100px) {
    .sign_popup {
        max-width: 70%;
    }

    .close-btn {
        top: 15px !important;
        right: 15px !important;
        font-size: 24px;
        padding: 0 8px;
    }
}

@media screen and (max-width: 800px) {
    .sign_container {
        margin: 5px auto;
    }

    .toggle-sign_container {
        display: none;
    }

    .sign-in,
    .sign-up {
        width: 100%;
    }

    .sign_container.active .sign-in {
        transform: translateX(0);
        opacity: 0;
        z-index: 1;
    }

    .close-btn {
        top: 15px !important;
        right: 15px !important;
        font-size: 24px;
        padding: 0 8px;
    }

    .sign-up {
        transform: translateX(0);
        opacity: 0;
        z-index: 1;
    }

    .sign_container.active .sign-up {
        transform: translateX(0);
        opacity: 1;
        z-index: 5;
        animation: fade 0.6s;
        overflow: auto;
    }

    @keyframes fade {

        0%,
        49.99% {
            opacity: 0;
        }

        50%,
        100% {
            opacity: 1;
        }
    }

    .sign_container form {
        padding: 0 30px;
    }

    .sign_popup {
        max-width: 90%;
        min-width: 300px;
    }
}

@media screen and (max-width: 600px) {
    .sign_container h1 {
        font-size: 1.5rem;
    }

    .sign_container form {
        padding: 0 20px;
        height: 120%;
    }

    .name-fields {
        flex-direction: column;
        gap: 0;
    }

    .sign_container button {
        padding: 10px 30px;
    }

    .social-icons a {
        width: 35px;
        height: 35px;
    }

    .sign_popup {
        padding: 20px;
        max-width: 95%;
        min-width: auto;
    }

    .close-btn {
        top: 15px;
        right: 15px !important;
        font-size: 24px;
        padding: 0 8px;
    }
}


#registerForm {
    margin-top: 35px;
}



.password-input-container {
    position: relative;
    width: 100%;
}

#password-requirements {
    width: 100%;
    padding-left: 20px;
    padding-top: 10px;
}

#password-requirements li {
    padding: 2px 0px;
}



.toggle-password {
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: #6c757d;
}

.password-strength {
    height: 5px;
    margin-top: 5px;
    border-radius: 5px;
    background-color: #e9ecef;
    /* لون افتراضي */
    display: block;
    align-self: flex-start;
    /* يجعل العنصر يتجه إلى اليسار */
    width: 100%;
}

.count1 {
    width: 100%;
    /* Ensure parent container fills space */
    margin-top: 5px;
    /* Match original spacing */
}

.password-match-indicator {
    margin-top: 5px;
    font-size: 0.8rem;
}

.badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 8px;
    font-size: 14px;
}

.badge-success {
    background-color: #28a745;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-success,
.badge-danger {
    color: white;
    padding: 2px;
}


/* Sign In/Up Loading Overlay */
#sign-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeInLoader 0.3s ease-in-out forwards;
}

/* Fade in animation for loader */
@keyframes fadeInLoader {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Spinner animation */
#sign-loading-overlay .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.1);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

/* Spinner rotation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Loading text styles */
#sign-loading-overlay h2 {
    color: #1f2937;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-align: center;
    letter-spacing: -0.025em;
}

#sign-loading-overlay p {
    color: #6b7280;
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    text-align: center;
    max-width: 400px;
    line-height: 1.5;
}

/* Progress dots animation */
.progress-dots {
    display: flex;
    gap: 6px;
    margin-top: 20px;
}

.progress-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    animation: dotPulse 1.4s ease-in-out infinite both;
}

.progress-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.progress-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}

.progress-dots .dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    #sign-loading-overlay h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    #sign-loading-overlay p {
        font-size: 14px;
        padding: 0 20px;
    }

    #sign-loading-overlay .spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #111827;
        color: #f9fafb;
    }

    .demo-content {
        background: #1f2937;
        color: #f9fafb;
    }

    #sign-loading-overlay {
        background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(31, 41, 55, 0.95));
    }

    #sign-loading-overlay h2 {
        color: #f9fafb;
    }

    #sign-loading-overlay p {
        color: #d1d5db;
    }

    #sign-loading-overlay .spinner {
        border: 4px solid rgba(59, 130, 246, 0.2);
        border-top: 4px solid #60a5fa;
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
    }

    .progress-dots .dot {
        background: #60a5fa;
    }
}

/* Success/Error states */
.loader-success .spinner {
    border-top-color: #10b981;
    animation: spin 0.5s linear;
}

.loader-error .spinner {
    border-top-color: #ef4444;
    animation: spin 0.5s linear;
}

.loader-success h2 {
    color: #059669;
}

.loader-error h2 {
    color: #dc2626;
}