@keyframes fadeInUp {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

* {
    box-sizing: border-box;
    font-family: 'Yekan Bakh', sans-serif;
    direction: rtl;
}

html, body {
    margin: 0;
    padding: 0;
    background: #f1f3f6;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 2.5rem 2rem;
    animation: fadeInUp 0.6s ease-out;
    box-sizing: border-box;
    margin: 2rem 1rem;
}

.auth-title {
    font-size: 1.6rem;
    color: #000431;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: #222;
    display: block;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #000431;
    box-shadow: 0 0 0 3px rgba(0, 4, 49, 0.1);
    outline: none;
}

.form-error-box {
    margin-top: 0.4rem;
    background: #ffeded;
    color: #b30000;
    border: 1px solid #ffb3b3;
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.form-error-box.active {
    display: block;
}

.btn-submit {
    background-color: #000431;
    color: #fff;
    border: none;
    padding: 0.75rem;
    width: 100%;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: #191950;
    transform: translateY(-2px);
}

.auth-link,
.auth-register {
    text-align: center;
    display: block;
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: #000431;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.auth-link:hover,
.auth-register:hover {
    color: #191950;
}

@media (max-width: 480px) {
    html, body {
        height: auto;
        background-color: transparent;
    }

    body {
        align-items: flex-start;
        padding-top: 2rem;
    }

    .auth-wrapper {
        padding: 2rem 1rem;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        width: 100%;
        height: auto;
    }

    .auth-title {
        font-size: 1.4rem;
    }

    .btn-submit {
        font-size: 0.95rem;
    }
}
/* پس‌زمینه نیمه شفاف روی کل صفحه */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 4, 49, 0.15); /* رنگ متمایل به آبی تیره ولی شفاف */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* اسپینر گردان */
.loader-spinner {
    border: 5px solid #f3f3f3; /* خاکستری روشن */
    border-top: 5px solid #000431; /* رنگ اصلی تم */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

/* انیمیشن چرخش */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
