@font-face {
    font-family: 'iransans';
    src: url(../fonts/Iranian-Sans.ttf);
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensure full viewport coverage */
    direction: rtl;
    overflow: hidden;
    text-decoration: none;
}

body::before {
    content: '';
    position: fixed; /* Change to fixed positioning */
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    transform: rotate(-45deg);
    z-index: -1;
    animation: pulse 6s linear infinite; /* Add a subtle pulsing animation */
}

@keyframes pulse {
    0% {
        transform: rotate(-45deg) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: rotate(-45deg) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: rotate(-45deg) scale(1);
        opacity: 0.8;
    }
}

.container {
    position: relative;
    display: flex;
    width: 40%; /* Slightly wider */
    max-width: 1000px; /* Increased max-width */
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 16px; /* More rounded corners */
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); /* Stronger shadow */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transition box-shadow as well */
    margin: 0 auto; /* Center the container horizontally */
}

.container:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

.form-container {
    width: 100%;
    padding: 60px; /* Increased padding */
    box-sizing: border-box;
    transition: background-color 0.3s ease, transform 0.3s ease;
    min-height: 450px; /* Ensure a minimum height */
    height: 95vh;
    display: flex; /* Use flexbox for equal height */
    flex-direction: column;
    justify-content: space-between; /* Distribute space evenly */
}

.form-container:nth-child(1) {
    background-color: rgba(249, 249, 249, 0.5);
    border-right: 1px solid rgba(0, 0, 0, 0.07);
}

.form-container:nth-child(2) {
    background-color: rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(0, 0, 0, 0.07);
}   

.form-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 45px;
    font-size: 32px; /* Larger heading */
    font-weight: 700; /* Bolder font weight */
    letter-spacing: 0.8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Subtle text shadow */
}

.form-container input {
    width: 100%;
    padding: 16px; /* Increased padding */
    margin: 16px 0; /* Increased margin */
    display: inline-block;
    border: none;
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: 10px; /* More rounded input fields */
    box-sizing: border-box;
    font-size: 17px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07);
    color: #555;
}

/* جلوگیری از تاثیر استایل بالا روی چک‌باکس */
.form-container input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0 0 0 8px;
    border-radius: 4px;
    box-shadow: none;
    background: none;
    display: inline-block;
    vertical-align: middle;
    accent-color: #6a11cb;
    cursor: pointer;
    /* حذف سایر استایل‌های اضافی */
}

.form-container input:focus {
    background-color: rgba(255, 255, 255, 0.95);
    outline: none;
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
}

.form-container button {
    background: linear-gradient(to right, #6a11cb, #2575fc);
    font-family: iransans;
    color: white;
    padding: 18px 28px; /* Increased padding */
    margin: 28px 0; /* Increased margin */
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    font-size: 20px; /* Larger font size */
    font-weight: 600;
    letter-spacing: 0.6px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

.form-container button:hover {
    background: linear-gradient(to right, #5a0ebb, #1565ea);
    transform: translateY(-3px);
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.3);
}

.error-messages {
    background-color: rgba(248, 215, 218, 0.85);
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    padding: 18px; /* Increased padding */
    margin-bottom: 24px; /* Increased margin */
    font-size: 15px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Terms and Conditions Checkbox Styles */
.terms-checkbox {
    display: flex;
    align-items: center;
    margin: 10px 0 0 0;
    font-size: 15px;
    user-select: none;
}

.terms-checkbox input[type="checkbox"] {
    accent-color: #6a11cb;
    width: 18px;
    height: 18px;
    margin-left: 8px;
    cursor: pointer;
}

.terms-checkbox label {
    cursor: pointer;
    color: #333;
    margin: 0;
}

.terms-checkbox a {
    color: #2575fc;
    text-decoration: underline;
    transition: color 0.2s;
}

.terms-checkbox a:hover {
    color: #6a11cb;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .container {
        width: 90%;
    }

    .form-container {
        padding: 40px;
    }

    .form-container h2 {
        font-size: 28px;
        margin-bottom: 35px;
    }

    .form-container input {
        padding: 14px;
        margin: 14px 0;
        font-size: 16px;
    }

    .form-container button {
        padding: 16px 24px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        width: 95%;
        max-width: none; /* Remove max-width on smaller screens */
    }

    .form-container {
        width: 100%;
        padding: 30px; /* Reduce padding */
        border-right: none; /* Remove borders when stacked */
        border-left: none;
    }

    .form-container:nth-child(1),
    .form-container:nth-child(2) {
        background-color: rgba(255, 255, 255, 0.85); /* Ensure consistent background */
    }

    .form-container h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .form-container input {
        padding: 12px;
        margin: 12px 0;
        font-size: 15px;
    }

    .form-container button {
        padding: 14px 20px;
        font-size: 17px;
    }
}

@media (max-width: 576px) {
    .container {
        width: 100%; /* Full width on very small screens */
        border-radius: 0; /* Remove border-radius for full screen */
        box-shadow: none; /* Remove shadow for full screen */
    }

    .form-container {
        padding: 20px; /* Further reduce padding */
    }

    .form-container h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .form-container input {
        padding: 10px;
        margin: 10px 0;
        font-size: 14px;
    }

    .form-container button {
        padding: 12px 18px;
        font-size: 16px;
    }

    body::before {
        display: none; /* Hide the pseudo-element on very small screens */
    }
}

.toggle-container {
    display: none;
}

.toggle-button {
    font-family: iransans;
    background: none;
    border: none;
    color: #6a11cb;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-top: 10px;
}

.toggle-button:hover {
    color: #2575fc;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards; /* Changed to ease-out */
}

.slide-out-left {
    animation: slideOutLeft 0.5s ease-in forwards; /* Changed to ease-in */
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out forwards; /* Changed to ease-out */
}

.slide-out-right {
    animation: slideOutRight 0.5s ease-in forwards; /* Changed to ease-in */
}

@keyframes slideInLeft {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}
