@font-face {
    font-family: 'IranianSans';
    src: url('/main/assets/fonts/IranianSans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'IranianSans', Arial, sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.auth-container {
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding-top: 4rem; /* Keep space for header */
    align-items: flex-start; /* Align to top */
    margin-top: -3rem; /* Position content between center and header */
}

.auth-input {
    width: 100%;
    padding: 0.75rem 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.4s ease;
    text-align: right;
    background-color: #f9fafb;
}

.auth-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
    transform: scale(1.02);
}

.auth-input:hover {
    border-color: #dc2626;
}

.auth-input-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2) !important;
}

.auth-error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: right;
    opacity: 0;
    animation: fadeInError 0.3s ease forwards;
}

.auth-submit-button {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(90deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-submit-button:hover {
    background: linear-gradient(90deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.auth-submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: slideIn 0.4s ease-in-out;
    transform: scale(0.95);
    transition: transform 0.4s ease;
}

.auth-modal-content:hover {
    transform: scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-size: 1.75rem;
    cursor: pointer;
    color: #991b1b;
    transition: color 0.3s ease, transform 0.3s ease;
}

.auth-modal-close:hover {
    color: #dc2626;
    transform: rotate(90deg);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .auth-modal-content {
        width: 95%;
        padding: 1.75rem;
    }

    .auth-input {
        padding: 0.65rem 2.5rem;
    }

    .auth-submit-button {
        padding: 0.75rem;
    }

    .auth-container {
        margin-top: -2rem; /* Adjusted for smaller screens */
    }
}