* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #0f0f2a 50%, #1a1a3a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

    /* افکت نقطه‌های متحرک در پس‌زمینه */
    body::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background-image: radial-gradient(circle at 20% 40%, rgba(79, 70, 229, 0.15) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
        pointer-events: none;
    }

/* کانتینر اصلی */
.login-container {
    width: 100%;
    max-width: 460px;
    margin: 24px;
    position: relative;
    z-index: 2;
}

/* کارت لاگین */
.login-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(16px);
    border-radius: 48px;
    padding: 48px 40px;
    border: 1px solid rgba(129, 140, 248, 0.25);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}

.logo p {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
}

/* عنوان فرم */
.form-title {
    text-align: center;
    margin-bottom: 32px;
}

    .form-title h2 {
        color: #f1f5f9;
        font-size: 28px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .form-title p {
        color: #94a3b8;
        font-size: .810em;
    }

/* فیلدهای ورودی */
.input-group {
    margin-bottom: 1rem;
}

.other-types-login {
    padding-right: 1rem;
}

.other-types-login button {
    display:block;
}


.input-label {
    display: block;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 24px !important;
    padding: 14px 20px;
    color: white;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

    .input-field:focus {
        outline: none;
        background: rgba(15, 23, 42, 0.3);
        border-color: #818cf8;
        box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
    }

    .input-field::placeholder {
        color: #475569;
    }

    .input-field:-webkit-autofill,
    .input-field:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
        -webkit-text-fill-color: white !important;
        transition: background-color 5000s ease-in-out 0s;
    }


.field-validation-error span {
    font-size: .810em;
    padding-right: 1rem;
}

.other-types-login button {
    font-size: .810em;
    color: dodgerblue;
}

/* گزینه‌های اضافی (مرا به خاطر بسپار و فراموشی رمز) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 13px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    cursor: pointer;
}

    .checkbox input {
        width: 16px;
        height: 16px;
        cursor: pointer;
        accent-color: #4f46e5;
    }

.forgot-link {
    color: #818cf8;
    text-decoration: none;
    transition: color 0.2s;
}

    .forgot-link:hover {
        color: #c4b5fd;
    }

/* دکمه ورود */
.login-btn {
    width: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border: none;
    padding: 14px;
    border-radius: 40px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 24px;
}

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
    }

/* خط جداکننده */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: rgba(129, 140, 248, 0.2);
}

.divider-text {
    color: #64748b;
    font-size: 12px;
}

/* دکمه‌های ورود با شبکه‌های اجتماعی */
.social-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.social-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

    .social-btn:hover {
        background: rgba(79, 70, 229, 0.2);
        border-color: #818cf8;
    }

/* لینک ثبت‌نام */
.register-link {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(129, 140, 248, 0.1);
    color: #94a3b8;
    font-size: 14px;
}

    .register-link a {
        color: #818cf8;
        text-decoration: none;
        font-weight: 600;
    }

        .register-link a:hover {
            color: #c4b5fd;
        }

.back-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e0e0e0;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

    .back-btn:hover {
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.1);
        transform: translateX(-4px);
        color: white;
    }

    .back-btn i {
        font-size: 14px;
        transition: transform 0.3s ease;
    }

    .back-btn:hover i {
        transform: translateX(-2px);
    }


/* موبایل */
@media (max-width: 500px) {
    .login-card {
        padding: 32px 24px;
    }

    .form-title h2 {
        font-size: 24px;
    }

    .social-btn {
        padding: 8px 14px;
        font-size: 11px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.fade-out {
    animation: fadeOut 0.3s ease-in-out forwards;
}

.error-message, .success-message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 12px;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.error-message {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #f87171;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.timer-text {
    text-align: center;
    color: #818cf8;
    font-size: 13px;
    padding: 8px;
    background: rgba(129, 140, 248, 0.1);
    border-radius: 10px;
    margin-top: 8px;
}

.resend-btn {
    background: transparent;
    border: none;
    color: #818cf8;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    margin-top: 8px;
}

    .resend-btn:hover:not(:disabled) {
        color: #c084fc;
        text-decoration: underline;
    }

    .resend-btn:disabled {
        color: #4b5563;
        cursor: not-allowed;
    }
