/* --- بخش ساختار اصلی مدال --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex; /* تغییر کرد: همیشه فلکس است */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    direction: rtl;

    /* بخش جدید برای انیمیشن پس‌زمینه */
    opacity: 0; /* اضافه شد: در ابتدا نامرئی */
    visibility: hidden; /* اضافه شد: کاملا مخفی و غیرقابل کلیک */
    transition: opacity 0.3s ease, visibility 0.3s ease; /* اضافه شد */
}

.modal-overlay.visible {
    opacity: 1; /* اضافه شد: برای نمایش نرم */
    visibility: visible; /* اضافه شد */
}

.modal-content {
    max-width: 400px;
    width: 90%;
    opacity: 0; /* در ابتدا نامرئی */

    /* انیمیشن زیباتر: کمی از بالا به پایین حرکت می‌کند و بزرگ می‌شود */
    transform: scale(0.95) translateY(-20px); /* تغییر کرد */

    /* زمان‌بندی انیمیشن برای حس بهتر */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease; /* تغییر کرد */
}

.modal-overlay.visible .modal-content {
    opacity: 1; /* وضعیت نهایی: کاملا نمایان */
    transform: scale(1) translateY(0); /* وضعیت نهایی: در جای اصلی و اندازه کامل */
}

/* بقیه استایل‌های شما بدون تغییر باقی می‌مانند */
.sign-in-panel-wrapper {
    background-color: #fff;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* سایه بهتر */
    padding: 8px 16px;
}

.sign-in-panel-head {
    padding-bottom: 10px;
    border-bottom: 1px solid #efefef;
    display: flex;
    justify-content: start;
}

.panel-logo img {
    background-color: #fff;
    border-radius: 100px;
    width: 55px;
    height: auto;
}

.back-to-home svg {
    width: 40px;
    cursor: pointer;
}

.back-to-home,
.back-to-home:focus{
    outline: none;
    border: none;
}

.sign-in-panel-main {
    margin-top: 1rem;
    text-align: center;
}

.sign-in-title {
    line-height: 40px;
    font-size: 22px;
    font-weight: 600;
}

.sign-in-text {
    line-height: 1.8em;
    font-size: 13px;
    color: #616161;
}

.sign-in-form {
    margin-top: 1rem;
}

.input-field {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 25px;
    direction: ltr;
    box-sizing: border-box;
}

.my-4 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.btn {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.sign-in-button {
    transition: background-color 0.3s ease;
    width: 100%;
}

.terms-and-conditions {
    font-size: 13px;
    color: #616161;
}

.terms-and-conditions a {
    text-decoration: none;
    color: #A56F49;
}

.input-field,
#otp-input input {
    width: 100%;
    padding: 10px 15px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 2px;
    border: 1px solid #ccc;
    border-radius: 25px;
    direction: ltr;
    box-sizing: border-box;
}

#otp-input {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#otp-input input {
    width: 50px;
    height: 50px;
    font-size: 20px;
    border-radius: 10px;
}
